Windows Azure Tools for Microsoft Visual Studio July 2009 CTP

User Account and Security

Visual Studio must be run as an Administrator

You must run Visual Studio as an administrator when building Cloud Services for Windows Azure.

By Default Cloud Services run in a modified medium trust

Applications deployed to the Windows Azure fabric operate within a restricted Code Access Security (CAS) environment. The Windows Azure trust policy is a variation on the standard ASP.NET medium trust policy.  

Please see the Windows Azure SDK Trust Policy Reference in the Windows Azure SDK documentation.

Enabling Full Trust is set per Role in the Service Definition

To enable Full Trust for a particular Role, select that Role under the Roles node of the Cloud Service project in Solution Explorer, right click, select properties and set the “Enable Full Trust” property to true.

Solution and Projects

Packaging Files in the Project

Files that are added to a Web Role project and are intended to be included in the Service Package must have their “Build Action” set to “Content” in the Properties Window for that file.  All files in the output directory will be included in the Service Package.

Files that are added to a Worker Role project, and are intended to be included in the Service Package must have their “Copy to output directory” set to “Copy if newer”.  All files in the output directory will be included in the Service Package.

Linked Files in the Project

Links to files in the project are not published to the Service Package.  This is a known issue that will be resolved in a future version of the Windows Azure Tools.

Service Definition and Configuration files are modified but not saved when renaming a Role

Renaming a Role project modifies both the Service Definition and Service Configuration files in the Cloud Service project without saving them.  The user will be prompted to save when closing the solution before those files are saved.

Unloading a Role project and selecting to edit the project file from Solution Explorer does not open the project file

To edit the Role project, unload the Cloud Service project that references it and try again.

Debugging and Running from Visual Studio

Locked Files when Building a Cloud Service

If you encounter an issue where the build fails with locked files on a 64-Bit Operating System after debugging with the native debugger, please install the following hotfix. (not required for Visual Studio 2010)

Keep the Cloud Service project set to the StartUp project when running or debugging

If one of the projects in the solution other than the Cloud Service project is set as the StartUp project, when you press run (CTRL+F5) or debug (F5), your Cloud Service will not run/debug in the Development Fabric as expected.

This is likely to happen in Visual Web Developer Express and other configurations where the Tools->Options->Projects and Solutions -> Build and Run -> For new solutions use the currently selected project as the startup project setting is selected.

Breakpoints set in one file may be hit in all of the files with the same name

When multiple Roles in a single Cloud Service contain a file with the same name (i.e. WorkerRole.cs or WorkerRole.vb), breakpoints set on one of the files may be hit in all of the files.  Please see the associated help for the “Require source files to exactly match the original version” debugging option. 

If you encounter this issue even when the option is checked, please restart Visual Studio and try again.

IIS Update to Support FastCGI Applications

In order to run a Cloud Service that uses the FastCGI module to host non-ASP.NET applications  on the Development Fabric, the following update is required: http://support.microsoft.com/kb/967131

Detaching from a process

When debugging a Cloud Service, detaching from any of the processes being debugged will stop debugging.

Visual Studio 2010

The Windows Azure SDK sample projects that contain Web Roles cannot be converted for use in Visual Studio 2010

After conversion, Web Role projects will appear in the Solution Explorer as unavailable. Please download and use the Visual Studio 2010 sample projects.

Cloud Service projects and Roles only support targeting .Net Framework 3.5

The Development Fabric and the Windows Azure Cloud currently support Roles with Target Framework set to .Net Framework 3.5.  You can set the Target Framework to .Net Framework 3.5 via the Project Settings | Application | Target Framework setting.

The New Project Dialog shows Cloud Service projects under .Net Framework 4.0 and .Net Framework 3.5.

The Cloud Service project templates will show up under .Net Framework 4.0 and .Net Framework 3.5 in the dialog brought up via File | New | Project…  The Roles created by a Cloud Service project template will target .Net Framework 3.5 which is currently the only supported target framework version.

Converting Cloud Services to work on Visual Studio 2010

When converting a Cloud Service to work on Visual Studio 2010, Visual Studio 2010 will ask if you want to upgrade the Web site to use .Net Framework version 4.0.  As Cloud Services currently only support targeting .Net Framework 3.5, please select “No” on this dialog.  If you clicked “Yes” change the Target Framework to .Net Framework 3.5 via the Project Settings | Application | Target Framework setting for each Role project.

Service Configuration and Definition

Configuration Settings must match in the Service Definition and Service Configuration Files

You must manually synchronize service settings in the Service Description file (ServiceDescription.csdef) with the relevant settings in the Service Configuration file (ServiceConfiguration.cscfg) file otherwise the service will fail to build.

In the ServiceDescription.csdef file:

<Web Role name="WebRole">

...

    <ConfigurationSettings>

        <Setting name="SettingName"/>

...

In the ServiceConfiguration.csdef file:

<Role name="WebRole">

...

    <ConfigurationSettings>

        <Setting name="SettingName" value="SettingValue"/>

...

Note that both of these files must be kept in sync with each other.

Development Fabric

Cloud Services that uses the FastCGI module require a hotfix

In order to run a Cloud Service that uses the FastCGI module to host non-ASP.NET applications  on the Development Fabric, the following update is required: http://support.microsoft.com/kb/967131

An Unhandled Exception in the Worker Role will result in an “RDRuntimeLoader.exe has stopped working” message

Unhandled exceptions in the Worker Role are not caught by the Development Fabric.  When a Worker process terminates, it is restarted – this can result in repeated “RdRuntimeLoader.exe has stopped working” messages.

Publish

The Application ID Cloud Service project property is ignored.

The Cloud Service project properties Portal tab contains an Application ID setting which is ignored when the Windows Azure Tools navigates to the Azure Services Developer Portal.  This will be addressed in a future release.

Development Storage

Using Development Storage with SQL Server Express 2008

By default the local Windows Group BUILTIN\Administrator is not included in the SQL Server sysadmin server role on new SQL Server Express 2008 installations.  Add yourself to the sysadmin role in order to use the Development Storage Services on SQL Server Express 2008.  See SQL Server 2008 Security Changes for more information.

Changing the SQL Server instance used by Development Storage

By default, Development Storage  will use the SQL Express instance.  This can be changed by calling “DSInit.exe /sqlinstance:<SQL Server instance>” from the Windows Azure SDK command prompt.

Update Notification

Update Notifications are available from Visual Studio 2008 and not Visual Studio 2010.

Microsoft Cloud Computing Tools Update Notifications are available only in Visual Studio 2008.

Error persisting setting for Update Notifications

If you receive one of the following error messages:

  • “There was an error persisting this setting.  Update notifications cannot be disabled at this time.”
  • “There was an error persisting this setting.  Update notifications cannot be enabled at this time.”

You can manually edit the setting through the registry:

On 32-Bit Windows: "HKLM\Software\Microsoft\Cloud Computing Tools\Update Notification"

On 64-Bit Windows: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Cloud Computing Tools\Update Notification

Where setting the AutomaticUpdatesEnabled key to “true” will enable Update Notifications and “false” will disable Update Notifications.

Page view tracker