要运行这个应用程序,首先必须安装.NET 4.5 [英] To run this application, you first must install .Net 4.5

查看:4493
本文介绍了要运行这个应用程序,首先必须安装.NET 4.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我在VS2012中创建一个WPF项目,但现在想在VS2010破解。

I have a wpf project that I created in VS2012, but am now trying to hack in VS2010.

在的csproj文件,我删除了需要的版本'的东西。我可以打开VS2010项目,我可以编译它,但如果我尝试运行它,我得到的需求V4.5消息。

In the csproj file I removed the 'required version' stuff. I can open the project in VS2010, I can compile it too, but if I try to run it, I get the 'needs v4.5' message.

我试过删除所有引用和再次加入他们回来:仍然编译(所以所有的依赖应该是我(XP)的计算机上)

I tried removing all the references and adding them back in again: still compiles (so all the dependencies should be on my (XP) machine).

在别的地方我应该找?

Where else should I be looking?

推荐答案

检查的 < supportedRuntime方式> 的.config 文件元素

Check the <supportedRuntime> element in your .config file.

如果将它设置为< supportedRuntime版本=V4.0SKU =.net框架,版本= V4.5。/> 然后它会寻找.NET 4.5。 (而且,当然,这个设置是不是在所有的编译过程中使用,这也就是为什么VS不会发出任何有关它的警告或错误时,您编译)

If it's set to <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> then it will be looking for .NET 4.5. (And, of course, this setting isn't used at all during compilation, which is why VS won't be issuing any warnings or errors about it when you compile)

这篇关于要运行这个应用程序,首先必须安装.NET 4.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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