aspdotnet core project build fail on new machin


Hi I am facing a strange problem,

I have create a 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\\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.

enter image description here


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. C:\Users\dev.nuget\packages\\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:

  TagHelperManifest="$(_RazorTagHelperOutputCache)" />
asked on Stack Overflow Sep 9, 2018 by user614946 • edited Sep 10, 2018 by user614946

3 Answers


This is odd. Could be caching foul play.

  1. Close the Visual Studio
  2. Try to get rid of all .vs (hidden), bin and obj folders in your solution
  3. Start empty visual studio (don't open the solution yet!)
  4. Go to Tools > NuGet Package Manager > Package Manager Settings > Clear All NuGet Cache(s)
  5. Open your solution, let it restore all NuGet and rebuild
answered on Stack Overflow Sep 9, 2018 by Xeevis

After some helpful pointers the issue was that "KB2533623" was not installed on the machine, after that it worked.

answered on Stack Overflow Sep 11, 2018 by user614946

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:

answered on Stack Overflow Nov 28, 2019 by Raj Kamal

User contributions licensed under CC BY-SA 3.0