Hi I am facing a strange problem,
I have create a asp.net core 2.1 web project, it works/build fine on my machine.
Then I have zipped the project folder with .sln file and moved it to new machin, this also have visual studio 2017, .net core 2.1(it is a VM).
I open the project and when build I get:
Error rzc generate exited with code -2147450750. DEVPROJECT_1 C:\Users\abc.nuget\packages\microsoft.aspnetcore.razor.design\2.1.1\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets 121
I have even checked the dependency version and they are the same. Both machine are win 7 service pack 1(machine where it works is 64 bit and new machine or vm is 32 bit OS).
Need some way to solve this.
[UPDATE 1:]
Hi I did he clean build as suggested but same issue
: ------ Rebuild All started: Project: DEVPROJECT_1 , Configuration: Debug Any CPU ------ Failed to load the dll from [C:\Program Files\dotnet\host\fxr\2.1.3\hostfxr.dll], HRESULT: 0x80070057 The library hostfxr.dll was found, but loading it from C:\Program Files\dotnet\host\fxr\2.1.3\hostfxr.dll failed - Installing .NET Core prerequisites might help resolve this problem. http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 C:\Users\dev.nuget\packages\microsoft.aspnetcore.razor.design\2.1.1\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(69,5): error : rzc discover exited with code -2147450750. Done building project "DEVPROJECT_1 .csproj" -- FAILED. ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
but when I double click it it redirect me to razor config file and points to this line:
<RazorGenerate
Debug="$(_RazorDebugGenerateCodeTask)"
DebugTool="$(_RazorDebugGenerateCodeTool)"
ToolAssembly="$(_RazorToolAssembly)"
UseServer="$(UseRazorBuildServer)"
ForceServer="$(_RazorForceBuildServer)"
SuppressCurrentUserOnlyPipeOptions="$(_RazorSuppressCurrentUserOnlyPipeOptions)"
PipeName="$(_RazorBuildServerPipeName)"
Version="$(RazorLangVersion)"
Configuration="@(ResolvedRazorConfiguration)"
Extensions="@(ResolvedRazorExtension)"
Sources="@(RazorGenerateWithTargetPath)"
ProjectRoot="$(MSBuildProjectDirectory)"
TagHelperManifest="$(_RazorTagHelperOutputCache)" />
This is odd. Could be caching foul play.
.vs
(hidden), bin
and obj
folders in your solutionAfter some helpful pointers the issue was that "KB2533623" was not installed on the machine, after that it worked.
I got this issue after upgrading dotnet SDK to 3.0.
I resolved it by adding a global.json file and setting SDK to 2.1.504
msdn page: https://docs.microsoft.com/en-us/dotnet/core/versions/selection
User contributions licensed under CC BY-SA 3.0