Similar to https://github.com/dotnet/runtime/issues/44033, using the WebAssembly runtime, the IL Linker may fail when processing one of these assemblies (left is an assembly of the artifacts, right is an assembly not in the artifacts):
mscorlib -> System.Security.Permissions
mscorlib -> System.Threading.AccessControl
System.Configuration -> System.Configuration.ConfigurationManager
System.Configuration -> System.Security.Permissions
System.Core -> System.Diagnostics.EventLog
System.Core -> System.Diagnostics.PerformanceCounter
System.Data -> System.Data.SqlClient
System.Data -> System.Security.Permissions
System.Data -> System.Data.Odbc
System.Data -> System.Data.OleDb
System -> System.CodeDom
System -> Microsoft.Win32.SystemEvents
System -> System.Configuration.ConfigurationManager
System -> System.Diagnostics.PerformanceCounter
System -> System.Diagnostics.EventLog
System -> System.Security.Permissions
System -> System.IO.Ports
System -> System.Windows.Extensions
System -> System.Threading.AccessControl
System.Drawing -> System.Drawing.Common
System.Drawing -> System.Configuration.ConfigurationManager
System.Drawing -> System.Security.Permissions
System.Net -> System.Security.Permissions
System.Net.Http -> System.Net.Quic
System.Security -> System.Security.Cryptography.Pkcs
System.Security -> System.Security.Cryptography.ProtectedData
System.Security -> System.Windows.Extensions
System.Security -> System.Security.Cryptography.Xml
System.Security -> System.Security.Permissions
System.ServiceModel.Web -> System.ServiceModel.Syndication
System.ServiceProcess -> System.ServiceProcess.ServiceController
System.ServiceProcess -> System.Security.Permissions
System.Transactions -> System.Security.Permissions
WindowsBase -> System.IO.Packaging
WindowsBase -> System.Security.Permissions
The list was generate this way:
using System;
using System.IO;
string BasePath = @"XXX\runtimes\browser-wasm\lib\net6.0";
foreach(var file in Directory.GetFiles(BasePath, "*.dll"))
{
var definition = Mono.Cecil.AssemblyDefinition.ReadAssembly(file);
foreach(var module in definition.Modules)
{
foreach(var asmref in module.AssemblyReferences)
{
if (asmref.Name != "System.Private.CoreLib")
{
if (!File.Exists(Path.Combine(BasePath, asmref.Name + ".dll")))
{
Console.WriteLine(definition.Name.Name + " -> " + asmref.Name);
}
}
}
}
}
Runtime: d84d05f898c6e46d46af6752fc1604fe639065c9
Linker: mono/linker@63377a08
Unknown.
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @jeffhandley
See info in area-owners.md if you want to be subscribed.
Just to correct a small nit on this, what are missing is runtime assemblies not reference assemblies.
cc: @akoeplinger
System.Net.Http -> System.Net.Quic
is relevant the rest is a duplicate of #35401. You are responsible for adding out-of-band packages if you are using .NET Framework assemblies.
@marek-safar in this case, this is not Xamarin related. All references that lead to this are netstandard2.0. Does this mean that there should be some additional meta-nuget package that includes all missing references ?
There is nothing Xamarin related on this, you are running in .NET Framework compatibility mode if you need these assemblies which has an extra price.
Does this mean that there should be some additional meta-nuget package that includes all missing references
I don't think there is any meta-package, you pick the ones you need e.g. https://www.nuget.org/packages/System.Configuration.ConfigurationManager
The meta-package is Microsoft.Windows.Compatibility. This meta-package is designed to help with porting large .NET Framework applications that depend on many of the components that are not inbox on .NET Core/.NET 5+. Mode details in https://docs.microsoft.com/en-us/dotnet/core/porting/windows-compat-pack.
This packages fixes the reference issues, thanks @jkotas !
Most helpful comment
is relevant the rest is a duplicate of #35401. You are responsible for adding out-of-band packages if you are using .NET Framework assemblies.