-
-
Notifications
You must be signed in to change notification settings - Fork 170
/
Directory.Build.props
38 lines (36 loc) · 2.26 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
<Project>
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Steve Smith (@ardalis)</Authors>
<Company>Ardalis.com</Company>
<RepositoryUrl>https://github.com/ardalis/SmartEnum</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/ardalis/SmartEnum</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<TargetFrameworks>net6.0;net7.0;net8.0;netstandard2.0</TargetFrameworks>
<!-- <TreatWarningsAsErrors>true</TreatWarningsAsErrors> -->
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version>8.1.0</Version>
<LangVersion>11</LangVersion>
<Features>strict</Features>
</PropertyGroup>
<PropertyGroup>
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
<!-- Define useful flags based on project name conventions -->
<IsUnitTestProject>false</IsUnitTestProject>
<IsUnitTestProject Condition="$(MSBuildProjectName.EndsWith('Tests')) or $(MSBuildProjectName.EndsWith('.Test')) or $(MSBuildProjectName.EndsWith('.FunctionalTest'))">true</IsUnitTestProject>
<IsTestAssetProject Condition="$(RepoRelativeProjectDir.Contains('testassets'))">true</IsTestAssetProject>
<IsSampleProject Condition="$(RepoRelativeProjectDir.Contains('sample'))">true</IsSampleProject>
<IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject>
<IsShipping Condition="'$(IsSampleProject)' == 'true' or '$(IsTestAssetProject)' == 'true' or '$(IsBenchmarkProject)' == 'true' or '$(IsUnitTestProject)' == 'true'">false</IsShipping>
<!--
Following logic mimics core-setup approach as well as
https://github.com/dotnet/arcade/blob/694d59f090b743f894779d04a7ffe11cbaf352e7/src/Microsoft.DotNet.Arcade.Sdk/tools/Publish.proj#L30-L31
$(DotNetFinalVersionKind) is set globally when doing final aka stable builds. Arcade infrastructure should pick
up $(IsStableBuild) automatically; property is also used to control prerelease branding.
-->
</PropertyGroup>
</Project>