generated from wazzamatazz/csharp-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
31 lines (25 loc) · 1.46 KB
/
Directory.Build.targets
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
<Project>
<!-- Recursively import the Directory.Build.targets file from the parent folder if it exists. -->
<PropertyGroup>
<ParentProject>$([MSBuild]::GetPathOfFileAbove('$(MSBuildThisFile)', '$(MSBuildThisFileDirectory)../'))</ParentProject>
</PropertyGroup>
<Import Project="$(ParentProject)" Condition=" '$(ParentProject)' != '' " />
<!-- Opt in to .NET analyzer package references by default. Projects in the
samples and test folders are pre-configured to opt out. -->
<PropertyGroup>
<IncludeDevelopmentPackages Condition=" '$(IncludeDevelopmentPackages)' == '' ">true</IncludeDevelopmentPackages>
</PropertyGroup>
<ItemGroup Condition=" '$(IncludeDevelopmentPackages)' == 'true' ">
<!-- .NET Analyzers NuGet Package -->
<PackageReference Remove="Microsoft.CodeAnalysis.NetAnalyzers" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="$(MicrosoftCodeAnalysisNetAnalyzersVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- .NET Framework targeting support (required to allow compilation against .NET Framework in
non-Windows environments). -->
<Import Project=".\build\NetFX.targets" />
<!-- Extension point to allow Continuous Integration systems to inject their own configuration. -->
<Import Project="CI.targets" Condition="Exists('CI.targets')" />
</Project>