New Elastic Cloud Services on IIS
Tuesday, April 12, 2011 12:41 AM

I’ve just posted a new article on some recent innovations for cloud services on IIS.  Check out

http://blogs.iis.net/bradleyb/archive/2011/04/12/new-elastic-cloud-services-on-iis.aspx

by BradleyB | 3 comment(s)
Filed under: , ,
Fixing Setup Errors Installing Silverlight Tools Beta 2
Wednesday, June 18, 2008 6:17 PM

What's the problem?

There are two predominate issues that are preventing a successful installation of Silverlight Tools Beta 2.

  1. Silverlight_chainer.exe fails attempting to uninstall KB949325
  2. Mismatched binaries when both Visual Studio 2008 SP1 Beta  and Silverlight Tools Beta 2 are installed.

These two problems account for the vast majority of installation problems developers are running into.

What's the solution?

To help address these two specific problems I've created a .vbs script that attempts to detects and repairs both of these issues.

Download "Silverlight_Tools_Fixup.zip" attached to this post.

Unzip "Silverlight_Tools_Fixup.vbs" from Silverlight_Tools_Fixup.zip

Run the following:

  1. Silverlight_Tools_Fixup.vbs
  2. Silverlight_chainer.exe

So what happened?

When run Silverlight_Tools_Fixup.vbs will:

  1. Detect and uninstall KB949325
  2. Detect all advertised features in VS and repair them. (Advertised features result in mismatched binaries.)

    *Vista non-admin scenarios will require running the script from command prompt that was started using "Run as administrator".
    *You may also be prompted for original media when uninstalling KB949325.

Getting Help?

Be sure to check out the Silverlight 2 Beta 2 readme for known issues.

You can also get additional help from the "Installation and Setup" forum here: http://silverlight.net/forums/13.aspx

Upgrading to Silverlight Tools Beta 2 and Visual Studio 2008 SP1 Beta
Monday, June 9, 2008 8:38 AM

Silverlight 2 Beta 2 has just been released!

Checkout http://silverlight.net/GetStarted/ 

Silverlight Tools Beta 2 for Visual Studio 2008 now includes support for both:

Upgrading "the Easy way"

[update]  Please read Fixing Setup Errors Installing Silverlight Tools Beta 2

Installing Microsoft Silverlight Tools Beta 2 is quick and easy following the steps below.

Visual Studio 2008 RTM w/Silverlight Tools Beta 1 to Beta 2

If you simply want to upgrade your current Silverlight Tools Beta 1 installation:

  1. Install "Microsoft Silverlight Tools Beta 2 for Visual Studio 2008"
  2. Install "Expression Blend 2.5 Preview"

    note: if you later install Visual Studio 2008 SP1 Beta, you'll need to reinstall Silverlight Tools Beta 2
Visual Studio 2008 SP1 Beta to Silverlight Tools Beta 2

If you've already got Visual Studio 2008 SP1 Beta and now want to install Silverlight Tools Beta2:

  1. Install "Microsoft Silverlight Tools Beta 2 for Visual Studio 2008"
  2. Install "Expression Blend 2.5 Preview"
Visual Studio 2008 RTM w/ Silverlight Tools Beta 1 to
Visual Studio 2008 SP1 Beta & Silverlight Tools Beta 2

The recommended way to upgrade to both Silverlight Tools Beta 2 and Visual Studio 2008 SP1 Beta is:

  1. Uninstall "Microsoft Silverlight Tools Beta 1 for Visual Studio 2008"
  2. Uninstall KB949325 (in Add/Remove Programs select "view installed updates")
  3. Install "Microsoft Visual Studio 2008 Service Pack 1 Beta"
  4. Install "Microsoft Silverlight Tools Beta 2 for Visual Studio 2008"
  5. Install "Expression Blend 2.5 Preview"

Following the above steps will ensure a smooth upgrade to both Visual Studio 2008 SP1 Beta and Silverlight Tools Beta 2.

Start Building Awesome Silverlight 2 Applications.

That's it, you're ready to start building incredible applications.

Installation Errors?

The rest of the post is dedicated to the variety of errors and workarounds when not following the above sequences.   The length of this post should be incentive enough to stick to the script above.

If you've already run into problems, fear not.  The rest of this post is dedicated to getting you up and running with Silverlight 2 Beta 2 and Visual Studio 2008 SP1 Beta.

Installer Contents

The "Microsoft Silverlight Tools Beta 2 for Visual Studio 2008" installer "silverlight_chainer.exe" contains the following installers:

Silverlight.2.0_Developer.exe Silverlight 2 Beta 2
silverlight_sdk.msi Silverlight 2 Beta 2 SDK
VS90-KB950630.msp KB950630 for Visual Studio 2008 RTM
VS90SP1-KB950632.msp KB950632 for Visual Studio 2008 SP1 Beta
VS_SilverlightTools_Beta2_Setup.exe Silverlight Tools Beta 2 for Visual Studio 2008

You can extract the individual components using this command:

silverlight_chainer.exe /extract

The first thing you'll notice is that there are two KBs, KB950630 and KB950632. 

  • KB950630 is a patch for Visual Studio 2008 RTM
  • KB950632 is a patch for Visual Studio 2008 SP1 Beta

The installer will apply the patch matching the installation of Visual Studio that you have.  This is why you need to rerun the Silverlight Tools Beta 2 installer if installing Visual Studio 2008 SP1 Beta after installing Silverlight Tools Beta 2.

note: These KBs are ENU specific.  The localized release of Silverlight Tools Beta 2 will have unique KB #.

The installation sequence used by "silverlight_chainer.exe" is:

  1. Uninstall Silverlight Tools Beta 1
  2. Uninstall KB949325
  3. Uninstall "Microsoft Blend for Silverlight Beta 1"
  4. Uninstall the Silverlight 2 Beta 1 SDK
  5. Install Silverlight.2.0_Developer.exe (Silverlight 2 Beta 2 Developer Runtime)
  6. Install either KB950630 or KB950632 depending on version of VS
  7. Install silverlight_sdk.msi (Silverlight 2 Beta 2 SDK)
  8. Install VS_SilverlightTools_Beta2_Setup.exe

Notice that the installer also uninstall's "Microsoft Blend for Silverlight Beta 1".  You can get the updated version of Blend for Silverlight Beta 2 here.

SP1 Beta Installation Errors

Installing out of the recommended sequence above can result in installation errors or design time errors when using Visual Studio.

SP1 (Beta) Does not Apply

One of the more common error messages while installing VS SP1 is:

Microsoft Visual Studio 2008 SP1 (Beta) does not apply, or is blocked by another condition on your system. Please click the link below for more details.

This happens when installing "Microsoft Visual Studio 2008 Service Pack 1 Beta" before uninstalling "Microsoft Silverlight Tools Beta 1 for Visual Studio 2008"

Check out this post for more information: Error installing Visual Studio 2008 SP1 Beta and Silverlight Tools Beta 1

The solution is to uninstall Silverlight Tools Beta 1. 

Important: You also need to manually uninstall KB949325 prior to installing Visual Studio 2008 SP1 Beta.

Failure to uninstall KB949325 is the source of most of the other errors and problems listed below.

Fatal Error during installation

During the installation of VS SP1 you may also come across an error such as:

The installation failed with the following message:
Fatal error during installation.
Click the Finish button to exit.

Check out this post for more information: KB944899 Should be Removed before Installing Visual Studio 2008 SP1

Error from silverlight_uninstallrtmpatches.exe

[6/6/2008, 19:2:12] (IronSpigot::ExeInstallerBase::PerformAction) c:\036de815481bb1774fbe5acf\silverlight_uninstallrtmpatches.exe - Exe installer does not provide a log file name
[6/6/2008, 19:2:12] (IronSpigot::ExeInstallerBase::PerformAction) Exe (c:\036de815481bb1774fbe5acf\silverlight_uninstallrtmpatches.exe) failed with 0x80070643 - Fatal error during installation. :
[6/6/2008, 19:2:12] (IronSpigot::ExeInstallerBase::PerformAction) PerformOperation on exe returned exit code 1603 (translates to HRESULT = 0x80070643)

The above error has been reported and maybe related to installing on 64 bit Vista machines.  This is the command that the silverlight_chainer.exe runs to remove KB949325.  To get around this problem manually uninstall KB949325.   The next time you run the the silverlight_chainer it will skip this step.

How to Validate SP1 is Installed Correctly

WARNING: Visual Studio 2008 SP1 Beta will report installation success even if KB949325 was not removed first.  Unfortunately, failure to remove KB949325 will prevent some SP1 files from being updated.

This is why it's critically important to remove KB949325 before installing VS SP1. 

One way to determine if KB949325 prevented SP1 from updating correctly is to check the version of Microsoft.VisualStudio.Web.Application.dll

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Microsoft.VisualStudio.Web.Application.dll

VS08 SP1 Version should be:

Version 9.0.30428.1
Date modified 4/29/2008
Size 468 KB

If you have the following version it's from the Silverlight Tools Beta 1 release:

Version 9.0.21116.48
Date modified 2/23/2008
Size 492 KB

This means that KB949325 was not removed and thus prevented SP1 from updating numerous files including Microsoft.VisualStudio.Web.Application.dll.

If you're in this state, read on carefully and see the "How to Recover" section.

Installing Silverlight Tools Beta 2

Unfortunately, unless you check files versions there is no obvious indicator that SP1 did not install all of it's files. 

If you then installed "Microsoft Silverlight Tools Beta 2 for Visual Studio 2008" while Visual Studio is in this state with missed matched binaries you will get the following errors when running Visual Studio:

Creating new Silverlight projects:

Method 'SelectSilverlightProject' in type 'Microsoft.VisualStudio.Silverlight.SLPackage' from assembly 'Microsoft.VisualStudio.Silverlight, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.

 SLB2_SP1Bx_NewProject

Opening existing Silverlight projects:

Package Load Failure
Package 'Microsoft.VisualStudio.Silverlight.SLPackage, Microsoft.VisualStudio.Silverlight, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has failed to load properly (GUID =
{CB22EEOE-4072-4AE7-96E2-90FCCF879544}). ...

SLB2_SP1Bx_OpenProject

Note that if you dismiss this dialog by selecting the "Yes" button then you'll need to run the following command later on after the installation has been fixed.

devenv /resetskippkgs

You'll also notice that in this scenario the version of Microsoft.VisualStudio.Web.Application.dll is still 9.0.21116.48.

Basically once KB949325 is installed it prevent subsequent patches from applying.  This is why its critically important to uninstall the KB949325 before installing VS08 SP1 Beta.

As an aside if you install Silverlight Tools Beta 2 before SP1, it will remove KB949325.  you'll just need to reinstall Silverlight Tools Beta 2.

How to Recover

Fortunately, all is not lost.  If you do get into this state w/ miss matched binaries here is how you can recover.

The first thing you'll need to do is to uninstall the KBs installed by Silverlight Tools.  To see these updates you'll need to run "Add/Remove Programs"

For Vista or newer:

  1. Open Uninstall a Program from the Control Panel
  2. Click 'View installed updates' in the task bar on the left
  3. Remove KB949325 (it will be listed under your version of VS2008)
  4. Remove KB950632 (it will be listed under your version of VS2008)

image

 

image

For pre-Vista systems:

  1. Open the Add/Remove Programs dialog from the Control Panel
  2. Click 'Show updates' at the top of the window
  3. Remove KB949325 (it will be listed under your version of VS)
  4. Remove KB950632 (it will be listed under your version of VS2008)

You may get this error "The patch is not applied to this product." when uninstalling KB949325.

Patch Not Applied 

Go ahead and disregard this error, we'll take care of it with the steps below.

Even after uninstalling both KB949325 and KB950632 you'll notice that the version of Microsoft.VisualStudio.Web.Application.dll is still 9.0.21116.48.

The next step will be to create a batch file containing the following commands:

rem Repair features Visual Studio SP1
rem ENU VSTS
msiexec /passive /i {80C06CCD-7D07-3DB6-86CD-B57B3F0614D8} ADDLOCAL=VWD_for_VS_Ent_5902_x86_enu /L*vx %TEMP%\dd_repair_VSTS.log

rem ENU VSTD
msiexec /passive /i {6721AC10-3743-38F1-B178-C0EC6C9A4108} ADDLOCAL=VWD_for_VS_Ent_5902_x86_enu /L*vx %TEMP%\dd_repair_VSTD.log

rem ENU PRO
msiexec /passive /i {D7DAD1E4-45F4-3B2B-899A-EA728167EC4F} ADDLOCAL=VWD_for_VS_Ent_5902_x86_enu /L*vx %TEMP%\dd_repair_PRO.log

rem ENU VSTA
msiexec /passive /i {8F10429A-DFF5-3B55-9306-0ADEB337CFD3} ADDLOCAL=VWD_for_VS_Ent_5902_x86_enu /L*vx %TEMP%\dd_repair_VSTA.log

rem ENU VSTT
msiexec /passive /i {23D0117E-F9A5-364E-A379-70EC2DE02B9F} ADDLOCAL=VWD_for_VS_Ent_5902_x86_enu /L*vx %TEMP%\dd_repair_VSTT.log

rem ENU VSDB
msiexec /passive /i {4298C783-524F-3C3E-9B11-36FA64604B2B} ADDLOCAL=VWD_for_VS_Ent_5902_x86_enu /L*vx %TEMP%\dd_repair_VSDB.log

rem ENU STD
msiexec /passive /i {F434F50E-7614-3EA8-9008-2FB866B697DA} ADDLOCAL=VWD_for_VS_Ent_5902_x86_enu /L*vx %TEMP%\dd_repair_STD.log

Run the batch file you created with the above commands.  This will put VS back into a recoverable state.  Note that the KB949325 will still be listed in Add & Remove Programs.  Unfortunately it'll continue to show up even though it's been uninstalled.

Now re-install "Microsoft Silverlight Tools Beta 2 for Visual Studio 2008".   You can also do this by running Silverlight_chainer.exe again.

Confirm that KB950632 is shown when viewing installed updates in Add/Remove Programs.

Confirm that the new Beta 2 version of Microsoft.VisualStudio.Web.Application.dll is:

Version 9.0.30428.9
Date modified 6/3/2008
Size 512 KB

Other Errors:

“Object reference not set to an instance of an object” when adding a WCF service" - Crash on Exit

Tim Anderson has found a work around for the following problem and posted a solution here

  1. Error “Object reference not set to an instance of an object” when adding a WCF service
  2. Silverlight app cannot see WCF services in same solution
  3. Error “Unable to find ‘DynamicTypeService’” when clicking the Advanced button in the Add Service Reference dialog.
  4. Visual Studio crashing on exit

We're almost done!

If you now get an error creating or opening Silverlight projects:

The project type is not supported by this installation

CantOpen

You'll need to run the following command:

devenv /resetskippkgs

Finally, if no controls are showing up on the toolbox when editing Silverlight XAML pages then you'll need to:

delete %LOCALAPPDATA%\Microsoft\VisualStudio\9.0\toolbox*.*

At this point you should be up and running with Visual Studio 2008 SP1 Beta and Silverlight Tools Beta 2.

Where to go for Installation Help?

Be sure to check out the Silverlight 2 Beta 2 readme for known issues.

If you run into installation issues not covered here please post your question in the "Installation and Setup" forum here: http://silverlight.net/forums/13.aspx

VS Live Orlando "Introduction to Silverlight programming"
Thursday, May 15, 2008 3:56 PM

I just got back from VS Live in Orlando where I was pinch hitting for Jesse Liberty and presented a talk titled "Introduction to Silverlight programming".

I wasn't familiar with Jesse's talk so I threw something together base on a new hands-on-Lab from Sascha Corti at Microsoft Switzerland.  It's a great walk-through leveraging several of the new Silverlight 2 controls to build a working Silverlight application.

image image

This hands-on-Lab was originally developed using Expression Blend 2.5 to build the Silverlight UI.  Since this was a VS Live presentation I thought it would be fun to create a VS track through this lab using the great XAML intellisense in VS.

During the talk we covered:

  • Creating Silverlight projects in VS
  • Editing Silverlight pages in Expression Blend
  • Layout using Grid and StackPanel
  • TextBlock vs TextBox
  • WatermarkTextBox
  • DatePicker
  • Slider
  • How to create a DropDownList from a user control
  • Asynchronous WCF service calls
  • DataGrid

Homework left for the audience:

  • Add the picture gallery using a ListBox and data binding using {Binding } syntax
  • Using type converters to create a Image URL
  • Add the pop-up with car details using storyboard animations
  • Add improved styling for the DataGrid and Slide

Attached to this post is the slide deck along with my script for the VS Track through the hands-on-lab.  A great place to start is to simply download the lab and start working your way though it.  Sascha has done a great job of documenting each step along way.

Tools used in lab:

Microsoft Silverlight Tools Beta 1 for Silverlight 2
Expression Blend 2.5 Preview
MSDN Tech Talk and Hands-on-Lab "Silverlight 2"

References

Jesse Liberty's Slides and Code from VS Live San Francisco
http://silverlight.net/blogs/jesseliberty/archive/2008/04/03/slides-and-code-from-vs-live.aspx

by BradleyB | with no comments
Error installing Visual Studio 2008 SP1 Beta and Silverlight Tools Beta 1
Monday, May 12, 2008 11:32 AM

Microsoft Visual Studio 2008 SP1 Beta was released this morning.  There are known incompatibilities between it and Silverlight Tools Beta 1. 

To install VS08 SP1 Beta you must uninstall Silverlight Tools Beta 1 and KB949325. 

Complete details can be found on the Visual Web Developer Team blog at:

http://blogs.msdn.com/webdevtools/archive/2008/05/12/error-installing-visual-studio-2008-sp1-beta-and-silverlight-tools-beta-1.aspx

Silverlight Tools Beta 2 will be release in the coming weeks and has full support for VS08 SP1 Beta.

Silverlight Game Tutorial by Mike Snow
Monday, March 31, 2008 12:09 PM

Mike Snow has started a great blog series on game programming with Silverlight.  Check it out http://silverlight.net/blogs/msnow/archive/2008/03/25/introduction.aspx

by BradleyB | with no comments
Installation Tips for Silverlight Tools Beta 1 for Visual Studio 2008
Thursday, March 6, 2008 1:52 AM

 

As many of you know Silverlight 2 Beta 1 was release today at MIX08.  What an awesome day.  The new applications under development based on Silverlight 2 are truly incredible!  Check out http://www.microsoft.com/silverlight/

To get started with Silverlight 2 you can download "Silverlight Tools Beta 1 for Visual Studio 2008" here.

The Silverlight Tools installer will install everything needed to start working with Silverlight 2 in Visual Studio 2008.

It installs the following:

  • Silverlight 2 Beta 1
  • Silverlight 2 SDK Beta 1
  • KB949325 for Visual Studio 2008
  • Silverlight Tools Beta 1 for Visual Studio 2008

Even if you've previously installed Silverlight 1.0 or Silverlight 2 Beta 1 the installer will proceed and install the additional components.

That's it!  You're now ready to start creating rich Internet applications with Silverlight 2 and Visual Studio 2008.

While the installation is that simple in most cases, there have been some installation issues reported.  I've listed below the issues and solutions I've run into so far.  I'll update this post if new issues are reported.

Installation Error

If you do run into an installation error, it's most like due to a previous installation of Silverlight 1.1 Alpha or any of the Silverlight SDKs, including the Silverlight 2 Beta 1 SDK.  You must uninstall all these components before installing Silverlight Tools Beta1 for VS08.  If you don't uninstall these products first you'll get this error dialog from the installer.

InstallError

If you see this dialog, be sure to uninstall all the dependent components and restart the installer.

Can't Find KB949325 to Uninstall?

If you ever need to uninstall KB949325, you can do this through Add and Remove Programs.  However it does not show up by default in Add and Remove Programs. 

Instead you need to select "View Installed Updates"

ARP1.

Now you'll see all the updates and patches installed to applications on your computers.  Scroll down and you'll find KB949325.  It will be listed as:

ARP2

It should not come as a surprise that if you uninstall KB949325, you will not be able to use Silverlight projects in Visual Studio.  Only uninstall KB949325 if you're planning on returning VS08 to its RTM condition or if you're attempting to reinstall Silverlight Tools.

Prompt for installation source media

In some cases you may get a prompted for the installation CD-ROM for Visual Studio 2008.

MediaPrompt

Heath Stewart has an excellent blog post on some of the issues users are encountering when installing patches for Visual Studio 2008. You can read his entire post here.  Heath has a new post specific to this prompt when installing Silverlight Tools here.

One of the scenarios causing this to happen with the Silverlight Tools installer is when Visual C++ is not installed.   The other component that will cause this to happen is if you don't have the "Microsoft Visual Studio Web Authoring Component".

You can manually get around this.  First you'll need to extract the individual installers from the Silverlight Tools Beta 1 for VS08 chained installer.  To do this download and save the Silverlight Tools chained installer from here and save it locally.

To extract the individual installers run this command:  silverlight_chainer.exe /extract

This will extract the following installers, along with other support files.

    1. Silverlight.2.0.exe
    2. VS90-KB949325.msp
    3. silverlight_sdk.msi
    4. VS_SilverlightTools_Beta1_Setup.exe

It critical that you install these components in the order listed above.  (Silverlight 2, KB949325, SDK, Tools)  To install KB949325 w/o being prompted for media run this command:

msiexec /p VS90-KB949325.msp /L*vx VS90-KB949325.log REINSTALL=ALL

Note: this command will require administrative rights and it does not add the KB to Add/Remove Programs.

To list these Silverlight tools in Visual Studio's Help->About dialog and to be able to uninstall these tools from Add/Remove Programs (ARP), install the patch again using the following command:

msiexec /p VS90-KB949325.msp /L*vx VS90-KB949325-2.log ADDLOCAL=KB947520,KB949325

Finally run the VS_SilverlightTools_Beta1_Setup.exe installer to complete the Silverlight Tools installation.

The project type is not supported by this installation

Even when installed successfully, some users have seen this error:

CantOpen

This is happening for users who have installed previous builds of Silverlight Tools and for one reason or another the Silverlight package for Visual Studio has been disabled.  You can re-enable the Silverlight package by running the following command.

devenv.exe /resetskippkgs

The ASP.NET Silverlight controls show appear in the Toolbox for .aspx pages

This happens if the Silverlight SDK is installed before KB949325.  As listed above the install order is important.  To fix this uninstall the Silverlight SDK and re-install it.

Help Files don't show up in Visual Studio

To integrate the VS help files included in the Silverlight 2 SDK follow the instructions in this readme.txt installed with the SDK.

[Program Files]\Microsoft SDKs\Silverlight\v2.0\Documentation\VS-Help\Readme.txt

The installer is hung?

At the end of the installation process the installer appears to be hung.

almost_done

The installer can take up to 10 minutes at the end of the installation process.  What's going on?  The last thing the installer does is merge the help dictionaries.  If you've installed the help files for VS locally this can take some time.  Don't kill the process, it's not hung.

Where to go for Installation Help?

Be sure to check out the Silverlight 2 Beta 1 readme for known issues.

If you run into installation issues not covered here please post your question in the "Installation and Setup" forum here: http://silverlight.net/forums/13.aspx

Developing Web Applications on Windows Vista with Visual Studio 2005
Monday, September 18, 2006 6:12 PM

Bradley Millington just made a great blog post about using IIS7 RC1 with VS2005. 

 

http://blogs.msdn.com/webdevtools/archive/2006/09/18/761206.aspx

 

How to set scriptmaps in a Web Setup Project
Monday, September 11, 2006 2:21 PM

Van Kichline has started a series of blog posts documenting how to extend web setup projects.  His first post documents how to set the ASP.NET 2.0 scriptmaps

http://blogs.msdn.com/vank/archive/2006/09/09/748290.aspx

Hope this helps,
Brad.

by BradleyB | with no comments
Filed under: ,
ASP.Net WebProfile Generator
Monday, May 8, 2006 11:02 PM

Tim McBride has published a cool sample that will generate a WebProfile class for accessing the ASP.NET profile object from within the code behind files of a Web Application Project.

http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=406eefba-2dd9-4d80-a48c-b4f135df4127

Because Web Application Projects compile the code behind files in advance of ASP.NET they do not have access to dynamically generated types like the Profile object.  This sample provided an add-in into VS that will generate a WebProfile proxy class that will fetch profile information from the real ASP.NET profile object at runtime.

Hope it helps,
Brad.

More Posts Next page »