【发布时间】:2016-10-17 22:29:09
【问题描述】:
我已经按照此处描述的类似方式配置了我的 VSTS 持续集成:https://azure.microsoft.com/pl-pl/documentation/articles/service-fabric-set-up-continuous-integration/。不幸的是,在安装最新版本的 Azure Service Fabric SDK 2.1.150 后,我的“构建”步骤停止工作。我收到以下错误:
The OutputPath property is not set for project 'ServiceFabricProjectName.sfproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Release' Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
据我所知,在项目迁移到最新版本期间,对 *.sfproj 文件进行了以下更改:
- 为 Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.1.0 添加了项目导入
- 添加了以下项目:
<ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> - 添加了几个其他项目导入。其中之一是来自 Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.1.0 包的目标。
奇怪的是,当我登录构建代理虚拟机并在 Visual Studio 中从 C:\agent_work\1\s\ProjectName 运行解决方案并将构建配置更改为 Release | x64,我能够构建它。当我在 VSTS 中禁用“git clean -fdx”步骤时,所有后续 CI 构建都会成功。它看起来真的很奇怪,并且使用以前版本的 Service Fabric SDK 一切正常。
有没有人观察到类似的问题?
【问题讨论】:
-
您是否在构建定义中恢复 NuGet 包?您是否在构建日志中看到正在恢复 Microsoft.VisualStudio.Azure.Fabric.MSBuild 包?
-
如果有人解决了,我会看到同样的问题
-
实际上,这是一个 dotnet 核心项目,我包括“dotnet restore”步骤,没有旧式 NuGet 包恢复。添加此步骤后,问题停止发生,但现在我面临其他错误:CS0006:找不到元数据文件。但我不确定它是否与这个问题有关。无论如何 - 谢谢@MattThalman 的回复!