-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDirectory.Build.props
51 lines (44 loc) · 2.07 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
<Project>
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<ResolveNuGetPackages>true</ResolveNuGetPackages>
</PropertyGroup>
<!-- Output-related settings -->
<PropertyGroup>
<Configurations>Debug;Release</Configurations>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>true</AppendRuntimeIdentifierToOutputPath>
<SolutionDir Condition="'$(SolutionDir)'==''">$(MSBuildThisFileDirectory)</SolutionDir>
<OutputPath>$(SolutionDir)\bin\$(Configuration)\</OutputPath>
</PropertyGroup>
<!-- Some tweaks for Unit Test projects, e.g. xUnit -->
<PropertyGroup>
<IsTestProject Condition="'$(IsTestProject)' == ''">$(MSBuildProjectName.Contains('.Test'))</IsTestProject>
</PropertyGroup>
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<!-- Changing output path for xUnit tests, so it won't break actual compiled code by shipping its Newtonsoft.Json v9.0.0 -->
<OutputPath>bin\$(Configuration)\</OutputPath>
<!-- Mark the project as being a test project -->
<SonarQubeTestProject>true</SonarQubeTestProject>
</PropertyGroup>
<!-- Coverage-related settings -->
<PropertyGroup>
<CollectCoverage>true</CollectCoverage>
<CoverletOutputFormat>opencover</CoverletOutputFormat>
<CoverletOutput>$(SolutionDir)/tests/coverage/</CoverletOutput>
</PropertyGroup>
<!-- Debug-related settings -->
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
</PropertyGroup>
<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)' == 'Windows_NT' And $(TargetFramework.Contains('net4'))">
<DebugType>full</DebugType>
</PropertyGroup>
<Import Project="$(SolutionDir)\CodeAnalyzers.targets" Condition="Exists('$(SolutionDir)\CodeAnalyzers.targets')" />
</Project>