forked from CommunityToolkit/WindowsCommunityToolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
77 lines (68 loc) · 3.16 KB
/
Directory.Build.props
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
<Project>
<PropertyGroup>
<RepositoryDirectory>$(MSBuildThisFileDirectory)</RepositoryDirectory>
<BuildToolsDirectory>$(RepositoryDirectory)build\</BuildToolsDirectory>
</PropertyGroup>
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.Common.props" />
<Choose>
<When Condition="$(IsCoreProject)">
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageOutputPath>$(RepositoryDirectory)bin\nupkg</PackageOutputPath>
<GenerateLibraryLayout Condition="$(IsUwpProject)">true</GenerateLibraryLayout>
<TreatWarningsAsErrors Condition="'$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<IsPackable>false</IsPackable>
<IsPublishable>false</IsPublishable>
<NoWarn>$(NoWarn);CS8002;SA0001</NoWarn>
</PropertyGroup>
</Otherwise>
</Choose>
<Choose>
<When Condition="$(IsUwpProject)">
<PropertyGroup>
<!-- Code CS8002 is a warning for strong named -> non-strong-named reference. This is valid for platforms other than .NET Framework (and is needed for the UWP targets. -->
<NoWarn>$(NoWarn);CS8002</NoWarn>
<!-- For including default @(Page) and @(Resource) items via 'MSBuild.Sdk.Extras' Sdk package. Also provides up to date check and file nesting -->
<ExtrasEnableDefaultXamlItems>true</ExtrasEnableDefaultXamlItems>
</PropertyGroup>
</When>
</Choose>
<Choose>
<When Condition="!$(IsDesignProject)">
<!--
Debug builds have this turned on by default, but it breaks our Xaml Islands Scenarios.
ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that.
-->
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<EnableXBindDiagnostics>false</EnableXBindDiagnostics>
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
</ItemGroup>
</When>
</Choose>
<Import Project="$(BuildToolsDirectory)Windows.Toolkit.VisualStudio.Design.props" Condition="$(IsDesignProject)" />
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
</ItemGroup>
<Choose>
<When Condition="!$(IsSampleProject) and '$(SourceLinkEnabled)' != 'false'">
<PropertyGroup>
<!-- Declare that the Repository URL can be published to NuSpec -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Embed source files that are not tracked by the source control manager to the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Include PDB in the built .nupkg -->
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
</When>
</Choose>
</Project>