-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
34 lines (29 loc) · 1.77 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
34 lines (29 loc) · 1.77 KB
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
<Project>
<!-- Source Link is only meaningful for packable (library) projects.
This file is imported after the project body, so IsPackable is final here. -->
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
</ItemGroup>
<!-- Shared NuGet package icon (NuGet requires a raster image, not SVG). -->
<PropertyGroup Condition="'$(IsPackable)' == 'true'">
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="$(MSBuildThisFileDirectory)assets\icon.png" Pack="true" PackagePath="\" Visible="false" />
</ItemGroup>
<!-- Full XML documentation is mandatory on the public API so DocFX can render a complete
reference. Library projects emit the doc file and FAIL the build on any undocumented
public/protected member (CS1591). Evaluated here (after the project body) so that the
IsPackable / IsTestProject flags set inside each project are already final. -->
<PropertyGroup Condition="'$(IsPackable)' == 'true' and '$(IsTestProject)' != 'true'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<WarningsAsErrors>$(WarningsAsErrors);CS1591</WarningsAsErrors>
<!-- Hold the shipping library to a zero-warning bar: every analyzer (CS/CA/IL) warning fails the build. -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!-- Test code gets the same zero-warning bar once it earns it (CS1591/CA1707 are already relaxed
for tests/** in .editorconfig, so xUnit naming and missing docs stay non-issues here). -->
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>