兼容性实体框架通过降级/净框架4.5到3.5

时间:2014-10-10 12:46:23

标签: c# wpf entity-framework .net-3.5 .net-4.5

我使用自己的Visual Studio在自己的电脑上使用Visual Studio 2013创建了一个应用程序。该应用程序正处于测试阶段,我必须将其发送到我的工作中。问题,为什么我启动.exe,我有错误要运行此应用程序,首先必须安装以下版本的.NET Framework之一:.NETFramework,Version = v4.5

如果我可以安装框架,那不会有问题,但我工作的企业不会更新它。 Thay站在3.5 SP1。

我(我认为),成功地解决了我关于DataGrid的第一个问题(Retromigration 4.5 to 3.5 .net framework for c# application

但是现在,我有很多警告和错误,或多或少都是关于同样的事情,实体框架。

这是其中3个:

Warning 56  The primary reference "EntityFramework" could not be resolved because it has an indirect dependency on the .NET Framework assembly "Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.0.0.0" than the version "3.5.0.0" in the current target framework.  WpfApplication3
Warning 71  The primary reference "EntityFramework" could not be resolved because it has an indirect dependency on the .NET Framework assembly "Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.  WpfApplication3
Warning 40  The primary reference "EntityFramework" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. WpfApplication3
等等等。

我知道实体框架已经存在于3.5中了,那么我怎样才能让它再次运作?

提前感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

最后一个简单的Update-Package –reinstall EntityFramework就足够了。在Console Package Console Manager上就足够了。

现在我只有30个错误。我一步一步地前进。