Visual Studio 2013: New ASP.NET Project with Windows Azure Site
Yesterday Microsoft released Visual Studio 2013 Update 2 CTP2 along with Team Foundation Server 2013 Update 2 RC and TypeScript 1.0 RC. More detail of the same can be found on Somasegar's blog here.
As far as web development is concerns, this preview update includes, support for SASS, JSON project item and editor, ASP.NET Scaffolding, One ASP.NET Template changes. Complete list of web development enhancement can be found here.
As far as this blog post is concern, we will see step by step guide on how to create remote azure resource while creating new web project in Visual Studio 2013. At the end of tutorial, we will also see how we can edit any file of remote azure site from Visual Studio itself. Before we continue please download & install this preview update from here. Once you install, we are ready for step by step tutorial as follow!
Ahh wait... If you have not subscribed to Azure service then you can subscribe for free trial from here.
Create Windows Azure Site while Creating New Project in Visual Studio 2013
Open Visual Studio 2013 & create new web project. In New ASP.NET Project dialog, right bottom side you will find windows azure settings. Check the Create remote resources & click on Show Settings.
If you have not connected windows azure accounts from Visual Studio then it will show an authentication error as in above image. Click on Configure these settings. It will open Configure Windows Azure Site Settings dialog.
Click on Sign In... button & it will ask you to sign into windows azure account.
Once you sign into Azure account, New ASP.NET Project dialog will display azure resource detail such as site name, database name, location.
To customize this azure site settings, click on Configure these settings, it will open site settings dialog where you can select azure subscription, configure database, location, etc.
Once you configure remote azure resource, click on ok to create new web project. Along with project creation on your local machine, it will also create configured remote azure resource and you can see status in Web Publish Activity as displayed in below image.
As we have created remote azure resource for this web project, so it has also created pre-configured publish profile with these azure resource. Unlike web project without azure resource, when we publish this project it will directly pick pre-configured publish profile and publish wizard directly jump to last step as we can see in below image.
Click on Publish & we are done with publishing to azure site & database!
Editing File on Azure Site
Once we publish our site to azure, we can edit remote file right from Visual Studio. To edit remote azure site file, open Server Explorer and expand Windows Azure node as in below image.
Here we can click on any (text) file and it will download & open in Visual Studio.
Once we edit this remote file and try to save it again, it will show confirmation dialog that This will save your changes to Windows Azure.
Click on Save Changes...
... & it will save changes to Windows Azure.
Hope this quick post will help. Stay tuned for next post till then check out my post Step by Step Guide: Create, Publish & Monitor a Windows Azure Website from Visual Studio 2013.
You can follow me on twitter for latest link and update on ASP.NET & MVC.