-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
59 lines (51 loc) · 2.69 KB
/
Directory.Build.props
File metadata and controls
59 lines (51 loc) · 2.69 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
<Project>
<PropertyGroup>
<!-- These need to be set here because the root Directory.Build.props sets up the intermediate path early -->
<Configuration>Release</Configuration>
<OutputType>Exe</OutputType>
<TargetOS>browser</TargetOS>
<TargetArchitecture>wasm</TargetArchitecture>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<!-- Suppress experimental trim warnings. This can be removed when we get a preview6 SDK. -->
<NoWarn>$(NoWarn);IL2121</NoWarn>
<UsingBrowserRuntimeWorkload>true</UsingBrowserRuntimeWorkload>
</PropertyGroup>
<Import Project="..\Directory.Build.props"/>
<PropertyGroup>
<OutputPath>bin</OutputPath>
<WasmAppDir>$(MSBuildProjectDirectory)\bin\wwwroot\</WasmAppDir>
<CompressionEnabled>false</CompressionEnabled>
<DisableBuildCompression>true</DisableBuildCompression>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<WasmNativeDebugSymbols>true</WasmNativeDebugSymbols>
<WasmNativeStrip>false</WasmNativeStrip>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
<!-- Runtime feature defaults to trim unnecessary code -->
<EventSourceSupport>false</EventSourceSupport>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<DebuggerSupport>false</DebuggerSupport>
<WasmEmitSymbolMap>true</WasmEmitSymbolMap>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)CommonAssemblyInfo.cs" />
</ItemGroup>
<Target Name="CopyWwwrootToOutputDirectory" BeforeTargets="ResolveProjectStaticWebAssets">
<!-- StaticWebAssetsSDK by default doesn't copy wwwroot content to build output (only during publish) and we need it for running the samples with simple server (without DevServer) -->
<ItemGroup>
<Content CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::ValueOrDefault('%(Content.Identity)', '').Contains('wwwroot'))" />
</ItemGroup>
</Target>
<!-- RuntimeFlavor must be set before WasmApp.InTree.props so it imports the correct
flavor-specific props (BrowserWasmApp.props for Mono, nothing for CoreCLR).
Without this, Subsets.props defaults RuntimeFlavor to Mono for browser-wasm,
causing WasmApp.Common.props (Mono) to be imported even for CoreCLR builds. -->
<PropertyGroup>
<RuntimeFlavor Condition="'$(Nested_RuntimeFlavor)' != ''">$(Nested_RuntimeFlavor)</RuntimeFlavor>
</PropertyGroup>
<!-- Import late, so properties like $(ArtifactsBinDir) are set -->
<Import Project="$(BrowserProjectRoot)build\WasmApp.InTree.props" />
</Project>