-
-
Notifications
You must be signed in to change notification settings - Fork 6
Support for VS2019 msbuild #11
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
Conversation
|
Used in gitextensions/gitextensions#6500, only VS2017 available in AppVeyor yet |
|
Thanks for your contribution!
an amazing batch-engine :( I think, this is the same problem like it was for this block. Part of this uses evaluation by force, like: set /a "idx+=1" & call :eval arg[!idx!] v
.........................^...\___^___/->exactly because of bug similar to processing with set /a "idx+=1" & if %idx% LSS !amax! goto loopargs
.......................^....^My idea for the mentioned an evaluation by force was through passing arguments to function, like ping-pong: set _vl=!%1!
...
set %2=!_vl!looks like we can try to use something similar or also call :eval. But today's :dbgprint {in:str} [{in:uneval1}, [{in:uneval2}]]
:: full argument processing requires more code, therefore I'm considering only first two after incoming stringhmm, any idea ? seems I also need to test this later in real usage :( today or tomorrow, I hope. Btw, functional tests can be raised by tests.bat |
|
Updated, fails for other reason now in AppVeyor: For tests, I assume thatoptions to set preferred msbuild version will be needed, but how to test this without requiring specific installs? |
Here, I'm using this batch script test-cases through msbuild targets This is why hMSBuild also contains an post-action block, like there: Or what do you mean?
Looks like it does not related to hMSBuild because, as I see, you're using compiled hMSBuild.full.bat script. I mean, this 'val2}]]' data shouldn't be generated from us in any case. But I can also inspect your build later If you sure with this. By the way, why not to use something like: set msbuild=hMSBuild -notamd64instead of: for /f "tokens=*" %%i in ('hMSBuild.bat -only-path -notamd64') do set msbuild="%%i"from your Build.cmd |
|
So, before merge this PR, @gerhardol and anyone else: Do you have some new noticed strange behavior or something more for this changes? vs2019 and old versions too. We need to consider this before 28 May. Thanks. |
2714c39 to
ead01cc
Compare
|
I fixed a whitespace change I believe this PR can be merged (I have not added tests), either you squash it or I do it.
It was set up the original way so I could easily see what path that was choosen. |
|
Wait a second, this behavior reminds me this: #2 Please check this out! I think this is it. Because of adding additional irrelevant instructions before problem place. Either this or
I had plan to squash this of course. But you can do this yourself if you want normal merge. As you prefer. |
ead01cc to
fe8bd4f
Compare
Updated hMSBuild with patch 3F/hMSBuild#11 Use 64bit build where possible Note: Using hMSBuild.full.bat gives parse errors on Appveyor why the compressed/compiled version is used
|
It is kind of working for me now. Can I add this printout to this PR or is there a better solution? I would have preferred to use the full version, as the compiled/compressed is impossible to debug. Thanks for the product, sorry that I get frustrated when the work does not play together with other parts of the puzzle... |
|
They are both compiled via vsSBE together with integrated GetNuTool core. Compression/minimization just provides more verification, controls, etc. As you already noticed:
However, should we add both versions for public releases? For batch scripts this is hard to achieve the same result, thus a single public version is better at least for support.
Let's see, I will try to debug this problem today (appveyor + same your commits). Because this can hide more critical problems such as #9 !
exactly my thoughts -_- |
If "full" has apparent problems (size?) then it should not be released. But I hope it is just something I have missed. |
|
Okay... Firstly, I've reproduced https://ci.appveyor.com/project/gitextensions/gitextensions/builds/24135726 error locally: D:\tmp\_Issues\hMSBuild\PR11\gitextensions-572527c8e46e864112c5328a4ef36a2686ffb72c>Setup\Build.cmd
'val2}]]' is not recognized as an internal or external command,
operable program or batch file.
The filename, directory name, or volume label syntax is incorrect.
Checking for updates from https://www.nuget.org/api/v2/.
...Now I'm sure this is CRLF problems (again see #2) Secondly, I checked new commits: https://ci.appveyor.com/project/gerhardol/gitextensions/builds/24819082 See:
Can you try again with full version. I don't see problems at least for your You can also try to use |
I see. My usual debugging includes recompilation that's hard for end-users because you need to clone repo and prepare environment for diag. I'll think about both public versions, you can create issue to consider this later. |
Updated hMSBuild with patch 3F/hMSBuild#11 Use 64bit build where possible Set filemode to crlf Note: Using hMSBuild.full.bat gives parse errors on Appveyor why the compressed/compiled version is used
Updated hMSBuild with patch 3F/hMSBuild#11 Use 64bit build where possible Set filemode to crlf Note: Using hMSBuild.full.bat gives parse errors on Appveyor why the compressed/compiled version is used
Tested, executes also without the ":dbgprint" patch So all seem fine (even if tests are missing). Thanks! |
|
Accepted. @gerhardol Thank you again for your contribution. Planned v2.1 will not contain an .full version. However, I'll think about adding this in future releases. |
* NEW: Support for VS2019 msbuild (Thanks @gerhardol) * CHANGED: Removed possible last extra slash `\` from path, ie. ~ `..\Bin\\MSBuild.exe` When x32 for searching from Visual Studio with `-notamd64` key. Part of PR #11 * CHANGED: Default remote vswhere is 2.6.7. https://github.com/microsoft/vswhere/releases/tag/2.6.7
https://github.com/3F/GetNuTool/releases/tag/1.8 This also updates build scripts because of modern vsSolutionBuildEvent 1.14 (used from GetNuTool 1.8) +known problem: 3F/vsSolutionBuildEvent#61 And as I promised, an compiled.full version now will be distributed together with official hMSBuild releases (zip package): #11 (comment)
* FIXED: Possible infinite self-call recursion due to built-in GetNuTool 1.9+ and hMSBuild invoking itself.
Affected all versions with built-in GetNuTool 1.9 (hMSBuild 2.4 and 2.4.1)
* FIXED: Calling built-in GetNuTool using keys with empty ""
e.g. proxycfg="" etc.
* NEW: Improved security via env protected properties (GetNuTool 1.10+) when using remote vswhere.
(without a key -no-vswhere)
More about: https://github.com/3F/GetNuTool?tab=readme-ov-file#tmodes-and-commands
Or command: hMSBuild -GetNuTool ~/p:use=documentation
* NEW: hMSBuild.bat edition now fully supports LF and uses this by default instead of CRLF.
LF/CRLF of course affects the checksums, hMSBuild -GetNuTool +hMSBuild/2.5
* LF (actual): hMSBuild.bat.sha1
* CRLF (possible): hMSBuild.bat.crlf.sha1
It means .gitattributes control for CRLF in hMSBuild.bat is not necessary anymore in cases when core.autocrlf=input etc.
See related: #2
However, this will not affect users who used the full edition hMSBuild.full.bat
(related #11)
which is still not protected due to incorrect shiftings in cmd processor when switching to LF.
* NEW: Full hMSBuild edition access:
```
gnt ~hMSBuild /p:use=full
```
```
hMSBuild -GetNuTool ~hMSBuild /p:use=full
```
* NEW: API. +:eva {in:unevaluated} {out:evaluated} {in:option}
evaluate argument
```
:: &(1) - Input via a variable. Use ` to apply " quotes inside "..." if [3]==1.
:: *&(2) - Evaluated output via a variable.
:: [3] - Option to enable support for extra quotes. Values: 1 == ` as "
:: !!0
```
* NEW: API. +:inita {in:vname} {in:arguments} {out:index}
initialize arguments
```
:: (1) - Input variable name.
:: &(2) - Input arguments via a variable.
:: *&(3) - Returns the reached index (maximum) via a variable.
:: !!0
```
* NEW: +.pkg.install.bat v1 support in hMSBuild nuget packages.
```
gnt ~hMSBuild
```
```
gnt *hMSBuild/2.5
```
Syntax and relevant documentation:
hMSBuild -GetNuTool -help
hMSBuild -GetNuTool ~/p:use=documentation
Or visit https://github.com/3F/GetNuTool
* NEW: Self updating support: hMSBuild -GetNuTool ~hMSBuild/2.5
* NEW: Added validate.hMSBuild.bat helper to validate core itself.
* NEW: Added srv.create.bat to prepare local server access.
* NEW: Official nuget package, hMSBuild:
https://www.nuget.org/packages/hMSBuild/
* CHANGED: Default remote vswhere is 3.1.7
* CHANGED: Updated built-in GetNuTool 1.10.
Anniversary (10 years) update GetNuTool 1.10 //github.com/3F
adds new modes (install, run, touch, get, grab, pack); custom scripts;
improves security; and became even more compact for .bat edition (now 7.87 KB); and ...
https://github.com/3F/GetNuTool/releases/tag/1.10
* NOTE: Self validation via command:
```
hMSBuild -GetNuTool ~& svc.gnt -sha1-cmp hMSBuild.bat sha1 -package-as-path
```

Fixes #10
Support for VS2019, where msbuild path has changed