An API to locate MSBuild assemblies from an installed Visual Studio location. Use this to ensure that calling the MSBuild API will use the same toolset that a build from Visual Studio or msbuild.exe would.
Other
220
stars
83
forks
source link
MSBuildLocator.RegisterDefaults() throws on Mono #72
I'm using Microsoft.Build.Locator 1.2.2 NuGet package in my net472 console application. This application is executed on macOS using mono. The goal is to analyze a solution (.sln) with MSBuildWorkspace.
Hello guys!
I'm using
Microsoft.Build.Locator 1.2.2
NuGet package in mynet472
console application. This application is executed on macOS usingmono
. The goal is to analyze a solution (.sln) withMSBuildWorkspace
.MSBuildLocator.RegisterDefaults()
fails withPlatformNotSupportedException
because there is a call fromVisualStudioLocationHelper.GetQuery()
toMarshal.GetTypeFromCLSID
which is not supported on Mono (https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs#L838)Am I misunderstanding something or it is impossible to use
Microsoft.Build.Locator
on Mono?P.S. .NET Core doesn't work for me, because Core MSBuildWorkspace fails to load non-Core solutions.