Blend for Visual Studio 11出现错误 [英] Blend For Visual Studio 11 get an error

查看:234
本文介绍了Blend for Visual Studio 11出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 已安装Windows 8 Consumer Preview
  • 已安装Visual Studio 2010 Premium
  • 已安装Visual Studio 11 Ultimate

所有安装均正确无误.

我使用Visual Studio 11创建了一个新的Windows 8 Metro应用程序,在VS 11设计器中查看xaml没有任何问题.如果我在Blend for Visual Studio 11中查看它,则出现错误的提示:

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:

无法打开项目"TestApp.csproj".找不到导入的项目'C:\ Program Files(x86)\ MSBuild \ Microsoft \ WindowsXaml \ v11 \ Microsoft.Windows.UI.Xaml.CSharp.Targets'.确认声明中的路径正确,并且文件在磁盘上. c:\ Users \ testuser \ Documents \ Visual Studio 11 \ Projects \ TestApp \ testApp.csproj

此外,如果我在Blend for Visual Studio 11中创建Windows Metro风格的项目(任何模板),则完成后会显示一个空解决方案.当我查看它应该在哪里创建的目录时,我只会看到项目文件,而没有解决方案.

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?

现在唯一的问题是如何

-评论1-

否,路径C:\ Program Files(x86)\ MSBuild \ Microsoft \ WindowsXaml ** v11 ** \ Microsoft.Windows.UI.Xaml.CSharp.Targets不存在.文件系统上的路径为C:\ Program Files(x86)\ MSBuild \ Microsoft \ WindowsXaml ** v11.0 ** \ Microsoft.Windows.UI.Xaml.CSharp.Targets

No, path C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml**v11**\Microsoft.Windows.UI.Xaml.CSharp.Targets doesn't exist. The path on the file system is C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml**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)\Microsoft\WindowsXaml\v$(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?

-评论结束1-

推荐答案

从已知问题列表尝试以下解决方法:

Try this workaround from the known issues list:

1.3.3.35在Visual Studio 11 Beta之后安装Visual Studio 2010时,Blend无法为使用HTML构建的Metro风格应用程序创建项目 在Visual Studio 11 Beta之后安装Visual Studio 2010时, 安装将环境变量更改为以下变量: 与Blend不兼容.

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.

(添加了重点)

要解决此问题:

要变通解决此问题,请执行以下操作:

To work around this issue, do the following:

  1. 右键单击计算机",然后单击属性".
  2. 点击高级属性.
  3. 在系统属性"对话框的高级"选项卡上,单击环境变量".
  4. 在系统变量"下,单击新建".
  5. 在变量名下,键入:VisualStudioVersion.
  6. 在值"下,键入:11.0.
  7. 单击确定".
  1. Right-click Computer, and then click Properties.
  2. Click Advanced Properties.
  3. In the System Properties dialog box, on the Advanced tab, click Environment Variables.
  4. Under System Variables, click New.
  5. Under Variable name, type: VisualStudioVersion.
  6. Under Value, type: 11.0.
  7. Click OK.

对于Windows 8,要获取环境变量:

For Windows 8, to get to the environmental variables:

  1. 搜索高级系统设置
  2. 确保在右侧选择了设置
  3. 选择查看高级系统设置选项
  1. Do a search for Advanced System Settings
  2. Make sure you have Settings selected on the right hand side
  3. Select the View advanced system settings option

这篇关于Blend for Visual Studio 11出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆