TargetProfile gives No default service configuration error TargetProfile gives No default service configuration error azure azure

TargetProfile gives No default service configuration error


I figured it out and it ended up not being related to the TargetProfile property. I had my build definition set to only clean the workspace outputs. When I looked at the sources folder on the build server I realized it wasn't pulling down the additional service configuration files so it couldn't find what I was specifying in the TargetProfile property. I changed the clean workspace setting to all and everything is working now.


Have you tried tying the TargetProfile to the $(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>


The best way is to change the service configuration prefix in ccproj of your project, add yourprojectname.configurationnameDot is the life saver.

<ServiceConfigurationPrefix>yourproject.ServiceConfiguration</ServiceConfigurationPrefix>

Add these in itemgroup:

<ServiceDefinition Include="yourproject.ServiceDefinition.csdef" /><ServiceConfiguration Include="yourproject.ServiceConfiguration.cscfg" />

Make sure you have renamed your cscfg files from the folder it resides.

Reload