You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite how we swap assemblies out as part of NativeAOT to specifically check that they're coming from the runtime pack instead of checking file version numbers and using that as a heuristic for the same thing. (#111944)
// If the assembly is part of the Microsoft.NETCore.App.Runtime runtime pack, we want to swap it with the corresponding package from the NativeAOT SDK.
145
+
// Otherwise we want to use the assembly the user has referenced.
Log.LogError($"Overriding System.Private.CoreLib.dll with a newer version is not supported. Attempted to use {itemSpec} instead of {frameworkItem.ItemSpec}.");
168
-
}
169
-
else
170
-
{
171
-
// Allow OOB references with higher version to take precedence over the framework assemblies.
172
-
list.Add(taskItem);
173
-
}
148
+
// The assembly was overridden by an OOB package through standard .NET SDK conflict resolution.
149
+
// Use that version instead of swapping to the NativeAOT one.
// Validate that we aren't trying to use an older NativeAOT package against a newer non-NativeAOT runtime pack.
155
+
// That's not supported.
156
+
Log.LogError($"Overriding System.Private.CoreLib.dll with a newer version is not supported. Attempted to use {itemSpec} instead of {frameworkItem.ItemSpec}.");
174
157
}
175
158
176
159
assembliesToSkipPublish.Add(taskItem);
177
160
continue;
178
161
}
179
162
163
+
// For all other files, check if they are managed assemblies.
164
+
// If they're managed, skip publishing them and categorize them correctly as inputs to ILC.
165
+
// If they're not managed assemblies, then they're native dependencies. Allow them to be published.
0 commit comments