Closed pranavkm closed 4 years ago
From @danmosemsft on Friday, 01 March 2019 17:21:53
@ericstj any idea which is the right repo for this issue?
From @don01001000 on Friday, 01 March 2019 18:06:50
@ericstj any idea which is the right repo for this issue?
I just noticed that the error trace I pasted is not for the same error as the one I described above. I edited the issue to correct. I updated the issue and title and will try to reproduce the other error message as well.
From @ericstj on Friday, 01 March 2019 20:23:58
It looks to me like RazorTagHelper isn't honoring the SDK location but instead finding dotnet on the path.
Code appears to live here: https://github.com/aspnet/AspNetCore-Tooling/blob/master/src/Razor/src/Microsoft.NET.Sdk.Razor/RazorTagHelper.cs
The targets don't expose ToolPath parameter on the task so there isn't a good workaround: https://github.com/aspnet/Razor/blob/8d629371bfc8a80b2bca2660106f194ccffd0a21/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Microsoft.NET.Sdk.Razor.CodeGeneration.targets#L98
Issues should go here: https://github.com/aspnet/AspNetCore/issues /cc @rynowak @pranavkm
@pranavkm Is there anything actionable to do here?
In my case I solved this error: "rzc discover exited with code 1.", by turning of "Real-time protection" in in Windows Security. I exclude "dotnet.exe" from "Windows Defender Antivirus" scan and/or allow it through "Controlled folder access".
In my case I solved this error: "rzc discover exited with code 1.", by turning of "Real-time protection" in in Windows Security. I exclude "dotnet.exe" from "Windows Defender Antivirus" scan and/or allow it through "Controlled folder access".
This problem is related to Mac only it seems, so your solution doesn't seem applicable to this problem.
Getting the same issue on Ubuntu 18.04.
/home/xxx/.nuget/packages/microsoft.aspnetcore.razor.design/2.2.0/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(79,5): error : rzc discover exited with code 150.
@sayedihashimi
Is there anything actionable to do here?
I think there is a pretty clear bug here. I pointed it out and suggested the actionable fix (expose toolpath and set it). You might want to coordinate with the SDK team to make sure your tasks which require dotnet locate it in the same was as the SDK.
@rodrmoya or @iantoalms any ideas regarding this bug?
The 3.1.0 SDK had a resurgence of the bug as a result of https://github.com/dotnet/aspnetcore/issues/17308 which should be fixed with the 3.1.102 SDK. https://github.com/dotnet/aspnetcore/issues/14432 should cover @ericstj's suggestion. For 3.1.100 \ 3.1.101 SDK, having the dotnet SDK with the required instance of runtime in the PATH would be the workaround.
I'm a +1 on this:
/home/xxx/.nuget/packages/microsoft.aspnetcore.razor.design/2.2.0/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(79,5): error : rzc discover exited with code 150.
Build failing on Ubuntu using Github actions, 3.1.100/101, but works ok on a Windows agent.
We have same issue on Ubuntu 18 using .NET core 3.0. Will installing .NET Core 2.0 help?
Thanks
[Follow up] Any updates? the same problem on ubuntu + netcore 3.1.2
@GeorgePlotnikov Could you please share the output of dotnet --info
on your machine?
@danroth27 I use GitHub actions
@danroth27 : Here's a sample of working windows-build, but failing Ubuntu build (re https://github.com/dotnet/aspnetcore/issues/8110#issuecomment-583580449) : https://github.com/fplbot/fplbot/runs/432573147 (.NET Core 3.1.100)
Edit: Later successful build, same commit re-built some weeks after: https://github.com/fplbot/fplbot/runs/463461822
The only diff I can find, is Unable to locate zlib
under install of .NET core in the first build.
Even stranger. Temp .NET Core install bug/Github action bug?
@johnkors As mentioned above, we think this issue is fixed in 3.1.102. It looks like your using 3.1.100. I'm not sure though why it would sometime work and sometimes not. If you're still hitting this problem with 3.1.102, could you please file a new issue with detailed repro steps on how to reproduce the problem?
@GeorgePlotnikov Can you see what .NET Core SDK version is being used in the logs? How do you know you're using .NET Core 3.1.2?
@danroth27 here is my build file
build:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@master
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.102
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.201
here its output:
/root/.nuget/packages/microsoft.aspnetcore.razor.design/2.2.0/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(79,5): error : rzc discover exited with code 150. [/src/WebUI/WebUI.csproj]
Thanks @GeorgePlotnikov! At this point I think we'll need to see the app project to understand what's going on. Is that something you can share with us?
@danroth27 sure, here it is
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<UserSecretsId>aspnet-WebUI-5C5B4400-95ED-40E4-B29B-C6469B6A07DD</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
<Content Remove="Properties\launchSettings.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.3.0" />
<PackageReference Include="IBALib" Version="1.0.0" />
<PackageReference Include="IBAProcessing" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeQuality.Analyzers" Version="2.9.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.2" />
<PackageReference Include="Microsoft.NET.Sdk.Razor" Version="3.1.2" />
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.10" />
<PackageReference Include="RavenDB.Identity" Version="7.0.1" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta0007" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SourceProvider\SourceProvider.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
<None Include="wwwroot\images\banner1.svg" />
<None Include="wwwroot\images\banner2.svg" />
<None Include="wwwroot\images\banner3.svg" />
<None Include="wwwroot\js\site.js" />
<None Include="wwwroot\js\site.min.js" />
<None Include="wwwroot\lib\bootstrap\dist\css\bootstrap-theme.css.map" />
<None Include="wwwroot\lib\bootstrap\dist\css\bootstrap-theme.min.css.map" />
<None Include="wwwroot\lib\bootstrap\dist\css\bootstrap.css.map" />
<None Include="wwwroot\lib\bootstrap\dist\css\bootstrap.min.css.map" />
<None Include="wwwroot\lib\bootstrap\dist\fonts\glyphicons-halflings-regular.svg" />
<None Include="wwwroot\lib\bootstrap\dist\fonts\glyphicons-halflings-regular.woff2" />
<None Include="wwwroot\lib\bootstrap\dist\js\bootstrap.js" />
<None Include="wwwroot\lib\bootstrap\dist\js\bootstrap.min.js" />
<None Include="wwwroot\lib\bootstrap\dist\js\npm.js" />
<None Include="wwwroot\lib\bootstrap\LICENSE" />
<None Include="wwwroot\lib\jquery-validation-unobtrusive\jquery.validate.unobtrusive.js" />
<None Include="wwwroot\lib\jquery-validation-unobtrusive\jquery.validate.unobtrusive.min.js" />
<None Include="wwwroot\lib\jquery-validation\dist\additional-methods.js" />
<None Include="wwwroot\lib\jquery-validation\dist\additional-methods.min.js" />
<None Include="wwwroot\lib\jquery-validation\dist\jquery.validate.js" />
<None Include="wwwroot\lib\jquery-validation\dist\jquery.validate.min.js" />
<None Include="wwwroot\lib\jquery-validation\LICENSE.md" />
<None Include="wwwroot\lib\jquery\dist\jquery.js" />
<None Include="wwwroot\lib\jquery\dist\jquery.min.js" />
<None Include="wwwroot\lib\jquery\dist\jquery.min.map" />
</ItemGroup>
</Project>
@GeorgePlotnikov It looks like you're referencing a mixture of 2.2 and 3.1.2 packages in this app. You should ensure you are using a consistent set of versions. Also, you don't need to reference packages that are included in the ASP.NET Core shared framework. Please try removing the unnecessary package references and see if that helps.
@danroth27 thank you so much. I fixed it with the links you provided. appreciate you.
For ASP.NET Core 3.1 it helped me
New csproj
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
Old csproj
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" />
</ItemGroup>
</Project>
For 5.0, we changed how the razor compiler is launched which should likely fix the reported issue. If you continue seeing this after upgrading to 5.0, please file a new issue and we'd be happy to investigate.
From @don01001000 on Thursday, 28 February 2019 03:56:20
I'm trying to build web applications using VS Community 2019 Preview for Mac but keep getting the error
rzc discover exited with code 150.
whenever I try to build the default ASP.NET MVC template. (I originally pasted the wrong error message writing this issue:) Since the corefx page says to file a new issue if I have a question, here it is! How can I get around this error? Here are the steps to reproduce. (I get a different error doing this with VS 2017, and if it's appropriate, I can make an issue for that, too.)The "ResolvePackageAssets" task failed unexpectedly.
/usr/local/share/dotnet-sdk-latest-osx-x64-3.0.100-preview4-010539/dotnet
or wherever you put it.Here's the error as reported by VS 2019:
Here's my output from
dotnet build
if I execute that after creating the solution and attempting to build through VS:Here's my output from
dotnet --info
:Executing
dotnet run
works as well.Since this is a question of sorts, this all started with my trying to use EF6 and MySQL, and while I would like any solution to that whether I'm using a daily SDK download or not, this seemed like something that should be reported, and dogfooding seems like a decent if small way to help out.
Copied from original issue: dotnet/corefx#35644