an alternative approach to Windows-based container
- Use the .NET Core cross-platform tools to build your projects on a Linux container. Make sure your projects target .NET Core or .NET 5/6, which are cross-platform.
- Use the .NET Core cross-platform tools to build your projects on a Linux container. Make sure your projects target .NET Core or .NET 5/6, which are cross-platform.
sample .gitlab-ci.yml
file
image: mcr.microsoft.com/dotnet/sdk:5.0
stages:
- build
- package
before_script:
- apt-get update
- apt-get install -y wine
- wine --version
build:
stage: build
script:
- dotnet restore
- dotnet build --configuration Release
package:
stage: package
script:
- wget https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
- unzip wix311-binaries.zip -d wix
- export PATH=$PATH:$(pwd)/wix
- wine candle.exe -arch x64 your_wix_project.wxs
- wine light.exe -ext WixUIExtension -ext WixUtilExtension -out your_package_name.msi your_wix_project.wixobj
artifacts:
paths:
- your_package_name.msi
Please note that it is recommended to use a Windows-based GitLab runner when working with .NET Framework projects and MSI packages