-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need MSBuildLocator provide a way to register a known SDK location #276
Comments
This sounds like a bug to me; on Framework I believe that method does everything that's necessary to call MSBuild and it should be the same on core. |
yes, if RegisterMSBuildPath covers the environment variable logic, it will work for us perfectly. |
Hi @lifengl , We are discussing the priority of the ticket internally. I'll let you know when we address it. |
Hi @lifengl, The package with the change has been released: https://github.com/microsoft/MSBuildLocator/releases/tag/v1.7.8 |
Hey,
In C# DevKit scenario, we ran dotnet --version to compute runtime to use to load the project system. And we also run dotnet --list-sdks for other reasons. So we actually know the location of the SDK. (At least the fallback one if MSBuildLocator doesn't fully simulate the dotnet command). If there is a method to allow us to RegisterDotNetSdk(string sdkPath), we can potentially skip repeating searching the SDK, or have a fallback logic, when the searching logic doesn't match the dotnet command, which could happen in some odd installation scenarios, and make the extension more reliable on various platforms.
The problem is that we cannot create VisualStudioInstance (internal constructor), and call RegisterInstance. If we call RegisterMSBuildPath, we need repeat ApplyDotNetSdkEnvironmentVariables, which is private. And we don't want to repeat these logic done inside MSBuildLocator.
This would be a simple wrap for what has already been implemented inside MSBuildLocator.
The text was updated successfully, but these errors were encountered: