-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
42 lines (34 loc) · 1.8 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
32
33
34
35
36
37
38
39
40
41
42
<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)' != '' " />
<!-- Enable .NET code analyzers for projects targeting earlier than .NET 5.0 (requires .NET 5.0
SDK or later to be installed). -->
<PropertyGroup>
<AnalysisMode Condition=" '$(AnalysisMode)' == '' ">Default</AnalysisMode>
</PropertyGroup>
<!-- Opt in to SourceLink package reference by default. -->
<PropertyGroup>
<IncludeDevelopmentPackages Condition=" '$(IncludeDevelopmentPackages)' == '' ">true</IncludeDevelopmentPackages>
</PropertyGroup>
<!-- SourceLink settings. -->
<PropertyGroup Condition=" '$(IncludeDevelopmentPackages)' == 'true' ">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup Condition=" '$(IncludeDevelopmentPackages)' == 'true' ">
<!-- SourceLink NuGet Package -->
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- .NET Framework targeting (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>