locked
Blend 2.5 verses VS2008SL2B1 projects RRS feed

  • Question

  • I am trying to figure out the difference between Silverlight 2.0 projects created with Blend 2.5 and VS2008 SLBeta1. Blend tends to build <window> and <usercontrol> in its sample silverlight 2.0 projects but VS only builds <usercontrol> for its xaml pages. When I copy a sample from a blend project to vs it reports hundreds of errors. There are some nice starting points (ie photo book & video library) that I would like to modify but I can not get them into a vs2008 project for the web. Blend also includes 2 extra schema in its usercontrols.

    How do I get the silverlight 2.0 samples from blend to run in a vs2008 web project?

    Saturday, March 15, 2008 6:56 PM

Answers

  • I think you are confused about Blend.

    Actually, Blend can be used to created four types of projects (WPF Application (.exe), WPF Control Library, Silverlight 1 Site, Silverlight 2 Application) . Blend is NOT just for Silverlight 2.

    So, I think the sample that you are opening might be WPF application. WPF application is NOT a Silverlight 2 application. So, You won't be able to open WPF as Silverlight 2 project type.

    Let's try one thing.

    1. Open  Blend 2.5.

    2. Choose "Silverlight 2 Application" 

    3. Save that project in somewhere.

    4. Close Blend

    5. Open VS 2008

    6. Open that Silverlight 2 application that I created and saved using Blend 2.5.

    Let me know if you have any problem..

    Normally, we don't do that way. What we used to do is that we create SL 2 in VS 2008. If we want to edit the xaml then we use "Open with Blend" option in VS.

    Hope it helps.  

    Monday, March 17, 2008 2:05 AM

All replies

  • Blend tends to build <window>
     

    This is incorrect. Make sure that you have installed Blend 2.5 March Preview. You have to choose "Silverlight 2 Application"  in Blend.

    The following code is from "Silverlight 2 Application"  from Blend. 

    <UserControl
        xmlns="http://schemas.microsoft.com/client/2007"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Class="SilverlightApplication4.Page"
        Width="640" Height="480">

        <Grid x:Name="LayoutRoot" Background="White" />
    </UserControl>

     

    I think you got the wrong version of Blend.  

    Saturday, March 15, 2008 10:34 PM
  • Hi Michael,

    I am running Blend 2.5 and the specific test example is:

    1) Open Blend

    2) Select Samples Tab and choose 'Photo Book'

    3) Select File -> Save All

    4) Open VS2008 with Silverlight Beta 1 extensions

    5) File -> Open Web Site (browse to project just saved) - Scenario 1:

    6) Open Photobook.xaml - note the <window> tag and the lack of design view

    7) File -> Open Solution/Project (browse inside folder of saved project and select project) - Scenario 2:

    8) Convert to VS2008 format (why? - blend is 4 months older than Nov release VS2008)

    9) Open Photobook.xaml - note the <window> tag but now there is an error loading design view.

    10) Select properties for the project - it is a windows application not a silvelight project (ie create silverlight project VS2008 is a different type)

    11) Create a VS2008 silvelight project and now copy book.xml and photobook.xml and watch all the syntax errors appear

    I did not have a problem creating a silverlight 2.0 project in Blend 2.5 or VS2008SLB1. I did have a problem using a project created by blend 2.5 in VS2008SLB1 and deploying it to a host as there is no publish option in Blend 2.5. Blend 2.5 also does not create the manifest or xap file for deployment n silverlight.live.com

    I wanted to know why do the two programs build different versions on silverlight 2.0 applications, how do I deploy one built on Blend 2.5 and how do I change a blend 2.5 project to get it to work with VS2008?

    Regards,

    Brett Styles 

     

     

    Monday, March 17, 2008 12:25 AM
  • I think you are confused about Blend.

    Actually, Blend can be used to created four types of projects (WPF Application (.exe), WPF Control Library, Silverlight 1 Site, Silverlight 2 Application) . Blend is NOT just for Silverlight 2.

    So, I think the sample that you are opening might be WPF application. WPF application is NOT a Silverlight 2 application. So, You won't be able to open WPF as Silverlight 2 project type.

    Let's try one thing.

    1. Open  Blend 2.5.

    2. Choose "Silverlight 2 Application" 

    3. Save that project in somewhere.

    4. Close Blend

    5. Open VS 2008

    6. Open that Silverlight 2 application that I created and saved using Blend 2.5.

    Let me know if you have any problem..

    Normally, we don't do that way. What we used to do is that we create SL 2 in VS 2008. If we want to edit the xaml then we use "Open with Blend" option in VS.

    Hope it helps.  

    Monday, March 17, 2008 2:05 AM