forked from dotnet/razor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
113 lines (96 loc) · 5.64 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
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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!--
We don't follow Arcade conventions for project naming.
-->
<PropertyGroup Condition="'$(IsUnitTestProject)' == ''">
<IsUnitTestProject>false</IsUnitTestProject>
<IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('.Test'))">true</IsUnitTestProject>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\AspNetCoreSettings.props"
Condition=" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' " />
<PropertyGroup Label="Build Settings">
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<TreatWarningsAsErrors Condition="'$(CI)' == 'true'">true</TreatWarningsAsErrors>
<GenerateResxSource>true</GenerateResxSource>
<GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods>
<ExcludeFromSourceBuild Condition="'$(IsUnitTestProject)' == 'true'">true</ExcludeFromSourceBuild>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<EnableWindowsTargeting Condition="'$(DotNetBuildFromSource)' != 'true'">true</EnableWindowsTargeting>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\</SharedSourceRoot>
<!-- Embed source files that are not tracked by the source control manager in the PDB. -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Working around https://github.com/dotnet/sdk/issues/24747 -->
<NoWarn>$(NoWarn);NU1505</NoWarn>
<!-- Working around https://github.com/microsoft/msbuild/pull/4764 -->
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
<!-- By default, nothing builds from source build. Individual projects can opt in instead -->
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<DefaultNetFxTargetFramework>net472</DefaultNetFxTargetFramework>
</PropertyGroup>
<!--
There are effectively three modes that are needed for our source build TFMs and this is where
we calculate them
-->
<Choose>
<!--
1. CI source build leg: this needs to build the current and previous source build TFM. Both are
necessary as the output of this leg is used in other CI source build legs. Those could be
targeting NetCurrent or NetPrevious hence we must produce both.
-->
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' != 'Product'">
<PropertyGroup>
<DefaultNetCoreTargetFramework>$(NetCurrent)</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework);$(NetPrevious)</DefaultNetCoreTargetFrameworks>
</PropertyGroup>
</When>
<!--
2. Source build the product: this is the all up build of the product which needs only NetCurrent
-->
<When Condition="'$(DotNetBuildFromSource)' == 'true' AND '$(DotNetBuildFromSourceFlavor)' == 'Product'">
<PropertyGroup>
<DefaultNetCoreTargetFramework>$(NetCurrent)</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework)</DefaultNetCoreTargetFrameworks>
</PropertyGroup>
</When>
<!--
3. Everything else including normal CI, developer machines and official builds.
-->
<Otherwise>
<PropertyGroup>
<DefaultNetCoreTargetFramework>net8.0</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFrameworks>$(DefaultNetCoreTargetFramework)</DefaultNetCoreTargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)eng\BannedSymbols.txt" />
<!--
This language support type (used for init-only properties) is linked directly into every project to avoid conflicts with
the same type that is included in Microsoft.CodeAnalysis.ExternalAccess.Razor, which allows InternalsVisibleTo access
to Razor tooling.
-->
<Compile Condition="'$(SkipLanguageSupport)' != 'true'" Include="$(MSBuildThisFileDirectory)\src\Shared\LanguageSupport\IsExternalInit.cs" Link="LanguageSupport\IsExternalInit.cs" />
</ItemGroup>
<PropertyGroup Label="Package and Assembly Metadata">
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Product>Microsoft ASP.NET Core</Product>
</PropertyGroup>
<PropertyGroup Label="Warning Suppressions">
<!--
Suppress warnings about assembly conflicts. This happens for assemblies that ship in VS so it's irrelevant.
-->
<NoWarn>$(NoWarn);MSB3277</NoWarn>
</PropertyGroup>
<!-- For InternalsVisibleTo items-->
<PropertyGroup Label="Public Keys">
<RazorKey>0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb</RazorKey>
<VisualStudioKey>002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293</VisualStudioKey>
</PropertyGroup>
</Project>