Skip to content

Stop injecting NoWarns into repo's Directory.Build.props #3117

@MichaelSimons

Description

@MichaelSimons

The source-build infrastructure injects some NoWarns into the repo's Directory.Build.props. This is to handle some scenarios that come up in source build because of the way dependencies flow in source build. This approach is not compatible with the VMR in which source-build is built inside the context of a git repo. Checked in files should not be manipulated in place as this break dev UX. An alternative approach will be necessary going forward. Likely, the most reasonable approach is to make these changes within the repos that require them. This is most feasible in the .NET 9.0 timeframe. For the 8.0 timeframe, an alternative approach may be needed.

Sample manipulated Directory.Build.props:

[root@eec4fefb31f6 tarball]# git diff src/arcade/Directory.Build.props
diff --git a/src/arcade/Directory.Build.props b/src/arcade/Directory.Build.props
index 6bab8b78e..d11fb2749 100644
--- a/src/arcade/Directory.Build.props
+++ b/src/arcade/Directory.Build.props
@@ -27,4 +27,7 @@
     <MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>$(MicrosoftCodeAnalysisCSharpVersion)</MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>
   </PropertyGroup>

+  <PropertyGroup>
+    <NoWarn>$(NoWarn);NU5104;NU1603;</NoWarn>
+  </PropertyGroup>
 </Project>

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions