Visual Studio must be
run as an Administrator
You must run Visual Studio with elevated permissions when
building Cloud Services for Windows Azure.
It is possible to create a shortcut that will launch Visual Studio with administrative
permissions by setting the “Run as Administrator” checkbox in the Advanced
Properties page of the Shortcut tab; this is available from the Properties menu
option off of the context menu.
Logging and
diagnostics cannot be loaded in partial trust
The Micorosoft.WindowsAzure.Diagnostics library requires the
Role that is consuming it to be run in Full Trust. If the role is set to partial trust then a
ConfigurationErrorsException will occur with the following message “Could not
create Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,
Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35.” To
enable Full Trust double-click on the specific Role node in the Cloud Service
project (in Solution Explorer) and change the .NET trust level by selecting the
Full Trust radio button on the Configuration page.
Using Add Service
Reference with WCF Services hosted in the Cloud
Out of the box, using Add Service Reference or svcutil to
generate a proxy to a service hosted either in the development fabric or the
cloud fabric will fail.
The WCF team has issued a patch that can be applied to the
user machine in order to work around this issue.
For more information please read this article.
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.
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”.
Linked Files in the
Project (VS 2008 only)
Links to files in the project are not published to the
Service Package.
Path too long
If you see an error on build of the following form: “The
specified path, file name, or both are too long. The fully qualified file name
must be less than 260 characters, and the directory name must be less than 248
characters” then the work around is to create a Cloud Service with a shorter
solution and project name.
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 either Visual Web Developer
Express or 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 all of the processes
being debugged will stop debugging and delete the deployment.
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.
Upgrading Cloud
Service projects from Visual Studio 2008 to Visual Studio 2010
When upgrading a Cloud Service project from Visual Studio
2008’s format to Visual Studio 2010 you will be prompted to upgrade the Web
site to use .NET Framework version 4. 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.
Cloud Services that
use 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 a “WaWorkerHost.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 “WaWorkerHost.exe
has stopped working” messages. This
message does not indicate an error and does not affect future runs.
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, the 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.