Reputation: 1877
I have created a web role locally, but I am struggling to do this with the windows azure sdk, the manuals dont seem to give clear instructions on how?
Thanks
Upvotes: 22
Views: 25239
Reputation: 1350
You have two options with Azure:
Build your package and upload it through the Azure portal https://manage.windowsazure.com/
You're done.
Publish from Visual Studio. To save the hustle right click on your Cloud project and select "Publish". Apply the necessary settings (Cloud service -this will populate automatically-, Environment, Release...as in the previous way. Make sure you go to Advanced settings to select the correct storage account if you got multiple. Hit Next, and the Publish. Visual Studio will do all the hard work for you.
Upvotes: 7
Reputation: 2054
In Visual Studio Team Services you can produce the package as follows:
The service configuration file is called "ServiceConfiguration.Cloud.cscfg" in this example. Ofcourse you can always use variables like $(BuildConfiguration). As platform I needed to use "anycpu" without a space, I was not able to get it working by using "any cpu".
Upvotes: 2
Reputation: 4155
To create the .cspkg and .cscfg via MSBuild arguments:
/t:Publish /p:TargetProfile=Local /p:AutomatedBuild=True
or
/p:DeployOnBuild=true /p:TargetProfile=Local /p:AutomatedBuild=True
Remember to replace the TargetProfile with your actual desired profile. This will automatically pick up the right ServiceDefinition.profile.csdef
file.
Upvotes: 8
Reputation: 3642
Publishing from the GUIs (Azure Portal and Visual Studio right-click "Publish...") is fine to get started.
Eventually (sooner better than later) you'll want a reproducible scriptable one-button maker.
From within a Powershell script, the command Publish-AzureServiceProject is used to build the .cspkg and upload it. (I hesitate to say more; you'll get better results by scrutinizing their documentation, alas!)
Upvotes: 4
Reputation: 770
In Visual Studio, go in the Solution explorer panel, right-click on your Azure project and click on Package function. A process will generate the cspkg and cscfg files.
Upvotes: 18