aspnet / Razor

[Archived] Parser and code generator for CSHTML files used in view pages for MVC web apps. Project moved to https://github.com/aspnet/AspNetCore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: rzc discover exited with code -2147450749. (1, 1)

usarskyy opened this issue · comments

Hi!

I get this error after installing latest VS 2017 updates (right now I have v15.9.2). On the beginning I couldn't build my projects at all, so I had to re-install .NET Core SDK (my projects target SDK 2.2.100-preview3). After this I could build all the projects except one that has Razor views in it.
Unfortunately there are not so many details regarding this problem. But I can provide you with all the logs if you tell me how to generate them.

BTW, "dotnet build" command completes successfully.

commented

Thanks for contacting us, @usarskyy.
It's interesting that the project with Razor views is not building successfully. Please provide a repro project (or share the same project, if you can) so we can investigate it.

Hi @mkArtakMSFT !

I prepared a test project to reproduce the problem: https://github.com/usarskyy/rzc-discover-error

Please let me know if you need any extra information

Can you include dontet --info on the project? Usually this error code indicates that the required shared runtime isn't installed.

You are right. After I installed VS update I had to re-install .NET Core SDKs und Runtime. And, as always happens, I installed SDK but forgot to install runtime.

Now I installed .NET Core Runtime and I get new error "Error: rzc generate exited with code -2147450749. (1, 1)"

@pranavkm is it possible to show more informative error message to the user? I mean, error code -2147450749 says absolutely nothing but something like "runtime not found" definitely shows where root of the problem is.

BTW, if runtime is not available, why then "dotnet build" command completes successfully?

@pranavkm is it possible to show more informative error message to the user?

At minimal verbosity or higher, the error shows up as part of the msbuild output. This should show up as part of dotnet build or the output logs in Visual Studio. E.g.

  Microsoft.AspNetCore.Razor -> D:\work\Razor\src\Microsoft.AspNetCore.Razor\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Razor.dll
  Microsoft.AspNetCore.Razor.Runtime -> D:\work\Razor\src\Microsoft.AspNetCore.Razor.Runtime\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Razor.Runtime.dll
  Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib -> D:\work\Razor\test\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib\bin\Debug\netstandard2.0\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll
  It was not possible to find any compatible framework version
  The specified framework 'Microsoft.NETCore.App', version '3.0.0-preview1-26907-05' was not found.
    - Check application dependencies and target a framework version installed at:
        C:\Users\Pranav\.dotnet\x64\
    - Installing .NET Core prerequisites might help resolve this problem:
        https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
    - The .NET Core framework and SDK can be installed from:
        https://aka.ms/dotnet-download
    - The following versions are installed:
        2.1.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
        2.1.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
D:\work\Razor\src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.CodeGeneration.targets(149,5): error : rzc generate exited with code -2147450730. [D:\work\Razor\test\testapps\SimpleMvc\SimpleMvc.csproj]

Build FAILED.

But not as part of error dialog in VS which contains the one liner:

D:\work\Razor\src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.CodeGeneration.targets(149,5): error : rzc generate exited with code -2147450730.

@danroth27, we could try and make the error message more meaningful for this specific error code or just document it since it's a fairly unique error code.

@pranavkm

This should show up as part of dotnet build or the output logs in Visual Studio

Unfortunately as I wrote previously:

BTW, "dotnet build" command completes successfully.

I double checked it again and here is what I get:

image

As you can see, build succeeded. May be this problem is purely related to VS? Because I didn't have any build issues while using previous version of VS (sorry, I can't remember exact version that I had before 15.9.2)

Guys, issue was [somehow] resolved by VS update :) A few hours ago I installed VS 15.9.3 and after another OS restart I could built my solution without any errors O_o I can't explain it but it works now.