gusztavvargadr / packer

Packer templates for building Windows and Ubuntu images

Home Page:https://app.vagrantup.com/gusztavvargadr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vcvarsall.bat is missing

dmikushin opened this issue · comments

vcvars64.bat is internally calling vcvarsall.bat to put the visual studio compilers into the command line. With this container it does not work, because vcvarsall.bat is missing:

 "C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat"' is not recognized as an internal or external command, operable program or batch file.

Could it be that your are manually picking files for the installation, and some got missed out? Thanks.

@dmikushin just to confirm, which box and which provider / version are you using? Can you maybe share your Vagrantfile too to reproduce it easier? Btw I'm using the default installer with standard parameters, you can take a look at them here.

Hi @gusztavvargadr , sorry for the noise I've figured out this error happens when Visual Studio does not include the C++ development module. So on top of your gusztavvargadr/windows-server, in my provisioning I need to add something like this:

vs_community.exe --installPath $vsHome
        --add Microsoft.VisualStudio.Workload.NativeDesktop
        --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64
        --add Microsoft.VisualStudio.Component.Windows10SDK.19041

Thanks a lot for your excellent work! 👍

@dmikushin sorry for the delayed response.

Glad that you could figure this out. If you have any recommendations on new tooling in the boxes, feel free to open a dedicated issue. For VS, I have some provisioning samples https://github.com/gusztavvargadr/chef using Chef. I currently have boxes for VS on the client versions of Windows (10 and 11), but can add back VS on top of Windows Server if needed.

Thanks!