Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure构建正在添加一个额外文件夹(win-x64),导致构建中断_Azure_Azure Devops_Wix - Fatal编程技术网

Azure构建正在添加一个额外文件夹(win-x64),导致构建中断

Azure构建正在添加一个额外文件夹(win-x64),导致构建中断,azure,azure-devops,wix,Azure,Azure Devops,Wix,给定: Visual Studio 2019 Web API.Net Core 3.1 Wix工具集3.1.1(最新版本) Visual Studio 2019的Wix工具集扩展 Windows 2016 Azure DevOps 2019 我所要做的就是使用Wix工具集为一个非常简单的WebAPI项目创建一个.msi文件 该构建当然可以在本地完美运行,但当它在Azure构建中运行时,我会出现以下错误,因为添加了一个额外的文件夹(win-x64) 以下是Azure管道中的构建脚本片段: - ta

给定:
Visual Studio 2019 Web API.Net Core 3.1
Wix工具集3.1.1(最新版本)
Visual Studio 2019的Wix工具集扩展
Windows 2016 Azure DevOps 2019

我所要做的就是使用Wix工具集为一个非常简单的WebAPI项目创建一个.msi文件

该构建当然可以在本地完美运行,但当它在Azure构建中运行时,我会出现以下错误,因为添加了一个额外的文件夹(win-x64)

以下是Azure管道中的构建脚本片段:

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:PublishProfile=FolderProfile'
    configuration: '$(buildConfiguration)'
第1步\bin\Release\netcoreapp3.1\win-x64\publish\WebApplication1.exe'


您的意思是文件存在于
C:\agent2\\u-work\4\s\WebApplication1\bin\Release\netcoreapp3.1\publish
,但是DevOps build表明
C:\agent2\\u-work\4\s\WebApplication1\bin\Release\netcoreapp3.1\win-x64\publish
?这是正确的。您提到的构建在本地工作得很好,您在这个构建代理机器上运行构建吗?请尝试将variable system.debug设置为True,并共享日志。使用Wix时是否需要完整的Visual Studio?我只有构建工具?你有构建工具的意义是什么?您提到您有用于VisualStudio2019的Wix工具集扩展。如何在本地构建项目?请尝试在生成代理计算机上本地运行生成,以查看结果。您的意思是这些文件存在于
C:\agent2\\u work\4\s\WebApplication1\bin\Release\netcoreapp3.1\publish
中吗,但是DevOps build表示
C:\agent2\\u work\4\s\WebApplication1\bin\Release\netcoreapp3.1\win-x64\publish
?没错,您提到的构建在本地运行得非常好,您在这个构建代理计算机上运行构建吗?请尝试将variable system.debug设置为True,并共享日志。使用Wix时是否需要完整的Visual Studio?我只有构建工具?你有构建工具的意义是什么?您提到您有用于VisualStudio2019的Wix工具集扩展。如何在本地构建项目?请尝试在构建代理计算机上本地运行构建,以查看结果如何。
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.