Add source-build nowarns

This commit is contained in:
MichaelSimons 2022-11-04 22:32:47 +00:00
parent 9a7d9672f2
commit 59302f09ea
3 changed files with 6 additions and 3 deletions

View file

@ -85,11 +85,11 @@
NewText="/p:RepoRoot="$repo_root/"" />
</Target>
<Target Name="AddCommonNoWarns"
<Target Name="AddNoWarns"
BeforeTargets="Build"
Condition=" EXISTS('$(ProjectDirectory)Directory.Build.props') OR EXISTS('$(ProjectDirectory)src/Directory.Build.props') "
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(RepoCompletedSemaphorePath)AddCommonNoWarns.complete" >
Outputs="$(RepoCompletedSemaphorePath)AddNoWarns.complete" >
<!-- Don't warn on warnings that can be generated in source-build
but not necessarily in repo builds.
@ -104,7 +104,7 @@
<OldText><![CDATA[</Project>]]></OldText>
<NewText>
<![CDATA[ <PropertyGroup>
<NoWarn>%24(NoWarn);NU5104;NU1603</NoWarn>
<NoWarn>%24(NoWarn);NU5104;NU1603;$(RepoNoWarns)</NoWarn>
</PropertyGroup>
</Project>]]>
</NewText>

View file

@ -7,6 +7,7 @@
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
<RepoNoWarns>CS9057</RepoNoWarns>
</PropertyGroup>
<ItemGroup>

View file

@ -46,6 +46,8 @@
<!-- This repo uses text-only template packages from the internal transport feed. -->
<SetUpInternalTransportFeed>true</SetUpInternalTransportFeed>
<RepoNoWarns>CS9057</RepoNoWarns>
</PropertyGroup>
<ItemGroup>