Blend For Visual Studio 11 get an error

  • Installed Windows 8 Consumer Preview
  • Installed Visual Studio 2010 Premium
  • Installed Visual Studio 11 Ultimate
  • Everything installed without any errors.

    I created a new Windows 8 Metro app using Visual Studio 11 and have no issues viewing xaml in VS 11 designer. If I view it in Blend For Visual Studio 11 a propup with error:

    The project 'TestApp.csproj' could not be opened. The imported project 'C:Program Files (x86)MSBuildMicrosoftWindowsXamlv11Microsoft.Windows.UI.Xaml.CSharp.Targets' was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. c:UserstestuserDocumentsVisual Studio 11ProjectsTestApptestApp.csproj

    Also if I create a Windows Metro style project(any of the templates) in Blend For Visual Studio 11 it shows an empty solution after it's done. When I look at the directory of where it suppose to create it I only see the project files but no solution.

    Has anyone else had these issues?

    Now the only question is how

    --Comment 1--

    No, path C:Program Files (x86)MSBuildMicrosoftWindowsXaml**v11**Microsoft.Windows.UI.Xaml.CSharp.Targets doesn't exist. The path on the file system is C:Program Files (x86)MSBuildMicrosoftWindowsXaml**v11.0**Microsoft.Windows.UI.Xaml.CSharp.Targets

    When I look at the project file this is what I see:

    <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' ">
        <VisualStudioVersion>11.0</VisualStudioVersion>
    </PropertyGroup>
    <Import Project="$(MSBuildExtensionsPath)MicrosoftWindowsXamlv$(VisualStudioVersion)Microsoft.Windows.UI.Xaml.CSharp.targets" />
    

    The project file seems to be telling it the correct location so I'm not sure why it's trying to look in the wrong path?

    --End Of Comment 1--


    Try this workaround from the known issues list:

    1.3.3.35 Blend cannot create projects for Metro style apps built using HTML when Visual Studio 2010 is installed after Visual Studio 11 Beta When Visual Studio 2010 is installed after Visual Studio 11 Beta, the installation changes an environment variable to a variable that is incompatible with Blend .

    (emphasis added)

    To resolve this issue:

    To work around this issue, do the following:

  • Right-click Computer, and then click Properties.
  • Click Advanced Properties.
  • In the System Properties dialog box, on the Advanced tab, click Environment Variables. 环境变量
  • Under System Variables, click New.
  • Under Variable name, type: VisualStudioVersion.
  • Under Value, type: 11.0.
  • Click OK.
  • For Windows 8, to get to the environmental variables:

  • Do a search for Advanced System Settings
  • Make sure you have Settings selected on the right hand side
  • Select the View advanced system settings option
  • Windows 8

    链接地址: http://www.djcxy.com/p/61882.html

    上一篇: Visual Studio 2012 Web发布不复制文件

    下一篇: 混合对于Visual Studio 11出现错误