Skip to content

Commit 9e66f38

Browse files
committed
Do not treat NativeAOT build warnings as errors - introduced with dotnet/runtime#96567
1 parent 5192d07 commit 9e66f38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/TestUtils/src/Microsoft.Maui.IntegrationTests/TemplateTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ public void PublishNativeAOT(string id, string framework, string runtimeIdentifi
195195
var extendedBuildProps = BuildProps;
196196
extendedBuildProps.Add("PublishAot=true");
197197
extendedBuildProps.Add("PublishAotUsingRuntimePack=true"); // TODO: This parameter will become obsolete https://github.com/dotnet/runtime/issues/87060
198+
extendedBuildProps.Add("IlcTreatWarningsAsErrors=false");
198199

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

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

0 commit comments

Comments
 (0)