_From @ivanchev on Friday, 08 February 2019 09:55:31_
If you create a class library with some IQueryable extensions, for instance:
public static int CustomCount(this IQueryable source)
{
if (source == null) throw new ArgumentNullException("source");
return source.Provider.Execute<int>(
Expression.Call(
typeof(Queryable), "Count",
new Type[] { source.ElementType }, source.Expression));
}
Using that in a WebAssembly Blazor project produces error.
components.webassembly.js:1 WASM: 锘縖System.InvalidOperationException] No generic method 'Count' on type 'System.Linq.Queryable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.
Steps to reproduce the behavior:
protected override async Task OnInitAsync()
{
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("sample-data/weather.json");
var count = forecasts.AsQueryable().CustomCount();
}
No error thrown.
If you disable the IL Linker the issue is not observed:
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
Tested with both 0.7 and 0.8 versions.
_Copied from original issue: aspnet/AspNetCore#7383_
_From @danroth27 on Saturday, 09 February 2019 00:16:42_
@ivanchev Thanks for reporting this issue!
Since this appears to be an IL linker issue I'm going to move this over to the Mono folks.
I'm having trouble reproducing this. I've attached the test case I'm using
QueryableTest.zip
Reproduced it now, looking into it
@marek-safar I can reproduce with the mono/linker master 6b87e44f
adding <type fullname="System.Linq.Queryable*" /> to Linker.xml in the System.Core sections should work around the issue while we investigate.
Simple test case for the linker
using System;
using System.Linq.Expressions;
using System.Linq;
namespace Mono.Linker.Tests.Cases.Expressions {
public class QueryableUsedViaExpression {
public static void Main ()
{
var q = "Test".AsQueryable ();
var count = CallQueryableCount (q);
// q.Count ();
Console.WriteLine ($"count: {count}");
}
public static int CallQueryableCount (IQueryable source)
{
return source.Provider.Execute<int> (
Expression.Call (
typeof (Queryable), "Count",
new Type [] { source.ElementType }, source.Expression));
}
}
}
@marek-safar I can reproduce with the mono/linker master 6b87e44f
adding
<type fullname="System.Linq.Queryable*" />to Linker.xml in the System.Core sections should work around the issue while we investigate.
Would this "work around" work for us on our UI component library? We're still waiting on a fix.
Having our customers disable Linker makes Blazor quite bloated.
@EdCharbeneau yes
see https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/blazor/configure-linker?view=aspnetcore-3.0 for instructions the relevant section to add to a linker.xml
<assembly fullname="System.Core">
<type fullname="System.Linq.Queryable*" />
</assembly>
Or if you are distributing an assembly I believe you can embed that descriptor in the assembly by embedding a linker resource in your assemble 'My.Assembly` by adding something like
<ItemGroup>
<EmbeddedResource Include="WebAssembly.xml">
<LogicalName>My.Assembly.xml</LogicalName>
</EmbeddedResource>
</ItemGroup>
to your .csprog
I am wondering if the issue I am having is related to this.
I am using Blazor to query documents in Cosmos DB, and having issues with the return from the following method.
In My Razor Page
IDocumentQuery
UriFactory.CreateDocumentCollectionUri(DatabaseId, CollectionId),
new FeedOptions { MaxItemCount = -1, EnableCrossPartitionQuery = true })
.Where(o => o.Active == true).AsDocumentQuery();
Gives me this error:
WASM: System.TypeLoadException: Could not resolve type with token 0100003b from typeref (expected class 'System.Linq.IOrderedQueryable`1' in assembly 'Microsoft.AspNetCore.Blazor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60')
It seems that there is some issue with IOrderedQueryable. CreateDocumentQuery returns the type IOrderedQueryable, and I can't change that. Even converting to List, etc. still gives me this error above. Is there some workaround for this?
I have tried the above, but all added System.Linq.IOrderedQueryable as a Type in the Linker.XML, but that just caused a bunch of other errors....
@lewing The suggested workaround with linker configuration doesn't seem to work when distributing an assembly. No matter the configuration file it just doesn't seem to get picked up by the linker. Are there any extra steps?
We don't support this dynamic code in linker right now and the workaround with using reflection (methodinfo) won't work either as the method is generic with generic type argument which cannot be expressed using reflection APIs.
If this is quite common we could extend the linker to have detection support for simple Expression cases like
Expression.Call(typeof(Queryable) /* Declaring Type */, "Count" /* Method Name */, new Type[] /* arity */)
@marek-safar This usage is common for component vendors seeking to implement Grid components that support sorting, filtering, paging, etc. Right now, these component vendors have to tell their customers to disable the linker to work around this issue.
@danroth27 ok, we will address that at the linker level
Any updates to this?
Fixed in master with #16014
I still receive an error when using our libs that contain IQueryable extensions. Is there anything I need to do in addition to updating to the latest build?
Error follows
Severity Code Description Project File Line Suppression State Suppression State
Error MSB3073 The command "dotnet "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.blazor.mono\3.0.0-preview9.19456.1\build\netstandard1.0\../../tools/illink/illink.dll" -l none --disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true -d "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.blazor.mono\3.0.0-preview9.19456.1\build\netstandard1.0\../../tools/mono/bcl/" -d "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.blazor.mono\3.0.0-preview9.19456.1\build\netstandard1.0\../../tools/mono/bcl/Facades/" -o "C:\Users\edcha\source\Telerik\TelerikBlazor\TelerikBlazor\obj\Debug\netstandard2.0\blazor\linker/" -x "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.blazor.build\3.0.0-preview9.19457.4\targets\BuiltInBclLinkerDescriptor.xml" -x "C:\Users\edcha\source\Telerik\TelerikBlazor\TelerikBlazor\obj\Debug\netstandard2.0\blazor\linker.descriptor.xml" -a "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.authorization\3.0.0-rc1.19457.4\lib\netstandard2.0\Microsoft.AspNetCore.Authorization.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.blazor\3.0.0-preview9.19457.4\lib\netstandard2.0\Microsoft.AspNetCore.Blazor.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.blazor.httpclient\3.0.0-preview9.19457.4\lib\netstandard2.0\Microsoft.AspNetCore.Blazor.HttpClient.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.components\3.0.0-rc1.19457.4\lib\netstandard2.0\Microsoft.AspNetCore.Components.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.components.forms\3.0.0-rc1.19457.4\lib\netstandard2.0\Microsoft.AspNetCore.Components.Forms.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.components.web\3.0.0-rc1.19457.4\lib\netstandard2.0\Microsoft.AspNetCore.Components.Web.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.metadata\3.0.0-rc1.19457.4\lib\netstandard2.0\Microsoft.AspNetCore.Metadata.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.bcl.asyncinterfaces\1.0.0-rc1.19456.4\lib\netstandard2.0\Microsoft.Bcl.AsyncInterfaces.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.csharp\4.5.0\lib\netstandard2.0\Microsoft.CSharp.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.dotnet.internalabstractions\1.0.0\lib\netstandard1.3\Microsoft.DotNet.InternalAbstractions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.dotnet.platformabstractions\2.1.0\lib\netstandard1.3\Microsoft.DotNet.PlatformAbstractions.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.extensions.dependencyinjection\3.0.0-rc1.19456.10\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.extensions.dependencyinjection.abstractions\3.0.0-rc1.19456.10\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.dependencymodel\2.1.0\lib\netstandard1.6\Microsoft.Extensions.DependencyModel.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.extensions.logging.abstractions\3.0.0-rc1.19456.10\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.extensions.options\3.0.0-rc1.19456.10\lib\netstandard2.0\Microsoft.Extensions.Options.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.extensions.primitives\3.0.0-rc1.19456.10\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.jsinterop\3.0.0-rc1.19456.10\lib\netstandard2.0\Microsoft.JSInterop.dll" -a "C:\Users\edcha\.nuget\packages\mono.webassembly.interop\3.0.0-rc1.19456.10\lib\netstandard2.0\Mono.WebAssembly.Interop.dll" -a "C:\Users\edcha\.nuget\packages\newtonsoft.json\12.0.1\lib\netstandard2.0\Newtonsoft.Json.dll" -a "C:\Users\edcha\.nuget\packages\system.appcontext\4.3.0\lib\netstandard1.6\System.AppContext.dll" -a "C:\Users\edcha\.nuget\packages\system.buffers\4.5.0\lib\netstandard2.0\System.Buffers.dll" -a "C:\Users\edcha\.nuget\packages\system.collections.concurrent\4.3.0\lib\netstandard1.3\System.Collections.Concurrent.dll" -a "C:\Users\edcha\.nuget\packages\system.collections.immutable\1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll" -a "C:\Users\edcha\.nuget\packages\system.componentmodel.annotations\4.6.0-rc1.19456.4\lib\netstandard2.0\System.ComponentModel.Annotations.dll" -a "C:\Users\edcha\.nuget\packages\system.data.common\4.3.0\lib\netstandard1.2\System.Data.Common.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.diagnostics.stacktrace\4.3.0\lib\netstandard1.3\System.Diagnostics.StackTrace.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.dynamic.runtime\4.3.0\lib\netstandard1.3\System.Dynamic.Runtime.dll" -a "C:\Users\edcha\.nuget\packages\system.io.filesystem.primitives\4.3.0\lib\netstandard1.3\System.IO.FileSystem.Primitives.dll" -a "C:\Users\edcha\.nuget\packages\system.linq\4.3.0\lib\netstandard1.6\System.Linq.dll" -a "C:\Users\edcha\.nuget\packages\system.linq.expressions\4.3.0\lib\netstandard1.6\System.Linq.Expressions.dll" -a "C:\Users\edcha\.nuget\packages\system.linq.queryable\4.3.0\lib\netstandard1.3\System.Linq.Queryable.dll" -a "C:\Users\edcha\.nuget\packages\system.memory\4.5.3\lib\netstandard2.0\System.Memory.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.numerics.vectors\4.5.0\lib\netstandard2.0\System.Numerics.Vectors.dll" -a "C:\Users\edcha\.nuget\packages\system.objectmodel\4.3.0\lib\netstandard1.3\System.ObjectModel.dll" -a "C:\Users\edcha\.nuget\packages\system.reflection.emit\4.3.0\lib\netstandard1.3\System.Reflection.Emit.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.reflection.emit.ilgeneration\4.3.0\lib\netstandard1.3\System.Reflection.Emit.ILGeneration.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.reflection.emit.lightweight\4.3.0\lib\netstandard1.3\System.Reflection.Emit.Lightweight.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.reflection.metadata\1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.reflection.typeextensions\4.3.0\lib\netstandard1.5\System.Reflection.TypeExtensions.dll" -a "C:\Users\edcha\.nuget\packages\system.runtime.compilerservices.unsafe\4.6.0-rc1.19456.4\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll" -a "C:\Users\edcha\.nuget\packages\system.runtime.loader\4.3.0\lib\netstandard1.5\System.Runtime.Loader.dll" -a "C:\Users\edcha\.nuget\packages\system.runtime.numerics\4.3.0\lib\netstandard1.3\System.Runtime.Numerics.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.security.cryptography.openssl\4.3.0\lib\netstandard1.6\System.Security.Cryptography.OpenSsl.dll" -a "C:\Users\edcha\.nuget\packages\system.security.cryptography.primitives\4.3.0\lib\netstandard1.3\System.Security.Cryptography.Primitives.dll" -a "C:\Users\edcha\.nuget\packages\system.text.encodings.web\4.6.0-rc1.19456.4\lib\netstandard2.0\System.Text.Encodings.Web.dll" -a "C:\Users\edcha\.nuget\packages\system.text.json\4.6.0-rc1.19456.4\lib\netstandard2.0\System.Text.Json.dll" -a "C:\Users\edcha\.nuget\packages\system.text.regularexpressions\4.3.0\lib\netstandard1.6\System.Text.RegularExpressions.dll" -a "C:\Users\edcha\.nuget\packages\system.threading\4.3.0\lib\netstandard1.3\System.Threading.dll" -a "C:\Users\edcha\.nuget\packages\system.threading.tasks.extensions\4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.threading.tasks.parallel\4.3.0\lib\netstandard1.3\System.Threading.Tasks.Parallel.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.threading.thread\4.3.0\lib\netstandard1.3\System.Threading.Thread.dll" -a "C:\Users\edcha\.nuget\packages\system.valuetuple\4.3.0\lib\netstandard1.0\System.ValueTuple.dll" -a "C:\Users\edcha\.nuget\packages\system.xml.readerwriter\4.3.0\lib\netstandard1.3\System.Xml.ReaderWriter.dll" -a "C:\Users\edcha\.nuget\packages\system.xml.xdocument\4.3.0\lib\netstandard1.3\System.Xml.XDocument.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.xml.xmldocument\4.3.0\lib\netstandard1.3\System.Xml.XmlDocument.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.xml.xpath\4.3.0\lib\netstandard1.3\System.Xml.XPath.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.xml.xpath.xdocument\4.3.0\lib\netstandard1.3\System.Xml.XPath.XDocument.dll" -a "C:\Users\edcha\.nuget\packages\telerik.datasource\1.1.0\lib\netstandard2.0\Telerik.DataSource.dll" -a "C:\Users\edcha\.nuget\packages\telerik.ui.for.blazor\2.0.0\lib\netstandard2.0\Telerik.Blazor.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\cs\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\de\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\es\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\fr\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\it\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\ja\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\ko\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\pl\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\pt-BR\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\ru\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\tr\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\zh-Hans\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.common\2.10.0\lib\netstandard1.3\zh-Hant\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\cs\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\de\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\es\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\fr\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\it\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\ja\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\ko\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\pl\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\pt-BR\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\ru\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\tr\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\zh-Hans\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\.nuget\packages\microsoft.codeanalysis.csharp\2.10.0\lib\netstandard1.3\zh-Hant\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\edcha\source\Telerik\TelerikBlazor\TelerikBlazor\obj\Debug\netstandard2.0\TelerikBlazor.dll"" exited with code -532462766. TelerikBlazor C:\Users\edcha\.nuget\packages\microsoft.aspnetcore.blazor.build\3.0.0-preview9.19457.4\targets\Blazor.MonoRuntime.targets 441
@marek-safar any advice? ^
I'll reopen this and take a look
@EdCharbeneau do you have any repro or exception stack trace?
@marek-safar Just follow https://docs.telerik.com/blazor-ui/getting-started/client-blazor, but remove the step to add <BlazorLinkOnBuild>false</BlazorLinkOnBuild>.
1>------ Build started: Project: BlazorApp11.Client, Configuration: Debug Any CPU ------
1>You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
1>BlazorApp11.Client -> C:\Users\user\source\repos\BlazorApp11\BlazorApp11\Client\bin\Debug\netstandard2.0\BlazorApp11.Client.dll
1>Cannot find declaration of exported type 'System.Threading.Semaphore' from the assembly 'System.Threading, Version=4.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1>Cannot find declaration of exported type 'System.Runtime.Loader.AssemblyLoadContext' from the assembly 'System.Runtime.Loader, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1>Processing embedded resource linker descriptor: mscorlib.xml
1>Processing embedded resource linker descriptor: System.Text.Json.xml
1>Processing embedded resource linker descriptor: System.Text.Encodings.Web.xml
1>Processing embedded resource linker descriptor: Microsoft.CSharp.xml
1>Duplicate preserve in resource Microsoft.CSharp.xml in Microsoft.CSharp, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a of Microsoft.CSharp.RuntimeBinder.DynamicMetaObjectProviderDebugView (Nothing). Duplicate uses (All)
1>Duplicate preserve in resource Microsoft.CSharp.xml in Microsoft.CSharp, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a of Microsoft.CSharp.RuntimeBinder.DynamicMetaObjectProviderDebugView/DynamicDebugViewEmptyException (Nothing). Duplicate uses (All)
1>Duplicate preserve in resource System.Text.Encodings.Web.xml in System.Text.Encodings.Web, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Text.Encodings.Web.TextEncoder (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource System.Text.Encodings.Web.xml in System.Text.Encodings.Web, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Buffers.OperationStatus System.Text.Encodings.Web.TextEncoder::EncodeUtf8Shim(System.Text.Encodings.Web.TextEncoder,System.ReadOnlySpan`1<System.Byte>,System.Span`1<System.Byte>,System.Int32&,System.Int32&,System.Boolean)
1>Duplicate preserve in resource System.Text.Encodings.Web.xml in System.Text.Encodings.Web, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Int32 System.Text.Encodings.Web.TextEncoder::FindFirstCharacterToEncodeUtf8Shim(System.Text.Encodings.Web.TextEncoder,System.ReadOnlySpan`1<System.Byte>)
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Text.Json.JsonPropertyInfoNullable`2 (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Void System.Text.Json.JsonPropertyInfoNullable`2::.ctor()
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Text.Json.Serialization.JsonPropertyInfoNotNullableContravariant`4 (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Void System.Text.Json.Serialization.JsonPropertyInfoNotNullableContravariant`4::.ctor()
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Text.Json.Serialization.Converters.JsonConverterEnum`1 (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Void System.Text.Json.Serialization.Converters.JsonConverterEnum`1::.ctor(System.Text.Json.Serialization.Converters.EnumConverterOptions)
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Void System.Text.Json.Serialization.Converters.JsonConverterEnum`1::.ctor(System.Text.Json.Serialization.Converters.EnumConverterOptions,System.Text.Json.JsonNamingPolicy)
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Text.Json.Serialization.Converters.JsonKeyValuePairConverter`2 (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource System.Text.Json.xml in System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 of System.Void System.Text.Json.Serialization.Converters.JsonKeyValuePairConverter`2::.ctor()
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Threading.ExecutionContext (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Threading.ExecutionContext System.Threading.ExecutionContext::Capture()
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Threading.ExecutionContext System.Threading.ExecutionContext::Capture(System.Threading.StackCrawlMark&,System.Threading.ExecutionContext/CaptureOptions)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Threading.Interlocked (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Int32 System.Threading.Interlocked::CompareExchange(System.Int32&,System.Int32,System.Int32)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Int32 System.Threading.Interlocked::CompareExchange(System.Int32&,System.Int32,System.Int32,System.Boolean&)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Void System.Threading.Interlocked::CompareExchange(System.Object&,System.Object&,System.Object&,System.Object&)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Object System.Threading.Interlocked::CompareExchange(System.Object&,System.Object,System.Object)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Single System.Threading.Interlocked::CompareExchange(System.Single&,System.Single,System.Single)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Int64 System.Threading.Interlocked::CompareExchange(System.Int64&,System.Int64,System.Int64)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.IntPtr System.Threading.Interlocked::CompareExchange(System.IntPtr&,System.IntPtr,System.IntPtr)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Double System.Threading.Interlocked::CompareExchange(System.Double&,System.Double,System.Double)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of T System.Threading.Interlocked::CompareExchange(T&,T,T)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Int32 System.Threading.Interlocked::Exchange(System.Int32&,System.Int32)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Void System.Threading.Interlocked::Exchange(System.Object&,System.Object&,System.Object&)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Object System.Threading.Interlocked::Exchange(System.Object&,System.Object)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Single System.Threading.Interlocked::Exchange(System.Single&,System.Single)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Int64 System.Threading.Interlocked::Exchange(System.Int64&,System.Int64)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.IntPtr System.Threading.Interlocked::Exchange(System.IntPtr&,System.IntPtr)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Double System.Threading.Interlocked::Exchange(System.Double&,System.Double)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of T System.Threading.Interlocked::Exchange(T&,T)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Threading.Monitor (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Void System.Threading.Monitor::Enter(System.Object)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Void System.Threading.Monitor::Enter(System.Object,System.Boolean&)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Void System.Threading.Monitor::Exit(System.Object)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Threading.ManualResetEvent (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Void System.Threading.ManualResetEvent::.ctor(System.Boolean)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Threading.SynchronizationLockException (Nothing). Duplicate uses (Nothing)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Void System.Threading.SynchronizationLockException::.ctor(System.String)
1>Duplicate preserve in resource mscorlib.xml in mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e of System.Threading.WasmRuntime (All). Duplicate uses (All)
1>Fatal error in IL Linker
1>
1>Unhandled Exception: Mono.Cecil.ResolutionException: Failed to resolve System.Runtime.Loader.AssemblyLoadContext
1> at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)
1> at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
1> at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
1> at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
1> at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
1> at Mono.Linker.Steps.MarkStep.Initialize()
1> at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
1> at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
1> at Mono.Linker.Pipeline.Process(LinkContext context)
1> at Mono.Linker.Driver.Run(ILogger customLogger)
1> at Mono.Linker.Driver.Execute(String[] args, ILogger customLogger)
1> at Mono.Linker.Driver.Main(String[] args)
1>C:\Users\user\.nuget\packages\microsoft.aspnetcore.blazor.build\3.1.0-preview1.19508.20\targets\Blazor.MonoRuntime.targets(441,5): error MSB3073: The command "dotnet "C:\Users\user\.nuget\packages\microsoft.aspnetcore.blazor.mono\3.1.0-preview1.19503.1\build\netstandard1.0\../../tools/illink/illink.dll" -l none --disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true -d "C:\Users\user\.nuget\packages\microsoft.aspnetcore.blazor.mono\3.1.0-preview1.19503.1\build\netstandard1.0\../../tools/mono/bcl/" -d "C:\Users\user\.nuget\packages\microsoft.aspnetcore.blazor.mono\3.1.0-preview1.19503.1\build\netstandard1.0\../../tools/mono/bcl/Facades/" -o "C:\Users\user\source\repos\BlazorApp11\BlazorApp11\Client\obj\Debug\netstandard2.0\blazor\linker/" -x "C:\Users\user\.nuget\packages\microsoft.aspnetcore.blazor.build\3.1.0-preview1.19508.20\targets\BuiltInBclLinkerDescriptor.xml" -x "C:\Users\user\source\repos\BlazorApp11\BlazorApp11\Client\obj\Debug\netstandard2.0\blazor\linker.descriptor.xml" -a "C:\Users\user\.nuget\packages\microsoft.aspnetcore.authorization\3.1.0-preview1.19508.20\lib\netstandard2.0\Microsoft.AspNetCore.Authorization.dll" -a "C:\Users\user\.nuget\packages\microsoft.aspnetcore.blazor\3.1.0-preview1.19508.20\lib\netstandard2.0\Microsoft.AspNetCore.Blazor.dll" -a "C:\Users\user\.nuget\packages\microsoft.aspnetcore.blazor.httpclient\3.1.0-preview1.19508.20\lib\netstandard2.0\Microsoft.AspNetCore.Blazor.HttpClient.dll" -a "C:\Users\user\.nuget\packages\microsoft.aspnetcore.components\3.1.0-preview1.19508.20\lib\netstandard2.0\Microsoft.AspNetCore.Components.dll" -a "C:\Users\user\.nuget\packages\microsoft.aspnetcore.components.forms\3.1.0-preview1.19508.20\lib\netstandard2.0\Microsoft.AspNetCore.Components.Forms.dll" -a "C:\Users\user\.nuget\packages\microsoft.aspnetcore.components.web\3.1.0-preview1.19508.20\lib\netstandard2.0\Microsoft.AspNetCore.Components.Web.dll" -a "C:\Users\user\.nuget\packages\microsoft.aspnetcore.metadata\3.1.0-preview1.19508.20\lib\netstandard2.0\Microsoft.AspNetCore.Metadata.dll" -a "C:\Users\user\.nuget\packages\microsoft.bcl.asyncinterfaces\1.1.0-preview1.19504.10\lib\netstandard2.0\Microsoft.Bcl.AsyncInterfaces.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\Microsoft.CodeAnalysis.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll" -a "C:\Users\user\.nuget\packages\microsoft.csharp\4.6.0\lib\netstandard2.0\Microsoft.CSharp.dll" -a "C:\Users\user\.nuget\packages\microsoft.dotnet.internalabstractions\1.0.0\lib\netstandard1.3\Microsoft.DotNet.InternalAbstractions.dll" -a "C:\Users\user\.nuget\packages\microsoft.extensions.dependencyinjection\3.1.0-preview1.19506.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.dll" -a "C:\Users\user\.nuget\packages\microsoft.extensions.dependencyinjection.abstractions\3.1.0-preview1.19506.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" -a "C:\Users\user\.nuget\packages\microsoft.extensions.dependencymodel\3.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyModel.dll" -a "C:\Users\user\.nuget\packages\microsoft.extensions.logging.abstractions\3.1.0-preview1.19506.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll" -a "C:\Users\user\.nuget\packages\microsoft.extensions.options\3.1.0-preview1.19506.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll" -a "C:\Users\user\.nuget\packages\microsoft.extensions.primitives\3.1.0-preview1.19506.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll" -a "C:\Users\user\.nuget\packages\microsoft.jsinterop\3.1.0-preview1.19506.1\lib\netstandard2.0\Microsoft.JSInterop.dll" -a "C:\Users\user\.nuget\packages\mono.webassembly.interop\3.1.0-preview1.19506.1\lib\netstandard2.0\Mono.WebAssembly.Interop.dll" -a "C:\Users\user\.nuget\packages\newtonsoft.json\12.0.2\lib\netstandard2.0\Newtonsoft.Json.dll" -a "C:\Users\user\.nuget\packages\system.appcontext\4.1.0\lib\netstandard1.6\System.AppContext.dll" -a "C:\Users\user\.nuget\packages\system.buffers\4.5.0\lib\netstandard2.0\System.Buffers.dll" -a "C:\Users\user\.nuget\packages\system.collections.immutable\1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll" -a "C:\Users\user\.nuget\packages\system.componentmodel.annotations\4.7.0-preview1.19504.10\lib\netstandard2.0\System.ComponentModel.Annotations.dll" -a "C:\Users\user\.nuget\packages\system.data.common\4.3.0\lib\netstandard1.2\System.Data.Common.dll" -a "C:\Users\user\.nuget\packages\system.io.filesystem.primitives\4.0.1\lib\netstandard1.3\System.IO.FileSystem.Primitives.dll" -a "C:\Users\user\.nuget\packages\system.linq\4.3.0\lib\netstandard1.6\System.Linq.dll" -a "C:\Users\user\.nuget\packages\system.linq.expressions\4.3.0\lib\netstandard1.6\System.Linq.Expressions.dll" -a "C:\Users\user\.nuget\packages\system.linq.queryable\4.3.0\lib\netstandard1.3\System.Linq.Queryable.dll" -a "C:\Users\user\.nuget\packages\system.memory\4.5.3\lib\netstandard2.0\System.Memory.dll" -a "C:\Users\user\.nuget\packages\system.numerics.vectors\4.5.0\lib\netstandard2.0\System.Numerics.Vectors.dll" -a "C:\Users\user\.nuget\packages\system.objectmodel\4.3.0\lib\netstandard1.3\System.ObjectModel.dll" -a "C:\Users\user\.nuget\packages\system.reflection.emit\4.3.0\lib\netstandard1.3\System.Reflection.Emit.dll" -a "C:\Users\user\.nuget\packages\system.reflection.emit.ilgeneration\4.3.0\lib\netstandard1.3\System.Reflection.Emit.ILGeneration.dll" -a "C:\Users\user\.nuget\packages\system.reflection.emit.lightweight\4.3.0\lib\netstandard1.3\System.Reflection.Emit.Lightweight.dll" -a "C:\Users\user\.nuget\packages\system.reflection.metadata\1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll" -a "C:\Users\user\.nuget\packages\system.reflection.typeextensions\4.3.0\lib\netstandard1.5\System.Reflection.TypeExtensions.dll" -a "C:\Users\user\.nuget\packages\system.runtime.compilerservices.unsafe\4.7.0-preview1.19504.10\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll" -a "C:\Users\user\.nuget\packages\system.runtime.loader\4.3.0\lib\netstandard1.5\System.Runtime.Loader.dll" -a "C:\Users\user\.nuget\packages\system.text.encoding.codepages\4.5.1\lib\netstandard2.0\System.Text.Encoding.CodePages.dll" -a "C:\Users\user\.nuget\packages\system.text.encodings.web\4.7.0-preview1.19504.10\lib\netstandard2.0\System.Text.Encodings.Web.dll" -a "C:\Users\user\.nuget\packages\system.text.json\4.7.0-preview1.19504.10\lib\netstandard2.0\System.Text.Json.dll" -a "C:\Users\user\.nuget\packages\system.text.regularexpressions\4.3.0\lib\netstandard1.6\System.Text.RegularExpressions.dll" -a "C:\Users\user\.nuget\packages\system.threading\4.3.0\lib\netstandard1.3\System.Threading.dll" -a "C:\Users\user\.nuget\packages\system.threading.tasks.extensions\4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll" -a "C:\Users\user\.nuget\packages\telerik.datasource.trial\1.3.0\lib\netstandard2.0\Telerik.DataSource.dll" -a "C:\Users\user\.nuget\packages\telerik.ui.for.blazor.trial\2.2.0\lib\netstandard2.0\Telerik.Blazor.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\cs\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\de\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\es\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\fr\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\it\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\ja\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\ko\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\pl\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\pt-BR\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\ru\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\tr\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\zh-Hans\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.common\3.3.1\lib\netstandard2.0\zh-Hant\Microsoft.CodeAnalysis.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\cs\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\de\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\es\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\fr\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\it\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\ja\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\ko\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\pl\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\pt-BR\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\ru\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\tr\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\zh-Hans\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\.nuget\packages\microsoft.codeanalysis.csharp\3.3.1\lib\netstandard2.0\zh-Hant\Microsoft.CodeAnalysis.CSharp.resources.dll" -a "C:\Users\user\source\repos\BlazorApp11\BlazorApp11\Shared\bin\Debug\netstandard2.0\BlazorApp11.Shared.dll" -a "C:\Users\user\source\repos\BlazorApp11\BlazorApp11\Client\obj\Debug\netstandard2.0\BlazorApp11.Client.dll"" exited with code -532462766.
1>Done building project "BlazorApp11.Client.csproj" -- FAILED.
2>------ Build started: Project: BlazorApp11.Server, Configuration: Debug Any CPU ------
2>BlazorApp11.Server -> C:\Users\user\source\repos\BlazorApp11\BlazorApp11\Server\bin\Debug\netcoreapp3.1\BlazorApp11.Server.dll
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
@marek-safar I invited you to a private repo that has an example you can use.
@danroth27 @marek-safar @lewing
Is there any update on that? In addition, after the update to wasm preview 4, disabling the Linker no longer works as a workaround and this is a showstopper. The error I am getting is:
Error MSB4018 The "ResolveBlazorRuntimeDependencies" task failed unexpectedly.
The setup is the same as described in this issue. This works with wasm preview 3 after disabling the linker.
Update: The problem seems to be caused only when the IL Linker is disabled with:
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
This is the difference in the final behavior I am experiencing when updating from preview 3 to preview 4.
The workaround from https://github.com/mono/mono/issues/12917#issuecomment-489286779 is still working with both preview 3 and preview 4.
@Stamo-Gochev interesting. So in preview 4 it works with the linker enabled but still requires the workaround?
@lewing
In preview 3, the workaround:
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
worked as expected.
In preview 4, the workaround:
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
no longer works, so switched to the explicit:
<assembly fullname="System.Core">
<type fullname="System.Linq.Queryable*" />
</assembly>
The error in preview 4 with:
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
is different though, so I suppose that an interim changed introduced some kind of a difference:
Error MSB4018 The "ResolveBlazorRuntimeDependencies" task failed unexpectedly.
The dependencies task fails for some reason.
Does preview4 require the explicit xml exclusion when the linker is running? or just preview3?
The ResolveBlazorRuntimeDependencies issue is very likely a different problem.
Yes, the problem @Stamo-Gochev pointed out was related to us using Microsoft.CodeAnalysis dependencies. We've now removed them, and the old workaround with <BlazorLinkOnBuild>false</BlazorLinkOnBuild> is working again, without the need for xml exclusion.
The linker however is still failing.
Update: 3.2.0 Preview 1
This issue remains a problem in the latest release. We still require the linker to be disabled in order to make our components work properly.
Some progress was made. The initial rendering of the component works, however when you activate any of our sorting or filtering methods it appears that those methods have been stripped.

blazor.webassembly.js:1 WASM: 锘縐nhandled exception rendering component:
l.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM: System.InvalidOperationException: No generic method 'OrderBy' on type 'System.Linq.Queryable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.
l.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM: at System.Linq.Expressions.Expression.FindMethod (System.Type type, System.String methodName, System.Type[] typeArgs, System.Linq.Expressions.Expression[] args, System.Reflection.BindingFlags flags) <0x28b7a38 + 0x0012e> in <filename unknown>:0
l.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM: at System.Linq.Expressions.Expression.Call (System.Type type, System.String methodName, System.Type[] typeArguments, System.Linq.Expressions.Expression[] arguments) <0x28b7748 + 0x00046> in <filename unknown>:0
l.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM: at Telerik.DataSource.SortDescriptorCollectionExpressionBuilder.Sort () <0x2d34fe8 + 0x00142> in <filename unknown>:0
l.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM: at Telerik.DataSource.Extensions.QueryableExtensions.Sort (System.Linq.IQueryable source, System.Collections.Generic.IEnumerable`1[T] sortDescriptors) <0x2d34df8 + 0x00016> in <filename unknown>:0
l.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM: at Telerik.DataSource.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult] (System.Linq.IQueryable queryable, Telerik.DataSource.DataSourceRequest request, System.Func`2[T,TResult] selector) <0x28bc5b8 + 0x00372> in <filename unknown>:0
@EdCharbeneau could you share how the method Telerik.DataSource.SortDescriptorCollectionExpressionBuilder.Sort looks like? We might be able to do some tricks there but only if the input into Expression.Call is not too dynamic
@marek-safar send via email. Thank you.
Discussed offline with a confirmed resolution on customer's side.
What was the confirmed resolution?
For now use the undocumented PreserveDependencyAttribute for reflection calls which depends on dynamic arguments
Can you please explain how to use this attribute to resolve this issue? Thank you.
Hello guys, I'm still stuck with this issue : as i understand there is two way of resolution
In my case i met problem with this library https://github.com/StefH/System.Linq.Dynamic.Core but im unable to explain what they have to change
thanks !
@julienGrd I am having the exact same issue and also using System.Linq.Dynamic.Core. After discussing this with @marek-safar and @danroth27 over email they agreed that some additional documentation about using linker files will be needed. Fingers crossed this happens this year :)
@julienGrd @akorchev We expect to have answer for you soon. Definitely this month :smile:.
To configure what code you want the linker to preserve, you can embed an XML linker config file in your library as an embedded resource. I've put together a sample on how to do this here: https://github.com/danroth27/ComponentLibWithXmlLinkerConfig. It looks like this technique isn't documented super well, so I've opened https://github.com/dotnet/AspNetCore.Docs/issues/17369 to at least get this documented in the Blazor docs, and we'll get this added to the .NET docs as well.
This technique is preferred to using the PreserveDependencyAttribute mentioned about, because that attribute is internal and not really intended for public use. At a future point we hope to have a public attribute based model for preserving code, but for now using an XML linker config file is the recommended approach.
@akorchev for the library the work is in progress, you can follow it here https://github.com/StefH/System.Linq.Dynamic.Core/issues/358
I am using a component library and it's telling me to disable linker which is too much a trade
Most helpful comment
Update: 3.2.0 Preview 1
This issue remains a problem in the latest release. We still require the linker to be disabled in order to make our components work properly.
Some progress was made. The initial rendering of the component works, however when you activate any of our sorting or filtering methods it appears that those methods have been stripped.