Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,6 @@ public static void AssertWarnings(this List<WarningsPerFile> actualWarnings, Lis
// IMPORTANT: Always store expected File information as a relative path to the repo ROOT
private static readonly List<WarningsPerFile> expectedNativeAOTWarnings = new()
{
new WarningsPerFile
{
File = "ILC",
WarningsPerCode = new List<WarningsPerCode>
{
new WarningsPerCode
{
Code = "IL3050",
Messages = new List<string>
{
"<Module>..cctor(): Using member 'System.Enum.GetValues(Type)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. It might not be possible to create an array of the enum type at runtime. Use the GetValues<TEnum> overload or the GetValuesAsUnderlyingType method instead.",
}
},
}
},
new WarningsPerFile
{
File = "src/Controls/src/Xaml/XamlParser.cs",
Expand Down