forked from CoreWCF/CoreWCF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
73 lines (66 loc) · 4.11 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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Defaults -->
<PropertyGroup>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
<SourceDir>$(ProjectDir)src/</SourceDir>
<ConfigPathSegment>Debug</ConfigPathSegment>
<ConfigPathSegment Condition="'$(Configuration)'!=''">$(Configuration)</ConfigPathSegment>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
<!-- Set up some common paths -->
<PropertyGroup>
<CommonPath>$(SourceDir)Common/src/</CommonPath>
<CommonTestPath>$(SourceDir)Common/tests/</CommonTestPath>
<ParentFolder>$([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory)))</ParentFolder>
<IsSampleProject>$(ParentFolder.EndsWith(`Samples`, true, null))</IsSampleProject>
<IsTestProject>$(MSBuildProjectName.EndsWith(`Tests`, true, null))</IsTestProject>
<IsBuildToolsProject>$(MSBuildProjectName.Contains(`BuildTools`))</IsBuildToolsProject>
<IsTemplatesProject>$(MSBuildProjectName.Contains(`Templates`))</IsTemplatesProject>
<IncludeCommonCode Condition="!($(IsTestProject) OR $(IsSampleProject) OR $(IsBuildToolsProject) OR $(IsTemplatesProject))">true</IncludeCommonCode>
<IncludeCommonTestCode Condition="($(IsTestProject) AND !($(IsBuildToolsProject)) AND !($(IsTemplatesProject)))">true</IncludeCommonTestCode>
</PropertyGroup>
<!-- Output directories -->
<PropertyGroup>
<BinDir Condition="'$(BinDir)'==''">$(ProjectDir)bin/</BinDir>
<ObjDir Condition="'$(ObjDir)'==''">$(ProjectDir)bin/obj/</ObjDir>
<BaseIntermediateOutputPath>$(ObjDir)/$(MSBuildProjectName)/</BaseIntermediateOutputPath>
<MSBuildProjectExtensionsPath>$(BaseIntermediateOutputPath)</MSBuildProjectExtensionsPath>
<ProjectAssetsFile>$(BaseIntermediateOutputPath)/project.assets.json</ProjectAssetsFile>
<WarningsAsErrors>CS4014</WarningsAsErrors>
</PropertyGroup>
<!-- Set up the default output and intermediate paths -->
<PropertyGroup>
<OutputPath Condition="'$(OutputPath)'==''">$(BinDir)$(ConfigPathSegment)/$(MSBuildProjectName)/</OutputPath>
<IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(BaseIntermediateOutputPath)</IntermediateOutputRootPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateOutputRootPath)$(MSBuildProjectName)/</IntermediateOutputPath>
</PropertyGroup>
<!-- Disable the default embedded resource behavior as we have a naming convention which is different than what the SDK uses -->
<PropertyGroup>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
</PropertyGroup>
<!-- Git versioning related items and properties -->
<PropertyGroup>
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
</PropertyGroup>
<ItemGroup Condition="!($(IsTestProject) OR $(IsSampleProject))">
<PackageReference Include="Nerdbank.GitVersioning">
<Version>3.4.244</Version>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!-- Include license file in packages -->
<Content Include="$(ProjectDir)LICENSE" Pack="true" PackagePath="\" />
</ItemGroup>
<!-- Configuring strong name signing -->
<PropertyGroup Condition="!($(IsTestProject) OR $(IsSampleProject)) AND Exists('$(ProjectDir)corewcf.snk')">
<AssemblyOriginatorKeyFile>$(ProjectDir)corewcf.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<DelaySign>false</DelaySign>
</PropertyGroup>
<PropertyGroup Condition="$(IsTestProject) AND '$(CollectCoverage)' == 'true'">
<CoverletOutput Condition="'$(CoverletOutputDir)' != '' AND '$(CoverletOutput)' == ''">$(CoverletOutputDir)/$(MSBuildProjectName).xml</CoverletOutput>
<CoverletOutputFormat Condition="'$(CoverletOutputFormat)' == ''">cobertura</CoverletOutputFormat>
</PropertyGroup>
<Import Project="$(ProjectDir)resources.props" Condition="Exists('$(ProjectDir)resources.props')" />
<Import Project="$(ProjectDir)nuspec.props" Condition="!($(IsTestProject) OR $(IsSampleProject)) AND Exists('$(ProjectDir)nuspec.props')" />
</Project>