我正在 TFS 2012 构建定义中构建 Azure 云服务应用程序。使用默认的云配置一切正常。但是,当我在 MSBuild
参数中设置 TargetProfile
属性时,出现以下错误。服务配置文件存在于项目中,我可以在项目属性中进行选择。
我需要做一些额外的事情才能让构建识别非默认配置吗?
MSBuild 参数
/t:Publish /p:PublishDir=\buildserver\builddrops\LocA\ /p:TargetProfile=CloudLocA
错误消息
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\1.8\Microsoft.WindowsAzure.targets (353): No default service configuration "ServiceConfiguration.cscfg" could be found in the project.
最佳答案
我弄清楚了,它最终与 TargetProfile
属性无关。我将构建定义设置为仅清理工作区输出。当我查看构建服务器上的源文件夹时,我意识到它没有下拉附加服务配置文件,因此它找不到我在 TargetProfile
属性中指定的内容。我将干净工作区设置更改为全部,现在一切正常。
关于azure - TargetProfile 给出无默认服务配置错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14111965/