I wanted to experiment with building a stand-alone Blazor app that utilizes some existing managed code we have which depends on System.Reactive. However, as soon as System.Reactive is added (either directly to the Blazor app project, or to any other project the Blazor app references) the following build error happens:
1>------ Rebuild All started: Project: RetrospectBlazorPoc, Configuration: Debug Any CPU ------
1>RetrospectBlazorPoc -> C:\Data\Git\IDeliverable\RetrospectBlazorPoc\RetrospectBlazorPoc\bin\Debug\netstandard2.0\RetrospectBlazorPoc.dll
1>Fatal error in IL Linker
1>Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Reactive, Version=4.1.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263'
1> at Mono.Linker.DirectoryAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
1> at Mono.Linker.AssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
1> at Mono.Linker.DirectoryAssemblyResolver.Resolve(AssemblyNameReference name)
1> at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
1> at Mono.Linker.Steps.ResolveFromAssemblyStep.ProcessLibrary(LinkContext context, AssemblyDefinition assembly, RootVisibility rootVisibility)
1> at Mono.Linker.Steps.ResolveFromAssemblyStep.ProcessLibrary(AssemblyDefinition assembly)
1> at Mono.Linker.Steps.ResolveFromAssemblyStep.Process()
1> at Mono.Linker.Steps.BaseStep.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>C:\Users\DanielRosenberg\.nuget\packages\microsoft.aspnetcore.blazor.build\0.7.0\targets\Blazor.MonoRuntime.targets(439,5): error MSB3073: The command "dotnet "C:\Users\DanielRosenberg\.nuget\packages\microsoft.aspnetcore.blazor.build\0.7.0\targets\../tools/illink/illink.dll" -l none --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true -d "C:\Users\DanielRosenberg\.nuget\packages\microsoft.aspnetcore.blazor.build\0.7.0\targets\../tools/mono/bcl/" -d "C:\Users\DanielRosenberg\.nuget\packages\microsoft.aspnetcore.blazor.build\0.7.0\targets\../tools/mono/bcl/Facades/" -o "C:\Data\Git\IDeliverable\RetrospectBlazorPoc\RetrospectBlazorPoc\obj\Debug\netstandard2.0\blazor\linker/" -x "C:\Users\DanielRosenberg\.nuget\packages\microsoft.aspnetcore.blazor.build\0.7.0\targets\BuiltInBclLinkerDescriptor.xml" -x "C:\Data\Git\IDeliverable\RetrospectBlazorPoc\RetrospectBlazorPoc\obj\Debug\netstandard2.0\blazor\linker.descriptor.xml" -a "C:\Users\DanielRosenberg\.nuget\packages\microsoft.aspnetcore.blazor\0.7.0\lib\netstandard2.0\Microsoft.AspNetCore.Blazor.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\microsoft.aspnetcore.blazor.browser\0.7.0\lib\netstandard2.0\Microsoft.AspNetCore.Blazor.Browser.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\microsoft.aspnetcore.blazor.build\0.7.0\lib\netstandard1.0\Microsoft.AspNetCore.Blazor.TagHelperWorkaround.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\microsoft.extensions.dependencyinjection\2.1.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\microsoft.extensions.dependencyinjection.abstractions\2.1.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\microsoft.jsinterop\0.7.0\lib\netstandard2.0\Microsoft.JSInterop.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\mono.webassembly.interop\0.7.0\lib\netstandard2.0\Mono.WebAssembly.Interop.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\system.reactive\4.1.2\lib\netstandard2.0\System.Reactive.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\system.reactive.core\4.1.2\lib\netstandard2.0\System.Reactive.Core.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\system.runtime.compilerservices.unsafe\4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll" -a "C:\Users\DanielRosenberg\.nuget\packages\system.runtime.interopservices.windowsruntime\4.3.0\lib\netstandard1.3\System.Runtime.InteropServices.WindowsRuntime.dll" -a "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\system.threading.tasks.extensions\4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll" -a "C:\Data\Git\IDeliverable\RetrospectBlazorPoc\RetrospectBlazorPoc\obj\Debug\netstandard2.0\RetrospectBlazorPoc.dll"" exited with code 1.
1>Done building project "RetrospectBlazorPoc.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Any idea why this happens, and how to fix or work around this?
Thanks for contacting us, @DaRosenberg.
This is something external to us and if you still face this issue consider filing a new issue in the https://github.com/mono/mono repo.
I wanted to experiment with building a stand-alone Blazor app that utilizes some existing managed code we have which depends on
System.Reactive
. However, as soon asSystem.Reactive
is added (either directly to the Blazor app project, or to any other project the Blazor app references) the following build error happens:Any idea why this happens, and how to fix or work around this?