Open ngyukman opened 6 years ago
I think https://github.com/Microsoft/msbuild/commit/9654902b70e22eccc8105efdac5060c7d7adaa1a#diff-7dd0925e4fa31af6856e773c2c80a62c broke the IsMono on Linux.
As a part of caching it's running now BuildEnvironmentHelper.Initialize() which in turn does a PInvoke in VisualStudioLocationHelper which throws on Linux.
I think this is currently a blocking issue for omnisharp on linux: https://github.com/OmniSharp/omnisharp-roslyn/issues/1008
Hmm, we're not hitting this issue with the msbuild we bundle in Mono, though I'm not sure why as it looks like we should 😄
@radical ?
I experience same issue while execute method OpenSolutionAsync from MSBuildWorkspace class under MacOS...
I am hitting this while running the Microsoft.Build NuGet package (versions 15.6.85 and 15.9.20) with Mono 5.18.0 on OSX. As @akoeplinger said, I do not get the same error with the Microsoft.Build bundled with Mono.
Any update, or possible fix coming?
I'm also experiencing this on OSX using the Microsoft.Build.NuGet packages (version 15.9.20) with mono 5.18.0.268.
@radical do you know if there's a simple fix from our fork we could upstream for this?
I remember the problem was TryFromVisualStudioProcess in https://github.com/Microsoft/msbuild/blob/master/src/Shared/BuildEnvironmentHelper.cs
but I don't remember exactly how it would throw it
In the end I did a hack by skipping the check in BuildEnvironmentHelper.Instance.RunningInVisualStudio
https://github.com/Ullink/gradle-msbuild-plugin/blob/master/src/main/dotnet/ProjectFileParser/MonoHack.cs
so removing the call of RunningInVisualStudio
should fix the issue
Are there any plans for making some progress on this? I have looked at the code, but there are clearly intended impacts on a number of different scenarios, and without knowing what all of those are and the ability to test them, it's not something I can fix myself.
Migrating my open source project to .NET Core has been blocked on this for 3 months...
Hi, is there a workaround for this? This causes a crash while instantiating an MSBuildWorkspace
on Mac, so it seems like it ought to be considered a high-severity bug.
@DustinCampbell, could you please weigh in on this one? It has been open for 3 years. I ran into it while using Visual Studio for Mac to build CodeConverter (see the link just above this comment box).
It's failing the test case in mono environment, by tracing the code I couldn't find where it could throw such exception in BuildEnvironmentHelper. Any help is appreciated Changes related: https://github.com/Ullink/gradle-msbuild-plugin/pull/77
https://travis-ci.org/Ullink/gradle-msbuild-plugin/builds/279544693?utm_source=github_status&utm_medium=notification
Exception detail: