-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the build compatible with .NET 9 SDK #2840
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<Project> | ||
<Import Project="build.warnings_as_errors.props" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is maddeningly difficult to get the same behavior for building .sln as .csproj for these settings. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indeed! |
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,10 @@ | |
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<PropertyGroup> | ||
<LangVersion>8.0</LangVersion> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that this was already reset to latest below this before. |
||
<LangVersion>latest</LangVersion> | ||
<AnalysisMode>Default</AnalysisMode> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
<EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
</PropertyGroup> | ||
|
||
|
@@ -18,10 +21,6 @@ | |
|
||
<!-- The stable version of the SARIF specification. --> | ||
<StableSarifVersion>2.1.0</StableSarifVersion> | ||
|
||
<AnalysisLevel>latest</AnalysisLevel> | ||
<LangVersion>latest</LangVersion> | ||
|
||
</PropertyGroup> | ||
|
||
<PropertyGroup Label="Build"> | ||
|
@@ -40,10 +39,6 @@ | |
<PackageOutputPath>$(MsBuildThisFileDirectory)..\bld\Publish\Nuget\$(Configuration)\</PackageOutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
|
||
<!-- These can change externally, breaking our build. --> | ||
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors> | ||
<HighEntropyVA>true</HighEntropyVA> | ||
<!-- The line causes the assemblies in a project's referenced NuGet packages to be | ||
copied to the output directory. If we omit it from a test project, the tests | ||
|
@@ -118,9 +113,5 @@ | |
<SourceRoot Include="$(MSBuildThisFileDirectory)/" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<EnableNETAnalyzers>True</EnableNETAnalyzers> | ||
<AnalysisMode>Default</AnalysisMode> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
</PropertyGroup> | ||
<Import Project="./build.warnings_as_errors.props" /> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Project> | ||
<!-- | ||
NOTE: We only turn on warnings-as-errors in Release because it hurts | ||
iteration time in the IDE to error out while the code is still | ||
work-in-progress. | ||
--> | ||
<PropertyGroup Label="WarningsAsErrors" Condition="'$(Configuration)' == 'Release'"> | ||
<!-- Treat compiler warnings as errors. --> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
|
||
<!-- Treat all build warnings as errors --> | ||
<MSBuildTreatWarningsAsErrors>$(TreatWarningsAsErrors)</MSBuildTreatWarningsAsErrors> | ||
|
||
<!-- | ||
NU190X are security vulnerability warnings and can trigger without code | ||
changes. Don't let them break the build. | ||
--> | ||
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors> | ||
<MSBuildWarningsNotAsErrors>$(WarningsNotAsErrors)</MSBuildWarningsNotAsErrors> | ||
|
||
<!-- | ||
We are not yet clean on new analysis introduced with .NET 9 SDK so lower | ||
the analysis level when treating warnings as errors in Release. | ||
--> | ||
<AnalysisLevel>8</AnalysisLevel> | ||
</PropertyGroup> | ||
</Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a .NET 9 SDK warning that tells us that --self-contained will no longer be the default as before when runtime identifier is specified.