profile
viewpoint

Ask questions.NET Core 3 Preview Blazor basic project does not compile

Hi all,

Recently, I have downloaded .NET Core 3 Preview and tried to create the basic Blazor (standalone) project. When I first time tried to compile it I got the error:

RazorCompilation.targets(184, 5): [null] rzc generate exited with code 150

Guys, any suggestion how to solve this issue ?

aspnet/AspNetCore

Answer questions staff0rd

Here's a repro of this issue, inside a docker container, following these steps.

REPRO

docker run -it mcr.microsoft.com/dotnet/core/sdk:3.0 bash
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::0.9.0-preview3-19154-02
dotnet new blazor -o WebApplication1
cd WebApplication1
dotnet run

EXPECTED: Runs without exception ACTUAL: Following exception is thrown

/root/.nuget/packages/microsoft.aspnetcore.blazor.build/0.9.0-preview3-19154-02/targets/Blazor.MonoRuntime.targets(439,5): error MSB3073: The command "dotnet "/root/.nuget/packages/microsoft.aspnetcore.blazor.mono/0.8.0-preview-20190204.1/build/netstandard1.0/../../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 "/root/.nuget/packages/microsoft.aspnetcore.blazor.mono/0.8.0-preview-20190204.1/build/netstandard1.0/../../tools/mono/bcl/" -d "/root/.nuget/packages/microsoft.aspnetcore.blazor.mono/0.8.0-preview-20190204.1/build/netstandard1.0/../../tools/mono/bcl/Facades/" -o "/src/WebApplication1/obj/Debug/netstandard2.0/blazor/linker/" -x "/root/.nuget/packages/microsoft.aspnetcore.blazor.build/0.9.0-preview3-19154-02/targets/BuiltInBclLinkerDescriptor.xml" -x "/src/WebApplication1/obj/Debug/netstandard2.0/blazor/linker.descriptor.xml" -a "/root/.nuget/packages/microsoft.aspnetcore.blazor/0.9.0-preview3-19154-02/lib/netstandard2.0/Microsoft.AspNetCore.Blazor.dll" -a "/root/.nuget/packages/microsoft.aspnetcore.components/3.0.0-preview3-19153-02/lib/netstandard2.0/Microsoft.AspNetCore.Components.dll" -a "/root/.nuget/packages/microsoft.aspnetcore.components.browser/3.0.0-preview3-19153-02/lib/netstandard2.0/Microsoft.AspNetCore.Components.Browser.dll" -a "/root/.nuget/packages/microsoft.extensions.dependencyinjection/3.0.0-preview3.19153.1/lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.dll" -a "/root/.nuget/packages/microsoft.extensions.dependencyinjection.abstractions/3.0.0-preview3.19153.1/lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll" -a "/root/.nuget/packages/microsoft.jsinterop/3.0.0-preview3.19153.1/lib/netstandard2.0/Microsoft.JSInterop.dll" -a "/root/.nuget/packages/mono.webassembly.interop/3.0.0-preview3.19153.1/lib/netstandard2.0/Mono.WebAssembly.Interop.dll" -a "/root/.nuget/packages/system.componentmodel.annotations/4.6.0-preview3.19128.7/lib/netstandard2.0/System.ComponentModel.Annotations.dll" -a "/src/WebApplication1/obj/Debug/netstandard2.0/WebApplication1.dll"" exited with code 150. [/src/WebApplication1/WebApplication1.csproj]

useful!

Related questions

HTTP Error 500.31 - ANCM Failed to Find Native Dependencies hot 8
ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY when clean webapi template
MissingMethodException: Method not found Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
Migrate Asp.Net Core 2.2 Integration Tests to 3.0 - The TestServer constructor was not called with a IWebHostBuilder so IWebHost is not available. hot 4
UseStaticFiles with StaticFileOptions/FileExtensionContentTypeProvider breaks server side Blazor hot 3
SignalR .NetCore 3.0-- HubConnectionBuilder' does not contain a definition for 'WithUrl' hot 3
HTTP Error 500.30 - ANCM In-Process Start Failure hot 3
With Asp.net core 3.0 SignInManager.IsSignedIn(User) allways reuturn false?but in 2.2 it works fine.Is that a debug? hot 3
CSS Isolation in Blazor Components hot 3
How to retrieve the HttpContext from Blazor server-side ? hot 3
Oauth2 authentication erroring with "The oauth state was missing or invalid." hot 3
Failed to gracefully shutdown application (IIS Hang) hot 3
BadHttpRequestException: Reading the request body timed out due to data arriving too slowly hot 2
HTTP Error 500.0 - ANCM In-Process Handler Load Failure hot 2
Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder`1.HasIndex(System.Linq.Expressions.Expression`1<System.Func`2<System.__Canon,System.Object>>)'. hot 2
Github User Rank List