Skip to content
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

Buildalizer chooses MSBuild without .NET components #165

Open
Inok opened this issue Jan 23, 2021 · 4 comments
Open

Buildalizer chooses MSBuild without .NET components #165

Inok opened this issue Jan 23, 2021 · 4 comments
Labels
New Feature New Feature

Comments

@Inok
Copy link

Inok commented Jan 23, 2021

I have the following Visual Studio installations:

  • Visual Studio 2019 (with .NET components)
  • Visual Studio Build Tools 2019 (with C++ components only)

Buildalizer chooses VS Build Tools 2019 installation to run msbuild. Since it has no .NET components, the build fails. Installing .NET components to that installation fixes the problem. But maybe it's possible to choose the appropriate installation by a Buildalizer itself?

@daveaglick
Copy link
Collaborator

What an interesting scenario. It never occurred to me this might be a problem, but it makes total sense. I guess the challenge is knowing which one to pick - I.e. if it were reversed and the VS Build Tools had the .NET components but the VS install only had C++, how would we know?

@Inok
Copy link
Author

Inok commented Jan 24, 2021

vswhere allows to search for VS installation with required components: https://github.com/microsoft/vswhere
I guess it can be used to find appropriate installation. It's a part of VS Installer, so it's possible to call it from there. Also, it looks like there is an option to distribute vswhere as a part of Buildalizer.

@birojnayak
Copy link

@daveaglick @Inok is there a plan to fix this issue ? we are using this project for building another tool and would be happy to contribute and fix if not fixed yet....

@smhmhmd
Copy link

smhmhmd commented Oct 27, 2021

How about https://github.com/microsoft/MSBuildLocator

What is Locator for?
MSBuild offers a .NET API surface that allows you to evaluate and build MSBuild projects from an application.

Loading MSBuild from Visual Studio also ensures that your application gets the same view of projects as MSBuild.exe,
dotnet build, or Visual Studio, including bug fixes, feature additions, and performance improvements that may come from a newer MSBuild release.

@phmonte phmonte added General Enhancement New feature or request New Feature New Feature and removed ⚠ Bug Something isn't working as expected General Enhancement New feature or request labels Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature New Feature
Projects
None yet
Development

No branches or pull requests

5 participants