Conversation
|
Thanks for your contribution! As I already voiced in last reply, Before merge, Please try to also test this scenario for a long term solution because of Product.TeamExplorer, Product.TestAgent, ... etc |
|
Hi, sorry for the late reply (been quite busy at work). I gave a try to playing with hMSBuild.bat -vsw-priority Microsoft.VisualStudio.Product.BuildToolsdoes not return the msbuild I'm looking for. This is because the content of
This works for my use case, but I may be missing the point of the Don't we need a new argument to hmsbuild allowing to specify a product ID? For information, here is my current experiment (in frontend.bat @ line 458): |
Don't worry, it's okay for OSS :) On the contrary thank you for continuing review!
I think you did not understand my point. For So, my idea is similar to IDs (#8) for specified components use. For example, we need to compile C++ project, thus we need any related products that contains:
Therefore, we need just specify such as:
This still should return ANY products (because of Try to test this: or other related for your project.
Undesirable because of Please check this out for your components with your environments. Thanks. |
|
By the way, you can specify test cases via this: https://github.com/3F/hMSBuild/blob/master/tests/diffversions.bat#L16 |
I'm sure I didn't and not sure I do... In fact I'm not sure anymore what I should test. For now, if I'm using your version, whatever the id (even ones I'm sure were not installed) I pass to I experience though another difference: when I use your version, whatever the component id, I get a warning telling me: When I use mine, I only get the warning when the component was not installed. This makes sense to me as without |
I meant together with this PR/ after your patch for Because as I said, after So, please also test this for your env as possible to avoid any errors like above. |
|
ok, I think that makes more sense to me. I'll try my best to understand the issue in #8 and see if I can come with a repro. |
|
I also had a quick look at the test harness you mentioned. Not sure yet how I can use it, but I'll try too. |
|
I ran a few tests this morning. First, here is my setup. I tested on my dev machine which has installed:
If I simply run If I pass an ID to If I pass an ID that I know does not exist in VS2017, then 16.0 is returned: And I obtain the same results whether I use your Hence I suppose |
|
thanks for additional testing!
It makes sense for Anyway, I've also checked today the following case via clean VM :
>hmsbuild -debug -only-path
[ 5:31:59.34 ] trying via vswhere...
[ 5:31:59.36 ] bat/exe: C:\Users\reg\Desktop\test\vswhere
[ 5:31:59.37 ] bat/exe: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere
[ 5:31:59.39 ] vswbin: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
[ 5:31:59.39 ] attempts with filter:
[ 5:31:59.48 ] vspath: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
[ 5:31:59.50 ] vsver: 16.1.29102.190
[ 5:31:59.50 ] found path via vswhere: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin
[ 5:31:59.52 ] found /amd64
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\amd64\MSBuild.exe
>hmsbuild -debug -only-path -vsw-priority Microsoft.Net.Component.4.7.2.TargetingPack
[ 5:32:09.12 ] trying via vswhere...
[ 5:32:09.12 ] bat/exe: C:\Users\reg\Desktop\test\vswhere
[ 5:32:09.14 ] bat/exe: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere
[ 5:32:09.17 ] vswbin: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
[ 5:32:09.17 ] attempts with filter: Microsoft.Net.Component.4.7.2.TargetingPack
[ 5:32:09.28 ] vspath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
[ 5:32:09.28 ] vsver: 16.1.29102.190
[ 5:32:09.30 ] found path via vswhere: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
[ 5:32:09.30 ] found /amd64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\amd64\MSBuild.exe
Looks good because it returns msbuild from The general product So I think |
|
@odalet Your PR approved as a permanent solution! |
|
Thanks for the hard work testing in a vm! |
* 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.
No description provided.