dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.23k stars 9.95k forks source link

Blazor: Build failure on Linux due to wrong dotnet location, Error code MSB6003 #18308

Closed curtisy1 closed 4 years ago

curtisy1 commented 4 years ago

Describe the bug

DotNetToolTask.ExecuteTool gets passed a wrong path on Linux in some circumstances, resulting in a failed build since the dotnet binary cannot be located. For me the path it spits out looks like a fallback path (/usr/bin/dotnet) I'm still not sure as to why this happens but I hope it's at least reproducable with the example below.

To Reproduce

Not really minimalistic but I haven't yet figured out how to narrow it down any further. Steps to reproduce are as follows:

Got Exceptions? Include both the message and the stack trace LOGLEVEL_DIAG.log LOGLEVEL_NORMAL.log

Further technical details

Runtime Environment: OS Name: solus OS Version: 4.0 OS Platform: Linux RID: linux-x64 Base Path: /home/curtisy/.dotnet/sdk/3.1.100/

Host (useful for support): Version: 3.1.0 Commit: 65f04fb6db

.NET Core SDKs installed: 3.1.100 [/home/curtisy/.dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.0 [/home/curtisy/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.0 [/home/curtisy/.dotnet/shared/Microsoft.NETCore.App]



- The IDE (VS / VS Code/ VS4Mac) you're running on, and it's version
None, I'm invoking a ```dotnet build``` command from a bash shell

- I'm using the dotnet binaries from the [Install Script](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script)
javiercn commented 4 years ago

@curtisy1 thanks for contacting us.

@pranavkm do you have any thoughts on this?

pranavkm commented 4 years ago

Dup of https://github.com/dotnet/aspnetcore/issues/14432 that's shows up in .NET Core as a result of https://github.com/dotnet/aspnetcore/issues/17308. The second issue is slated for the upcoming 3.1 patch release, so that should help. Closing since we're separately tracking the fix for this