-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Find MSBuild when only Build Tools are installed #12
Comments
Thanks for the report! Right, the default values of I'm not sure about
But anyway, the mentioned BuildTools is important for our hMSBuild to be searched by default. Here's src of this part: https://github.com/3F/hMSBuild/blob/master/frontend.bat Cc: @gerhardol |
OK, so I used Imo, vswhere should support VS Build Tools the same way it supports other editions; however, judging by the comments in various issues, it seems they won't do that. Anyway (and this goes for the If you want to limit the range of workloads searched for msbuild, we'll have to pass the whole list of workloads we want to support; something along this line: vswhere.exe -products Microsoft.VisualStudio.Product.BuildTools Microsoft.VisualStudio.Product.Community Microsoft.VisualStudio.Product.Professional Microsoft.VisualStudio.Product.Enterprise I ensured this snippet indeed found something both on my French Windows 10 workstation (with VS2017 + VS2019 Enterprise) and on my CI Server (English Windows 2019) with only VS2019 Build Tools (hence I'm rather confident about the space being a work-across-cultures separator) In the meantime, I'll provide you with the PR (simply adding Any way, thanks for this cool tool! |
hMSBuild was based on GetNuTool so you can even use specific version of vswhere via About In 2.0 I implemented an
Can someone else also check this scenario when
I'm glad that's really helpful tool. We also use it a lot :) |
* FIXED: Fixed searching from MS BuildTools products. Issue #12 (Thanks @odalet). * CHANGED: [VS2017+] hMSBuild will search now in ANY available products. PR #13 (Thanks @odalet). * NOTE: In addition to changes above, please use `-vsw-priority` and `-force` keys to use only what is needed. Issues: #8, #14.
* NEW: Implemented `-vsw-as "args..."` Reassigns default commands to vswhere if used. For example: ``` hMSBuild -only-path -vsw-as "-products Microsoft.VisualStudio.Product.BuildTools" ``` Related Issues: #12, #14, #8, * CHANGED: VS2017+. Using the most modern instance by default. You can also specify `-vsw-priority` and `-force` keys to use only what is needed. Related Issues: #14, #8. * CHANGED: Updated wswhere to 2.8.4 by default. * CHANGED: Updated GetNuTool 1.8 https://github.com/3F/GetNuTool/releases/tag/1.8 Most important fix for hMSBuild: "The remote server returned an error: (407) Proxy Authentication Required." Related issue: 3F/DllExport#133 * NOTE: An compiled.full version now will be distributed together with official hMSBuild releases. https://twitter.com/GitHub3F/status/1218224792970715136 (zip packages) https://github.com/3F/hMSBuild/releases
I installed a new machine only with VS2019 Build Tools and hmsbuild only finds
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\\MSBuild.exe
. Well that's not good because my build really needs a recent MSBuild.After having a look at the un-minified source code here + vswhere conditions for detecting Build Tools (it does not by default, which, imo, is a pity...), I hacked directly in the minified hmsbuild and added the
-products *
in the call to vswhere. And bam, here my brand new MSBuild from VS2019 appears...Could you add this option? This would be really helpful for CI machines. Thanks!
PS: Attached is my modified hMSBuild. The interesting line is #292
hMSBuild.bat.txt
The text was updated successfully, but these errors were encountered: