且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法加载文件或程序集"Microsoft.CSharp".设计器错误.

更新时间:2022-03-23 10:26:02

这是一个非常特定于计算机的问题,我们不得不在一种情况下重新安装Windows.

This is a very machine specific issue, we had to reinstall windows in one case.

自从您上次使用VS以来,您可能已经复制了多个.net文件,甚至错过了.net 2的更新或晦涩的内容.

Since you last used VS, you could have copied over various .net files, or even missed an update for .net 2 or something obscure.

找到托管程序集但无法加载时抛出FileLoadException

A FileLoadException is thrown when a managed assembly is found but can't be loaded

http://msdn.microsoft.com/en-us/library/dbe81ttk.aspx

 

此处的讨论:

A discussion of it here : http://msmvps.com/blogs/carlosq/archive/2010/03/30/the-strange-case-of-system-io-fileloadexception-mixed-mode-assembly-is-built-against-version-x-of-the-runtime-and-cannot-be-loaded-in-the-4-0-runtime.aspx

 

另一个原因可能是策略权限: http://social.msdn.microsoft.com/Forums/ar/Vsexpressvc/thread/25a33e26-8f41-42d3-b158-213c8419c898

Another cause could be Policy Permissions : http://social.msdn.microsoft.com/Forums/ar/Vsexpressvc/thread/25a33e26-8f41-42d3-b158-213c8419c898

 

我不知道您是否曾经经历过所有这些,但是这些是我想到的唯一建议.

I don't know if you've been through all these before, but these are the only suggestions that come to mind.

 

此致,
佩德罗(Pedro)

Regards,
Pedro