WPF问题,Visual Studio2010 [英] WPF problem,Visual Studio2010

查看:77
本文介绍了WPF问题,Visual Studio2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何处理此问题.
错误1无法从程序集"Microsoft.Expression.DesignModel,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"中加载类型"Microsoft.Expression.DesignModel.Core.ISharedInstanceBuilder". F:\ C#程序\ WpfApplication2 \ WpfApplication2 \ MainWindow.xaml 1

Wpf的设计不能使用

how to deal with this problem.
Error 1 Could not load type ''Microsoft.Expression.DesignModel.Core.ISharedInstanceBuilder'' from assembly ''Microsoft.Expression.DesignModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a''. F:\C#程序\WpfApplication2\WpfApplication2\MainWindow.xaml 1

the Design of Wpf cannot use

推荐答案

无法从程序集"Microsoft.Expression"中加载类型"Microsoft.Expression.DesignModel.Core.ISharedInstanceBuilder" .DesignModel,Version = 4.0.0.0
参考: VS 2010 XAML设计视图加载始终因类型加载而失败例外 [
2.在刚刚启动的命令提示符下,运行"gacutil/l Microsoft.Expression.DesignModel"以查看该程序集是否在GAC中.
3.如果是这样,请运行"gacutil/u Microsoft.Expression.DesignModel"以将其从GAC中删除-不应存在.

4.现在,再次尝试运行Visual Studio,然后尝试显示问题的操作-现在应该可以了.
Could not load type ''Microsoft.Expression.DesignModel.Core.ISharedInstanceBuilder'' from assembly ''Microsoft.Expression.DesignModel, Version=4.0.0.0
Refer: VS 2010 XAML Design View Load always fail with a Type Load Exception[^]

It says:
Looking at this error, we suspect a bad copy of this assembly somehow got into the GAC and is supplanting Visual Studio''s version of the Microsoft.Expression.DesignModel assembly (the Visual Studio designer uses portions of Blend). You can prove this by attaching a debugger or using file monitor to check the path this assembly is being loaded from. It should be loaded from %programfiles%\microsoft visual studio 10.0\common7\ide\privateassemblies.

The copy of the assembly in PrivateAssemblies has the required interface and is required to make the Visual Studio designer work.

To remedy:

1. Quit all copies of Visual Studio, then fire up an elevated Visual Studio command prompt (you should see "Visual Studio Command Prompt (2010)" under the Visual Studio folder on your start menu - right click and run it as administrator assuming you''re on a Windows 7 or Windows Vista PC.

2. In the command prompt you just started, run "gacutil /l Microsoft.Expression.DesignModel" to see if the assembly is in the GAC

3. If it is, then run "gacutil /u Microsoft.Expression.DesignModel" to remove it from the GAC - it should NOT be there.

4. Now try running Visual Studio again and try the action that showed the problem - it should be OK now.


这篇关于WPF问题,Visual Studio2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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