-
Notifications
You must be signed in to change notification settings - Fork 148
Expand file tree
/
Copy pathBlazor_WASM_Demos_NET8.csproj
More file actions
147 lines (121 loc) · 6.08 KB
/
Blazor_WASM_Demos_NET8.csproj
File metadata and controls
147 lines (121 loc) · 6.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<!--SWASM - Standalone WASM-->
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<DefineConstants>$(DefineConstants);WASM;STAGING</DefineConstants>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
<RootNamespace>BlazorDemos</RootNamespace>
<ImplicitUsings>disable</ImplicitUsings>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>RELEASE;NET8_0;WASM</DefineConstants>
<ConfigurationValue>Release</ConfigurationValue>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>DEBUG;NET8_0;WASM</DefineConstants>
<ConfigurationValue>Debug</ConfigurationValue>
</PropertyGroup>
<PropertyGroup Condition="'$(ISSTAGING)' != ''">
<DefineConstants>$(DefineConstants);ISSTAGING</DefineConstants>
</PropertyGroup>
<Target Name="RemoveStaticFiles" AfterTargets="AfterPublish">
<PropertyGroup>
<Files>$(PublishDir)\wwwroot\_content</Files>
</PropertyGroup>
<ItemGroup>
<Directories Include="$(Files)\**"
Exclude="$(Files)\**\syncfusion-blazor.min.js;$(Files)\**\syncfusion-blazor-sfpdfviewer.min.js;$(Files)\**\pdfium.js;$(Files)\**\pdfium.wasm;
$(Files)\**\syncfusion-blazor-documenteditor.min.js;$(Files)\**\syncfusion-blazor-spreadsheet.min.js;$(Files)\Syncfusion.Blazor.Themes\**;$(Files)\Blazor_WASM_Common_NET8\**;
$(Files)\**\syncfusion-blazor-base.min.js;$(Files)\**\syncfusion-blazor-extended.min.js;$(Files)\**\data.min.js;$(Files)\**\diagrams.min.js;" />
</ItemGroup>
<Delete Files="@(Directories)" ContinueOnError="true" />
</Target>
<ItemGroup>
<!--<PackageReference
Include="Microsoft.AspNet.Mvc" Version="5.2.9" />-->
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.15" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer"
Version="8.0.15" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.RazorPages" Version="2.3.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.3.0" />
<PackageReference Include="SkiaSharp.Views.Blazor" Version="3.116.1" />
</ItemGroup>
<!-- Updated packages to latest secure versions to address known vulnerabilities in Microsoft.AspNetCore dependencies. -->
<ItemGroup>
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.2" />
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Markdig" Version="0.23.0" />
</ItemGroup>
<Target Name="ProductionBuild" BeforeTargets="BeforeBuild">
<Delete Files="wwwroot/version.js" />
<WriteLinesToFile File="wwwroot/version.js" Lines='export const data={"version":"net8.0","configuration":"$(ConfigurationValue)"}' />
</Target>
<Target Name="UpdateHtmlReferences" BeforeTargets="BeforeBuild" Condition="'$(Configuration)'=='Release'">
<ReadLinesFromFile File="wwwroot/index.html" Condition="Exists('wwwroot/index.html')">
<Output TaskParameter="Lines" ItemName="IndexHtmlLines" />
</ReadLinesFromFile>
<WriteLinesToFile
File="wwwroot/index.html"
Lines="@(IndexHtmlLines->Replace('importResources.js','importResources.min.js')->Replace('service-worker.js','service-worker.min.js'))"
Overwrite="true"
Condition="Exists('wwwroot/index.html')" />
</Target>
<!-- <Target Name="PublishConsoleAppBeforeBuild" BeforeTargets="BeforeBuild" Condition="'$(Configuration)'=='Release'">
<PropertyGroup>
<ConsoleAppPath>AssetMinifier\AssetMinifier.csproj</ConsoleAppPath>
<ConsoleAppPublishDir>AssetMinifier\publish</ConsoleAppPublishDir>
</PropertyGroup>
<Exec Command="dotnet publish $(ConsoleAppPath) -c Release -o $(ConsoleAppPublishDir)" />
</Target> -->
<Target Name="MinifyAssets" BeforeTargets="BeforeBuild" Condition="'$(Configuration)'=='Release'">
<ItemGroup>
<_CssFiles Include="wwwroot/**/*.css" Exclude="wwwroot/**/*.min.css" />
<_JsFiles Include="wwwroot/**/*.js" Exclude="wwwroot/**/*.min.js" />
<_CssFiles Include="..\Common\wwwroot\**\*.css" Exclude="..\Common\wwwroot\**\*.min.css" />
<_JsFiles Include="..\Common\wwwroot\**\*.js" Exclude="..\Common\wwwroot\**\*.min.js" />
</ItemGroup>
<Exec
Command="dotnet "../Common/AssetMinifier/Blazor-StaticAssetMinifier/AssetMinifier.dll" "%( _CssFiles.FullPath )""
Condition="Exists('%( _CssFiles.FullPath )')"
StandardOutputImportance="High"
StandardErrorImportance="High" />
<Exec
Command="dotnet "../Common/AssetMinifier/Blazor-StaticAssetMinifier/AssetMinifier.dll" "%( _JsFiles.FullPath )""
Condition="Exists('%( _JsFiles.FullPath )')"
StandardOutputImportance="High"
StandardErrorImportance="High" />
</Target>
<ItemGroup>
<Compile Remove="bin\**" />
<Content Remove="bin\**" />
<None Remove="bin\**" />
<Compile Remove="obj\**" />
<Content Remove="bin\**" />
<None Remove="obj\**" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Blazor_WASM_Common_NET8.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Pages\DocumentProcessing\Excel\EncryptAndDecryptService.cs" />
</ItemGroup>
<ItemGroup>
<Content Remove="Pages\DocumentProcessing\Excel\EncryptAndDecrypt.razor" />
</ItemGroup>
<Target Name="CopyWebConfig" AfterTargets="Publish">
<Copy SourceFiles="web.config" DestinationFolder="$(PublishDir)" />
</Target>
<PropertyGroup>
<WasmNativeStrip>true</WasmNativeStrip>
<WasmBuildNative>true</WasmBuildNative>
</PropertyGroup>
</Project>