-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
40 lines (32 loc) · 1.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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RootDir>$([MSBuild]::EnsureTrailingSlash($([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .gitignore))))</RootDir>
<BuildDir>$([MSBuild]::EnsureTrailingSlash($(RootDir)build))</BuildDir>
</PropertyGroup>
<PropertyGroup>
<Nullable>enable</Nullable>
<IsSharedProject>false</IsSharedProject>
<IsSharedProject Condition=" ('$(MSBuildProjectExtension)' == '.shproj') OR ('$(MSBuildProjectExtension)' == '.msbuildproj') ">true</IsSharedProject>
<IsPackable>true</IsPackable>
<IsPackable Condition=" '$(IsSharedProject)' == 'true' ">false</IsPackable>
<IsTestProject>$(MSBuildProjectName.EndsWith('Tests'))</IsTestProject>
<IsExampleProject>$(MSBuildProjectName.EndsWith('Example'))</IsExampleProject>
</PropertyGroup>
<ImportGroup Condition=" '$(IsSharedProject)' == 'false' ">
<Import Project="$(BuildDir)common.props" />
<Import Project="$(BuildDir)assembly-info.props" />
</ImportGroup>
<ImportGroup Condition=" '$(IsExampleProject)' == 'false' ">
<Import Project="$(BuildDir)code-analysis.props" />
</ImportGroup>
<ImportGroup Condition=" '$(IsSharedProject)' == 'false' AND '$(IsTestProject)' == 'false' AND '$(IsExampleProject)' == 'false' ">
<Import Project="$(BuildDir)nuget.props" />
</ImportGroup>
<ImportGroup Condition=" '$(IsSharedProject)' == 'false' AND '$(IsTestProject)' == 'true' ">
<Import Project="$(BuildDir)test.props" />
</ImportGroup>
<ItemGroup Condition=" '$(IsTestProject)' == 'false' ">
<Using Include="System.Diagnostics.CodeAnalysis" />
</ItemGroup>
</Project>