60 lines
2.9 KiB
XML
60 lines
2.9 KiB
XML
<Project>
|
|
|
|
<PropertyGroup>
|
|
<LangVersion>8.0</LangVersion>
|
|
|
|
<!-- Enables Strict mode for Roslyn compiler -->
|
|
<Features>strict</Features>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<!-- Required to exist in the NuGet package cache to enable code-signing. -->
|
|
<PackageReference Include="MicroBuild.Core" Version="0.3.0" PrivateAssets="All" AllowExplicitReference="true" ExcludeAssets="All" />
|
|
|
|
<PackageReference Condition="'$(DotNetBuildFromSource)' != 'true'" Include="Microsoft.DotNet.GenAPI" PrivateAssets="All" Version="$(MicrosoftDotNetGenApiPackageVersion)" IsImplicitlyDefined="true" />
|
|
</ItemGroup>
|
|
|
|
<Choose>
|
|
<When Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true' OR '$(RazorSdkCurrentVersionProps)' != ''">
|
|
<ItemGroup>
|
|
<!--
|
|
Use the Razor SDK as a project reference. The version of the .NET Core SDK we build with often contains a version of the Razor SDK
|
|
several versions older than latest. We reference the project to ensure it's built before the other projects that use it. Since this
|
|
is a project reference, we must explicitly import the props file and also specify the output location of the SDK directory.
|
|
-->
|
|
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj" PrivateAssets="All" IsImplicitlyDefined="true" ReferenceOutputAssembly="false" >
|
|
<!-- Use the same logic as Sdk.Razor.CurrentVersion.Targets -->
|
|
<SetTargetFramework Condition=" '$(MSBuildRuntimeType)' == 'Core'">TargetFramework=$(DefaultNetCoreTargetFramework)</SetTargetFramework>
|
|
<SetTargetFramework Condition=" '$(MSBuildRuntimeType)' != 'Core'">TargetFramework=net46</SetTargetFramework>
|
|
</ProjectReference>
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<RazorSdkDirectoryRoot>$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
|
|
</PropertyGroup>
|
|
</When>
|
|
</Choose>
|
|
|
|
<Import Project="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\build\netstandard2.0\Microsoft.NET.Sdk.Razor.props" Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true' OR '$(RazorSdkCurrentVersionProps)' != ''" />
|
|
|
|
|
|
<ItemGroup Condition=" '$(IsTestProject)' == 'true' ">
|
|
<Reference Include="Microsoft.AspNetCore.Testing" />
|
|
<Reference Include="Moq" />
|
|
<Reference Include="NETStandard.Library" />
|
|
<Compile Include="$(SharedSourceRoot)test\SuccessfulTests.cs" LinkBase="SharedTests" />
|
|
</ItemGroup>
|
|
|
|
<Import Project="$(RepoRoot)src\Testing\src\build\Microsoft.AspNetCore.Testing.props" Condition=" '$(IsTestProject)' == 'true' " />
|
|
|
|
<ItemDefinitionGroup Condition=" '$(IsTestProject)' == 'true' ">
|
|
<Content>
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
|
</Content>
|
|
</ItemDefinitionGroup>
|
|
|
|
<Import Project="CSharp.ReferenceAssembly.props" Condition="'$(IsReferenceAssemblyProject)' == 'true'" />
|
|
|
|
</Project>
|