Mik*_*Dev 8 msbuild azure tfsbuild azure-cloud-services
我正在使用TFS 2012构建定义构建Azure云服务应用程序.使用默认的云配置,一切正常.但是当我TargetProfile在MSBuild参数中设置属性时,我得到以下错误.服务配置文件存在于项目中,我可以在项目属性中进行选择.
我需要做些什么来让构建识别非默认配置吗?
/ t:发布/ 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):在项目中找不到默认服务配置"ServiceConfiguration.cscfg".
您是否尝试过将 绑定TargetProfile到$(Configuration)?在我的上一个项目中,我使用以下设置配置了 Azure 项目,并且运行良好:
...
<PropertyGroup>
<TargetProfile Condition="'$(TargetProfile)'==''">$(Configuration)</TargetProfile>
</PropertyGroup>
<!-- Items for the project -->
<ItemGroup>
<ServiceDefinition Include="ServiceDefinition.csdef">
<SubType>Designer</SubType>
</ServiceDefinition>
<None Include="ServiceDefinition.Debug.csdef">
<SubType>Designer</SubType>
<DependentUpon>ServiceDefinition.csdef</DependentUpon>
</None>
<None Include="ServiceDefinition.Demo.csdef">
<SubType>Designer</SubType>
<DependentUpon>ServiceDefinition.csdef</DependentUpon>
</None>
<None Include="ServiceDefinition.Release.csdef">
<SubType>Designer</SubType>
<DependentUpon>ServiceDefinition.csdef</DependentUpon>
</None>
<ServiceConfiguration Include="ServiceConfiguration.Debug.cscfg">
<SubType>Designer</SubType>
</ServiceConfiguration>
<ServiceConfiguration Include="ServiceConfiguration.Demo.cscfg">
<SubType>Designer</SubType>
</ServiceConfiguration>
<ServiceConfiguration Include="ServiceConfiguration.Release.cscfg">
<SubType>Designer</SubType>
</ServiceConfiguration>
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
我弄清楚了,结果与TargetProfile房产无关.我将构建定义设置为仅清理工作区输出.当我查看构建服务器上的sources文件夹时,我意识到它没有删除其他服务配置文件,因此无法找到我在TargetProfile属性中指定的内容.我将干净的工作区设置更改为all,现在一切正常.
| 归档时间: |
|
| 查看次数: |
7768 次 |
| 最近记录: |