# gitlab CI/CD for Visual Studio 2019

**URL:** <https://discourse.vtk.org/t/gitlab-ci-cd-for-visual-studio-2019/9833>\
**Category:** Development\
**Created:** [November 16, 2022, 12:20am UTC](https://discourse.vtk.org/t/gitlab-ci-cd-for-visual-studio-2019/9833 "2022-11-16T00:20:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drpeterfranz](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/f19dbf/32.png) [@drpeterfranz](https://discourse.vtk.org/u/drpeterfranz)\
**Post date:** [November 16, 2022, 12:20am UTC](https://discourse.vtk.org/t/gitlab-ci-cd-for-visual-studio-2019/9833/1 "2022-11-16T00:20:22Z")

</div>

Hi guys,

sorry it’s slighty off ‘vtk’ topic…

I am trying to get a gitlab CI/CD pipeline going, and I _really_ struggle getting my project built using Windows/Visual Studio 2019.

I notice that VTK has runners using VS 2019. Is there a place where a CI dummy like myself could have a look at the setup for these pipelines (how to create docker images from scratch for Windows, VS, etc) to draw some really needed inspiration from?

Cheers

Peter

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)\
**Post date:** [November 17, 2022, 1:42pm UTC](https://discourse.vtk.org/t/gitlab-ci-cd-for-visual-studio-2019/9833/2 "2022-11-17T13:42:09Z")

</div>

We do not use Docker images because, for our use case, Windows Docker images are not sufficient. Of note:

- VS requires a specific “dotnetsdk” base image; if you don’t use that, you cannot install VS;
- Windows Docker image disk sizes are fixed at creation time;
- the base image with VS and Qt installed was 10G+;
- filesystem access was _sllooooowww_ and builds took a long time;
- no useful OpenGL access, so testing could not happen inside of a Docker image anyways.

We just run on bare metal with VS installed. The runner provides the `VS160COMNTOOLS` envvar and the CI pulls `vcvarsall.bat`’s path from that. We also use tags to say exactly what versions of VS are installed and the job adds the relevant tag and tells `vcvarsall.bat` to load _this_ version instead of whatever the default is.

---

<div class="post-metadata">

**Author:** ![drpeterfranz](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/f19dbf/32.png) [@drpeterfranz](https://discourse.vtk.org/u/drpeterfranz)\
**Post date:** [November 17, 2022, 6:46pm UTC](https://discourse.vtk.org/t/gitlab-ci-cd-for-visual-studio-2019/9833/3 "2022-11-17T18:46:07Z")

</div>

Thanks @ben.boeckel for this information. I am new to the whole CI/CD and docker thing, and while I found it relatively easy to get everything working under linux, under windows I started scratching my eyes out.

So that’s obviously not the way to get it done; I’ll check my alternatives but it looks like your way is sensible. Thanks for this help, you have saved my many hours of frustration!
