0

I have dotnet-sdk-3.0.100-preview3-010431-win-x64 zip binary file and extracted it to C:\dotnet and add this path to the user variables path. I had dotnet 2.2 before in that path and I deleted it and paste new version(preview3-010431) to create a blazor project.

dotnet can create and run webapp project correctly but not blazor. First I executed this command :

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::0.9.0-preview3-19154-02

When i run:

dotnet new blazor -o WebApplication1
cd WebApplication1

It is ok. But dotnet build does not work and I get the error :

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

Build FAILED.

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

I deleted all packages in C:\Users\sap-komaei.CII.nuget\packages , but error exist. I deleted all files and folders in C:\Users\sap-komaei.CII.dotnet too , but error exist.

After I run:

dotnet new -i Microsoft.AspNetCore.Blazor.Templates

And then build, I get this error :

"C:\Users\sap-komaei.CII.nuget\packages\microsoft.aspnetcore.blazor.build\0.7.0\targets\RazorCompilation.targets(184,5): error : rzc generate exited with code -2147450730. [E:\Projects\WebApplication1\WebApplication1.csproj]

Build FAILED.

C:\Users\sap-komaei.CII.nuget\packages\microsoft.aspnetcore.blazor.build\0.7.0\targets\RazorCompilation.targets(184,5): error : rzc generate exited with code -2147450730. [E:\Projects\WebApplication1\WebApplication1.csproj] 0 Warning(s) 1 Error(s)"

4
  • 1
    Why don't you run the setup of the dotnet installer instead of only extracting it? That won't work.. Commented Mar 11, 2019 at 14:38
  • It works for other project template. And I can not install any application on my pc in my work for network policies. Commented Mar 12, 2019 at 6:00
  • I install dotnet 3.0.100-preview3-010431 on my home labtop and blazor project builded but console project not build and get error : Commented Mar 12, 2019 at 7:25
  • message NETSDK1057: You are using a preview version of .NET Core. See: aka.ms/dotnet-core-preview [D:\MyProjects\Core\Console\Console.csproj] Program.cs(9,13): error CS0234: The type or namespace name 'WriteLine' does not exist in the namespace 'Console' (are you missing an assembly reference?) Commented Mar 12, 2019 at 7:28

1 Answer 1

1

Yes

I figured out.

for build the blazor template we must install both dotnet core v3 preview and the latest 2.2 version. I can not install any application on my work pc. So I use portable versions.

resolution for me:

  1. copy E:\My Pro\DotNetCore\dotnet-sdk-2.2.105-win-x64\sdk\2.2.105 folder to my installation sdk path (E:\dotnet\sdk)

  2. copy E:\My Pro\DotNetCore\dotnet-sdk-2.2.105-win-x64\shared\Microsoft.NETCore.App\2.2.3 folder to E:\dotnet\shared\Microsoft.NETCore.App.

  3. add E:\dotnet\ & E:\dotnet\host\fxr\3.0.0-preview3-27503-5\ & E:\My Pro\VS Code\1.32.1\ to user path variable.

  4. add E:\dotnet\ to DOTNET_ROOT variable.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.