Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set TargetProfile for an Azure project

I'm getting the following error from a build I'm running through TeamCity on my development machine:

[ResolveServiceConfiguration] WATMessage
[16:02:05][WATMessage] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\1.7\Microsoft.WindowsAzure.targets(354, 5): No default service configuration "ServiceConfiguration.cscfg" could be found in the project.
[16:02:05][Xxx.Azure.Production\Xxx.Azure.Production.ccproj] Project Xxx.Azure.Production\Xxx.Azure.Production.ccproj failed.

The same solution builds okay in VS.NET.

I think what I need to do is set the TargetProfile for each of the Azure projects (there's more than one complaining) to override the default of Cloud but I can't find out where to do this.

So how do I set the Target Profile for an Azure project?

like image 972
Boggin Avatar asked Jul 05 '12 16:07

Boggin


2 Answers

Have you tried setting the target profile at command line?

/p:TargetProfile=MyProfile
like image 91
Ray 'user1578904' Avatar answered Sep 21 '22 15:09

Ray 'user1578904'


Given an Azure service configuration file named "ServiceConfiguration.Production.cscfg":

  1. In your TeamCity project build configuration, go to Build Parameters (step 7)
  2. Add a system property with the name "system.TargetProfile" and a value of "Production"

This pattern applies for any named configuration in the format ServiceConfiguration.[your profile].cscfg.

like image 43
David Peden Avatar answered Sep 17 '22 15:09

David Peden