зеркало из https://github.com/dotnet/razor.git
110 строки
5.0 KiB
XML
110 строки
5.0 KiB
XML
<?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="eng\MPack.props" />
|
|
<Import Project="eng\targets\Npm.Common.props" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
|
|
|
|
<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>
|
|
|
|
<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);net7.0</DefaultNetCoreTargetFrameworks>
|
|
<DefaultNetCoreWindowsTargetFrameworks>net8.0-windows;net7.0-windows</DefaultNetCoreWindowsTargetFrameworks>
|
|
</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 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>
|
|
</Project>
|