azure - Azure Builds 正在添加一个额外的文件夹 (win-x64) 导致构建中断
问题描述
给定:
Visual Studio 2019 Web API .Net Core 3.1
Wix Toolset 3.1.1(最新)
Wix Toolset Extension for Visual Studio 2019
Windows 2016 Azure DevOps 2019
我要做的就是使用 Wix 工具集为一个非常简单的 WebAPI 项目创建一个 .msi 文件。
该构建当然可以在本地完美运行,但是当它在 Azure Builds 中运行时,我收到以下错误,因为添加了一个额外的文件夹(win-x64)
这是 Azure Pipelines 中的构建脚本片段:
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:PublishProfile=FolderProfile'
configuration: '$(buildConfiguration)'
ication1\bin\Release\netcoreapp3.1\win-x64\publish\WebApplication1.exe'
Link:
C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe -out C:\agent2\_work\4\s\SetupProject1\bin\Release\SetupProject1.msi -pdbout C:\agent2\_work\4\s\SetupProject1\bin\Release\SetupProject1.wixpdb -cultures:null -contentsfile obj\Release\SetupProject1.wixproj.BindContentsFileListnull.txt -outputsfile obj\Release\SetupProject1.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj\Release\SetupProject1.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile C:\agent2\_work\4\s\SetupProject1\SetupProject1.wixproj obj\Release\Product.wixobj
Windows Installer XML Toolset Linker version 3.11.2.4516
Copyright (c) .NET Foundation and contributors. All rights reserved.
C:\agent2\_work\4\s\SetupProject1\Product.wxs(28): error LGHT0103: The system cannot find the file 'C:\agent2\_work\4\s\WebApplication1\bin\Release\netcoreapp3.1\win-x64\publish\WebApplication1.exe'. [C:\agent2\_work\4\s\SetupProject1\SetupProject1.wixproj]
##[error]SetupProject1\Product.wxs(28,0): Error LGHT0103: The system cannot find the file 'C:\agent2\_work\4\s\WebApplication1\bin\Release\netcoreapp3.1\win-x64\publish\WebApplication1.exe'.
C:\agent2\_work\4\s\SetupProject1\Product.wxs(31): error LGHT0103: The system cannot find the file 'C:\agent2\_work\4\s\WebApplication1\bin\Release\netcoreapp3.1\win-x64\publish\appsettings.json'. [C:\agent2\_work\4\s\SetupProject1\SetupProject1.wixproj]
##[error]SetupProject1\Product.wxs(31,0): Error LGHT0103: The system cannot find the file 'C:\agent2\_work\4\s\WebApplication1\bin\Release\netcoreapp3.1\win-x64\publish\appsettings.json'.
Done Building Project "C:\agent2\_work\4\s\SetupProject1\SetupProject1.wixproj" (default targets) -- FAILED.
Done Building Project "C:\agent2\_work\4\s\Solution1.sln" (default targets) -- FAILED.
Build FAILED.
解决方案
推荐阅读
- http - HAProxy - HTTP/1.1 前端和 HTTP/2 后端?一个好主意?
- jquery - 我想对 Scripts.Render 使用 defer 并使用 Styles.Render 预加载
- haskell - 在 Dijkstra 的 Haskell 实现中无法发现代码中的问题
- ios - 如何从 iOS Extension 访问 Flutter 项目的 ObjectBox 数据库?
- android-studio - 禁止三星粗体样式覆盖系统应用程序
- web-services - 引起:org.apache.cxf.binding.soap.SoapFault:[ISS.0088.9166] 找不到soapAction 的活页夹
- php - 上传到实时服务器后,setcookie 不起作用
- xml - XSLT Transformer 不显示数据
- javascript - 为什么跨模块的相互依赖函数在节点javascript中的运行时评估为未定义
- azure - Azure 存储——如何在 Azure 门户上查找访问密钥