forked from dotnet/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
80 lines (65 loc) · 4.17 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
<Project>
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<RepositoryUrl>https://github.com/aspnet/Extensions</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
<!-- Set these before importing Arcade to override Arcade's defaults -->
<IsUnitTestProject>false</IsUnitTestProject>
<IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('.Tests')) OR $(MSBuildProjectName.EndsWith('.FunctionalTests'))">true</IsUnitTestProject>
<IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('.Specification.Tests'))">false</IsUnitTestProject>
<IsBenchmarkProject Condition="$(MSBuildProjectName.EndsWith('.Performance'))">true</IsBenchmarkProject>
<IsTestAssetProject Condition="$(RepoRelativeProjectDir.Contains('testassets'))">true</IsTestAssetProject>
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('samples'))">true</IsSampleProject>
<IsReferenceAssemblyProject>false</IsReferenceAssemblyProject>
<IsReferenceAssemblyProject Condition="$(MSBuildProjectDirectory.EndsWith('ref'))">true</IsReferenceAssemblyProject>
<OutDirName Condition="'$(IsReferenceAssemblyProject)' == 'true'">$(MSBuildProjectName)-ref</OutDirName>
<ExcludeFromSourceBuild Condition="'$(IsUnitTestProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsTestAssetProject)' == 'true' or '$(IsSampleProject)' == 'true'">true</ExcludeFromSourceBuild>
</PropertyGroup>
<Import Project="eng\FlakyTests.BeforeArcade.props" />
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="eng\FlakyTests.AfterArcade.props" />
<PropertyGroup>
<IncludeSymbols>true</IncludeSymbols>
<!-- Always pass portable to override arcade sdk which uses embedded for local builds -->
<DebugType>portable</DebugType>
<Serviceable Condition="'$(Configuration)' == 'Release'">true</Serviceable>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageIconUrl>https://go.microsoft.com/fwlink/?LinkID=288859</PackageIconUrl>
<PackageProjectUrl>https://asp.net</PackageProjectUrl>
<NoPackageAnalysis>true</NoPackageAnalysis>
<LangVersion>8.0</LangVersion>
<DefaultNetCoreTargetFramework>netcoreapp$(MajorVersion).$(MinorVersion)</DefaultNetCoreTargetFramework>
<Product>Microsoft .NET Extensions</Product>
<SignAssembly>true</SignAssembly>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Enables Strict mode for Roslyn compiler -->
<Features>strict</Features>
<!-- Automatically generate source for .resx files on-build. -->
<GenerateResxSource>true</GenerateResxSource>
<GenerateResxSourceEmitFormatMethods>true</GenerateResxSourceEmitFormatMethods>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\src\</SharedSourceRoot>
<NpmPackageDir>$(ArtifactsDir)npm\$(Configuration)\</NpmPackageDir>
<ShippingNpmPackageOutputPath>$(NpmPackageDir)Shipping\</ShippingNpmPackageOutputPath>
</PropertyGroup>
<ItemGroup Condition=" '$(IsUnitTestProject)' == 'true' ">
<Reference Include="Microsoft.AspNetCore.Testing" />
<Reference Include="Moq" />
</ItemGroup>
<ItemDefinitionGroup Condition=" '$(IsUnitTestProject)' == 'true' ">
<!-- Always copy content items in test projects into the build output directory. -->
<Content>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemDefinitionGroup>
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<Reference Include="Microsoft.DotNet.GenAPI" Version="$(MicrosoftDotNetGenApiPackageVersion)" PrivateAssets="All" />
</ItemGroup>
<Import Project="eng\Dependencies.props" />
<Import Project="eng\PatchConfig.props" />
<Import Project="eng\ProjectReferences.props" />
<Import Project="eng\targets\Csharp.Refs.props" Condition="'$(IsReferenceAssemblyProject)' == 'true'" />
<Import Project="eng\targets\Npm.Common.props" Condition="'$(MSBuildProjectExtension)' == '.npmproj'" />
</Project>