I'm trying to figure out how to make my Wix project build the MSI in my GitLab pipeline. I keep getting and error stating:
error MSB3073: The command "rd /s /q "..\ATLAS Management Server\bin\Debug\net7.0\win-x86"" exited with code 127.
The package should be a x64 not x86, and when I build it in my local dev environment it build as an x64, and with no errors. I'm not sure what is going wrong. Do I need to specify build options for the "dotnet build" command in my .gitlab-ci.yml file?
Currently my pipeline looks like this:
variables:
OBJECTS_DIRECTORY: obj
NUGET_PACKAGES_DIRECTORY: ".nuget"
SOURCE_CODE_PATH: "*/*/"
TAG_LATEST: "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME:latest"
TAG_COMMIT: "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA"
stages:
- build
- test
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
paths:
- "$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/project.assets.json"
- "$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/*.csproj.nuget.*"
- "$NUGET_PACKAGES_DIRECTORY"
policy: pull-push
build:
image: mcr.microsoft.com/dotnet/sdk:6.0
stage: build
script:
- dotnet build --no-restore
before_script:
- dotnet restore --packages $NUGET_PACKAGES_DIRECTORY
tests:
image: mcr.microsoft.com/dotnet/sdk:6.0
stage: test
script:
- dotnet test --no-restore
Ok, figured this out, now my project builds. Basically you have to set the project to only build the x64 runtime or it will always try x86.
It has to be set in the .csproj file.