Skip to content

Commit

Permalink
Do not treat NativeAOT build warnings as errors - introduced with dot…
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanpovazan authored and rmarinho committed Feb 12, 2024
1 parent d31fd3e commit b993677
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ public void PublishNativeAOT(string id, string framework, string runtimeIdentifi
var extendedBuildProps = BuildProps;
extendedBuildProps.Add("PublishAot=true");
extendedBuildProps.Add("PublishAotUsingRuntimePack=true"); // TODO: This parameter will become obsolete https://github.com/dotnet/runtime/issues/87060
extendedBuildProps.Add("IlcTreatWarningsAsErrors=false");

Assert.IsTrue(DotnetInternal.Publish(projectFile, "Release", framework: framework, properties: extendedBuildProps, runtimeIdentifier: runtimeIdentifier),
$"Project {Path.GetFileName(projectFile)} failed to build. Check test output/attachments for errors.");
Expand All @@ -216,6 +217,7 @@ public void PublishNativeAOTCheckWarnings(string id, string framework, string ru
var extendedBuildProps = BuildProps;
extendedBuildProps.Add("PublishAot=true");
extendedBuildProps.Add("PublishAotUsingRuntimePack=true"); // TODO: This parameter will become obsolete https://github.com/dotnet/runtime/issues/87060
extendedBuildProps.Add("IlcTreatWarningsAsErrors=false");
extendedBuildProps.Add("TrimmerSingleWarn=false");

string binLogFilePath = $"publish-{DateTime.UtcNow.ToFileTimeUtc()}.binlog";
Expand Down

0 comments on commit b993677

Please sign in to comment.