Answered Blend 3 preview and the Design View

  • Thursday, March 19, 2009 5:46 PM
     
     
    I have quite big WPF project developed with Blend 2 sp1. Today I downloaded the Blend3 Preview, I opened my project and all seems ok.
    But When I open a XAML file (UserControl or Window) I can see it only in XAML view an no Design View is available: the icons are not displayed and the menu items (View | Active Document View) are disabled.
    If I create a brand new project all the Windows and UserControls are available in design mode and XAML view.

    Someone else with my problem?

    Thanks
    Emanuele
    http://blog.codiceplastico.com

    .ema

All Replies

  • Friday, March 20, 2009 4:48 AM
    Moderator
     
     
    Hi Emanuele,

    Are you trying to build a Silverlight 1 site (that does not have a backing project file)? If so, what you are getting is by design - we don't support Silverlight 1 or Silverlight 2 in the Blend 3 Preview (Silverlight 1 content will open as you seeing, without any design capabilities, Silverlight 2 projects will be automatically upgraded to Silverlight 3 and you will get a sweet design experience :))

    Thanks,
    Unni
  • Friday, March 20, 2009 7:51 AM
     
     
    Hi Unni
    No I open a WPF application (Windows application) with some windows and some usercontrols. No silverlight.
    It's a strange behaviour, beacuse even if I add a new window to that project I can view it only in XAML View.

    Thanks
    Emanuele
    http://blog.codiceplastico.com

    .ema
  • Tuesday, April 14, 2009 12:21 PM
     
     
    Hi,

    yes, I have the same problem. Opening in Blend 2 works without any problem, but opening the same project in Blend 3 does not work: The XAML is shown, but the "design view" menu is greyed out! The project is a C# WPF Project, no silverlight.

    What's the matter for this behavior?

  • Wednesday, April 15, 2009 1:53 AM
    Moderator
     
     
    If you share a small repro, we would really appreciate it. I don't think we have a repro for this otherwise.

    If you cannot share it publicly, please feel free to email it to me directly at unnir at microsoft dot com.

    Thanks!
    Unni
  • Wednesday, April 15, 2009 6:54 AM
     
     

    I will send you an email with a small sample.
    Thanks

    ema


    .ema
  • Wednesday, April 15, 2009 8:23 AM
     
     Answered

    Unni has found the solution!

    To fix this problem (this is by design), for a C# WPF project, add the following to the project file:

    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

    It worked for me. 
    Maybe the problem was that the project was created with VS2008 Without SP1.

    HTH
    ema
    http://blog.codiceplastico.com


    .ema
  • Thursday, April 16, 2009 7:37 AM
     
     
    Hello,

    yes, this will fix the Design view in Blend for my project as well!

    But with

    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

    it works even better: The Visual Studio can open the project again!
  • Monday, May 25, 2009 9:53 AM
     
     

    I have what looks like the same problem in a project I created from scratch while following the CompositeWPF tutuorials. Everything was going great until I wanted to start adding content to my views, but after opening the project in Blend 3 and opening my user control I can only see the XAML view - makes Blend kinda useless.

    My solution was originally created in Visual Studio. I checked, and the module’s csproj file did already include the line:

        <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-

    11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

    Since this is a learning project I’m happy to send the source to anyone who is interested, and I took the liberty of starting with you Unni – hope you don’t mind.

    My setup:

    ·          Windows 7 RC

    ·          VS 2008 Developer Edition SP1

    ·          TFS Team Explorer SP1

    ·          Blend 3 Preview (3.0.1498.0)

    ·          Silverlight (3.0.40307.0)

    ·          Silverlight Beta SDK (3.0.40307.0)

    ·          Silverlight 3 Toolkit March 2009 (3.0.30318.1330)

    ·          Silverlight Tools for Visual Studio 2008 SP1 (9.0.30729.4063)

    ·          KB967483

     

  • Tuesday, May 26, 2009 9:49 AM
     
     
    Unni was nice enough to point out my mistake, just posting here in case anyone else runs into the same problem.

    My user control was in a seperate assembly for the module, which was created as a C# class library project. While my main shell application project had the ProjectTypeGuids element set correctly, the module's csproj file did not. Add the line above to my WPF module class library made Blend's designer work again.

    Thanks Unni!
  • Sunday, July 12, 2009 3:19 PM
     
     

    I have what looks like the same problem in a project I created from scratch while following the CompositeWPF tutuorials. Everything was going great until I wanted to start adding content to my views, but after opening the project in Blend 3 and opening my user control I can only see the XAML view - makes Blend kinda useless.

    My solution was originally created in Visual Studio. I checked, and the module’s csproj file did already include the line:

        < ProjectTypeGuids > {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-

    11D3-BF4B-00C04F79EFBC}</ ProjectTypeGuids >

    I have same problem but find the proposed solution to be tantalisingly teasing - Could someone detail where *exactly* in the csproj file this should be defined! - I've added the tag in various places but all I get is that Visual Studio now tells me that the project type is not supported.  And Blend still doesn't give me anything other than the xaml view.

    Only difference I have is that Blend 3 is the RC version not CTPreview.

    Thanks.
  • Sunday, July 12, 2009 3:29 PM
     
     Proposed Answer
    I've resolved my problem - don't leave any whitespace between the opening and closing tags:

    This doesn't work:
        <ProjectTypeGuids>
          {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
        </ProjectTypeGuids>

    this Does:
        <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

    And as to where it goes - seems to be in the <PropertyGroup> tag which contains the <ProjectGuid> - at least that worked for me.
    • Proposed As Answer by Tokoh Friday, July 24, 2009 2:08 AM
    •  
  • Friday, July 24, 2009 2:25 AM
     
     
    There is definitely a problem with the ProjectTypeGuid.  I use blend 2 sp1 and vs 2008.  If I create an new starlight 2.0 ap, a project file is generated and the ProjectTypeGuid is
    <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    this is all OK until I try to link to VS to create some event code.  It loads VS with note in solution explorer (unavailable)
    and a dialog box messsage in Blend saying cannot find the code behind file TestGuid.Page. (TestGuid is the name of my ap).

    If I now without closing Blend, edit the project file and either delete the first or both guid entries, save it, go back to Blend (which notes the the file has changed) and try to relink with VS it now works.  I can happily use Blend and VS!

    However, if I close VS and Blend and try to restart to project in Blend I get and error on the Blend workbench (or whatever its called) saying Invalid XAML and displays no controls.  If I then return the project file to the way it was originally, or at least include the first Guid, then Blend works OK but the VS link again doesn't work.

    I've spent a lot of time on this and trawled the net and found an entry somewhere saying the problem can be solved by removing both guids and inserting two other tag sets.  Another solution was to run devenv but I couldn't get this to work.

    Does anyone else have an answer?

    Tokoh
  • Tuesday, November 03, 2009 6:57 PM
     
     
    That GUID appears to be missing a dash. Seemed to make a difference for Visual Studio. Though Expression blend didnt' mind.
    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>