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
Apache License 2.0
883 stars 226 forks source link

rzc discover exited with code -1073741701. #2739

Closed RushilLak closed 5 years ago

RushilLak commented 5 years ago

I'm running Visual Studio 2017 Community Edition. My project is a Hello World. I have a single build error that refers to code that I didn't write myself (it's part of the template). The error is:

rzc discover exited with code -1073741701. C:\Users\Rushil.nuget\packages\microsoft.aspnetcore.razor.design\2.1.2\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets Line 69.

I copied the subsequent lines too because they form part of the same XML tag.

    <RazorTagHelper
      Debug="$(_RazorDebugTagHelperTask)"
      DebugTool="$(_RazorDebugTagHelperTool)"
      ToolAssembly="$(_RazorToolAssembly)"
      UseServer="$(UseRazorBuildServer)"
      ForceServer="$(_RazorForceBuildServer)"
      SuppressCurrentUserOnlyPipeOptions="$(_RazorSuppressCurrentUserOnlyPipeOptions)"
      PipeName="$(_RazorBuildServerPipeName)"
      Version="$(RazorLangVersion)"
      Configuration="@(ResolvedRazorConfiguration)"
      Extensions="@(ResolvedRazorExtension)"
      Assemblies="@(RazorReferencePath)"
      ProjectRoot="$(MSBuildProjectDirectory)"
      TagHelperManifest="$(_RazorTagHelperOutputCache)">
      <Output
        TaskParameter="TagHelperManifest"
        ItemName="FileWrites"/>
    </RazorTagHelper>

I have placed <UseRazorBuildServer>false</UseRazorBuildServer> in my .csproj file but still I have the same error.

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
    <UseRazorBuildServer>false</UseRazorBuildServer>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
  </ItemGroup>
</Project>

Could you please help ? Thanks in advance

mkArtakMSFT commented 5 years ago

Thanks for contacting us, @RushilLak. Please share a repro project so we can investigate. /cc @pranavkm

pranavkm commented 5 years ago

Looking up search results for this error code typically indicate a mismatch of processor architectures. Do you perhaps have a 32-bit dotnet (C:\Program Files (x86)\dotnet) on a 64-bit machine?

RushilLak commented 5 years ago

Thanks for contacting us, @RushilLak. Please share a repro project so we can investigate. /cc @pranavkm

I attach you the link to my Github repository: https://github.com/RushilLak/HelloWorld

RushilLak commented 5 years ago

Looking up search results for this error code typically indicate a mismatch of processor architectures. Do you perhaps have a 32-bit dotnet (C:\Program Files (x86)\dotnet) on a 64-bit machine?

I am using the 64-bit dotnet (C:\Program Files\dotnet) on a 64-bit machine. When I execute the command:
$ dotnet --info, I get the following output: Failed to load the dll from [C:\Program Files\dotnet\host\fxr\2.1.6\hostfxr.dll] , HRESULT: 0x8007007E The library hostfxr.dll was found, but loading it from C:\Program Files\dotnet\host\fxr\2.1.6\hostfxr.dll failed.

I am going to install VS Community 2015 that says it will solve the issue as mentioned in the following link: https://github.com/dotnet/cli/issues/3907#issuecomment-243804632

RushilLak commented 5 years ago

I solved the issue installing VS Community 2015.