|
35 | 35 | <ProdConManifestFile>$(PackageReportDir)prodcon-build.xml</ProdConManifestFile>
|
36 | 36 | </PropertyGroup>
|
37 | 37 |
|
| 38 | + <UsingTask TaskName="Microsoft.DotNet.UnifiedBuild.Tasks.ReplaceTextInFile" AssemblyFile="$(MicrosoftDotNetUnifiedBuildTasksAssembly)" TaskFactory="TaskHostFactory" /> |
| 39 | + <Target Name="AddNoWarns" |
| 40 | + Condition=" EXISTS('$(ProjectDirectory)Directory.Build.props') OR EXISTS('$(ProjectDirectory)src/Directory.Build.props') " |
| 41 | + Inputs="$(MSBuildProjectFullPath)" |
| 42 | + Outputs="$(RepoCompletedSemaphorePath)AddNoWarns.complete" > |
| 43 | + |
| 44 | + <!-- Don't warn on warnings that can be generated in source-build |
| 45 | + but not necessarily in repo builds. |
| 46 | + NU1603 - See https://github.com/dotnet/source-build/issues/2766. |
| 47 | + NU5104 - During preview builds, some packages have pre-release versions. |
| 48 | + Some repos with stable versions may need to uptake these packages |
| 49 | + with pre-release versions because of PVP when building with |
| 50 | + source-build. --> |
| 51 | + <PropertyGroup> |
| 52 | + <OldText><![CDATA[</Project>]]></OldText> |
| 53 | + <NewText> |
| 54 | + <![CDATA[ <PropertyGroup> |
| 55 | + <NoWarn>%24(NoWarn);NU1903;$(RepoNoWarns)</NoWarn> |
| 56 | + </PropertyGroup> |
| 57 | +</Project>]]> |
| 58 | + </NewText> |
| 59 | + |
| 60 | + <DirectoryBuildPropsFile Condition=" EXISTS('$(ProjectDirectory)Directory.Build.props') ">$(ProjectDirectory)Directory.Build.props</DirectoryBuildPropsFile> |
| 61 | + <DirectoryBuildPropsFile Condition=" '$(DirectoryBuildPropsFile)' == '' AND EXISTS('$(ProjectDirectory)src/Directory.Build.props') ">$(ProjectDirectory)src/Directory.Build.props</DirectoryBuildPropsFile> |
| 62 | + </PropertyGroup> |
| 63 | + <ReplaceTextInFile InputFile="$(DirectoryBuildPropsFile)" |
| 64 | + OldText="$(OldText)" |
| 65 | + NewText="$(NewText)" /> |
| 66 | + </Target> |
| 67 | + |
38 | 68 | <!-- Returns the repository references of this project and all the projects this project references, recursively -->
|
39 | 69 | <Target Name="GetTransitiveRepositoryReferences" Returns="@(TransitiveRepositoryReference)">
|
40 | 70 | <ItemGroup>
|
|
392 | 422 | Outputs="$(BaseIntermediateOutputPath)Build.complete"
|
393 | 423 | Condition="'$(BuildCommand)' != ''"
|
394 | 424 | DependsOnTargets="BuildRepoReferences;
|
| 425 | + AddNoWarns; |
395 | 426 | UpdateNuGetConfig;
|
396 | 427 | UpdateGlobalJsonVersions;
|
397 | 428 | UpdateEngCommonFiles;
|
|
0 commit comments