[英]How to migrate assemblies from .Net 3.5 to .Net 4.0?
I download a project from github: https://github.com/HEskandari/FarsiLibrary/zipball/master 我从github下载了一个项目: https : //github.com/HEskandari/FarsiLibrary/zipball/master
I open this with visual studio 2010, This Solution contain a project with name "FarsiLibrary.WPF.VisualStudio.Design" , this project contain references to assemblies in .Net 3.5 and visual studio not recognize Microsoft.Windows.Design.* assemblies because this assemblies exist in .Net 3.5. 我用Visual Studio 2010打开它,此解决方案包含一个名为“ FarsiLibrary.WPF.VisualStudio.Design”的项目,该项目包含对.Net 3.5中程序集的引用,而Visual Studio无法识别Microsoft.Windows.Design。*程序集,因为程序集存在于.Net 3.5中。
So when i changing Target Framework to 3.5 unfortunately this changing not reflected and then target framework set again to .Net 4 automatically. 因此,不幸的是,当我将目标框架更改为3.5时,此更改未反映出来,然后目标框架再次自动设置为.Net 4。
I want to know how to handle it to build without any problem? 我想知道如何处理它而不会出现任何问题?
Thank. 谢谢。
Run PEVerify or corflags
to determine whether FarsiLibrary.WPF.VisualStudio.Design
is mixed mode or a pure .NET application. 运行PEVerify或
corflags
确定FarsiLibrary.WPF.VisualStudio.Design
是混合模式还是纯.NET应用程序。
If it is a mixed mode assembly, add this to your app config file: 如果它是混合模式程序集,请将其添加到您的应用程序配置文件中:
configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
</configuration>
Or even better, recompile FarsiLibrary.WPF.VisualStudio.Design
targetting .NET 4.0. 甚至更好,重新编译针对.NET 4.0的
FarsiLibrary.WPF.VisualStudio.Design
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.