travis生成由于MSB4019而无法运行msbuild;>

问题描述 投票:0回答:1

我正在尝试使用travis在Windows环境中自动构建golang项目,并使用.exemsbuild打包wix

与Github动作完全相同的配置,因此我认为.wixprojwxs都是正确的,并且在travis安装中msbuild的配置存在一些问题,但是我没有更多线索了。

可能是travis安装的msbuild不包括必需的wix工具集,我尝试安装它们,但是在创建软件包时错误仍然存​​在


错误

C:\Users\travis\gopath\src\github.com\gallo-cedrone\nri-elasticsearch\pkg\windows\nri-amd64-installer\nri-installer.wixproj" (default target) (1) ->
C:\Users\travis\gopath\src\github.com\gallo-cedrone\nri-elasticsearch\pkg\windows\nri-amd64-installer\nri-installer.wixproj(34,5): 
error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\WiX\v3.x\Wix.targets" was not found. 
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

。travis

...
  - os: windows
    env:
    - MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
    before_script:
    - powershell Install-WindowsFeature Net-Framework-Core
    - cinst -y wixtoolset
    script:
    - export PATH=$MSBUILD_PATH:$PATH
    - go test ./src/
    - go build -v -o ./target/bin/windows_amd64/nri-elasticsearch.exe  ./src/
    - msbuild.exe -version
    - cd ./pkg/windows/nri-amd64-installer/ ; pwd ; env ; msbuild.exe ./nri-installer.wixproj
...

travis job logs

我正在尝试使用travis在Windows环境中自动构建golang项目,并使用msbuild和wix打包.exe。与Github动作完全相同的配置...

msbuild wix travis-ci
1个回答
0
投票

由于enter link description here,我找到了解决方案

© www.soinside.com 2019 - 2024. All rights reserved.