TargetProfile indicates no default service configuration error

I am creating an Azure Cloud service application in the TFS 2012 build definition. Everything works correctly with the default setting of Cloud . However, when I set the TargetProfile property to MSBuild arguments, I get the following error. The service configuration file exists in the project, and I can select it in the project properties.

Is there anything else I need to do to get the assembly to recognize a configuration other than the default settings?

Arguments MSBuild

/ t: Publish / p: PublishDir = \ buildserver \ builddrops \ LocA \ / p: TargetProfile = CloudLocA

Error message

C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v11.0 \ Windows Azure Tools \ 1.8 \ Microsoft.WindowsAzure.targets (353): The default service configuration "ServiceConfiguration.cscfg" cannot be found in the project.

+7
source share
2 answers

I understood, and this is not related to the TargetProfile property. I had the build definition set up only to clear workspace outputs. When I looked at the source folder on the build server, I realized that it did not reset additional service configuration files, so I could not find what I specified in the TargetProfile property. I changed the setting of the clean workspace to everything, and now everything works.

+5
source

Have you tried to bind TargetProfile to $(Configuration) ? In my last project, I configured the Azure project with the following settings, and it worked fine:

  ... <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> 
+4
source

All Articles