TargetProfile gives No default service configuration error

MikeDouglasDev picture MikeDouglasDev · Jan 1, 2013 · Viewed 8k times · Source

I am building an Azure Cloud service application in a TFS 2012 build definition. Everything is working properly with the default Cloud configuration. However when I set the TargetProfile property in the MSBuild arguments I get the following error. The service configuration file exists in the project and I am able to select within the project properties.

Is there something additional I need to do to get the build to recognize the non-default configuration?

MSBuild Arguments

/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): No default service configuration "ServiceConfiguration.cscfg" could be found in the project.

Answer

MikeDouglasDev picture MikeDouglasDev · Jan 2, 2013

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.