BradleyB's WebLog

  • Fixing Setup Errors Installing Silverlight Tools Beta 2

    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

    Read more...

  • VS Live Orlando "Introduction to Silverlight programming"

    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

    Read more...

  • Installation Tips for Silverlight Tools Beta 1 for Visual Studio 2008

     

    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

    Read more...

  • ASP.Net WebProfile Generator

    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.

    Read more...