Fixing the Silverlight Design Time in a Windows Azure Cloud Service
This is a workaround for the following configuration:
- Visual Studio 2008 (works fine on VS 2010)
- Windows Azure Tools for Microsoft Visual Studio February 2010 Release
- Silverlight 3 Tools for Visual Studio 2008
- Building a Silverlight application in a Windows Azure Cloud Service
This is the issue reported in this forum thread.
To reproduce the issue:
1. Create a new Windows Azure Cloud Service project. (File | New Project)
2. Add a Web Role to the project, this will be the web application for the Silverlight application.
3. Right click on the Solution in Solution Explorer and select “Add |New Project…” Select, a Silverlight Application
4. Use an existing web site in the solution to host the Silverlight application.
5. Open up MainPage.xaml and notice that 1. there are no controls on the Toolbox, 2. Intellisense no longer works and 3. pasting in to the XAML editor results in an “Object reference not set to an instance of an object.” error.
Fixing the issue:
1. Close Visual Studio
2. Save the attached file (Microsoft.CloudService.targets) to your local machine
3. Copy the file to:
- C:\Program Files (x86)\MSBuild\Microsoft\Cloud Service\v1.0 (64-Bit OS)
- C:\Program Files\MSBuild\Microsoft\Cloud Service\v1.0 (32-Bit OS)
overwriting the existing file
4. Open Visual Studio, open your Cloud Service and you’ll find you will have the controls on the Toolbox, Intellisense and you can paste in XAML without hitting the Object reference error dialog.
This issue will be fixed in our post February 2010 release.