microsoft / MSBuildLocator

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
212 stars 83 forks source link

Allow finding Visual Studio installs on Windows on .NET 6+. #207

Closed Quogu closed 4 months ago

Quogu commented 1 year ago

This is a very important use-case for me, because the .NET SDKs can't process .vcxproj files but Visual Studio can, so being unable to locate Visual Studio build tools at all means I can't run my app on .NET. I think it makes sense to change this given that the readme file explicitly talks about it not being enough to load some projects, so allowing more users to load more projects seems to fit with the project's ethos.

I've tested this on Windows, and it works perfectly for my use-case. Unfortunately I don't have access to other supported .NET platforms, but I'm fairly confident it'll work correctly - GetDevConsoleInstance has all the APIs available but will certainly return null, and VisualStudioLocationHelper.GetInstances will catch a DllNotFoundException and continue, so the end result should be the same.

Quogu commented 1 year ago

@microsoft-github-policy-service agree company="Sony Interactive Entertainment"

YuliiaKovalova commented 4 months ago

The PR seems to be outdated. Feel free to reopen and address the conflicts if you still need this feature. Thank you!