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

查看:96
本文介绍了要运行此应用程序,您首先必须安装 .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).

我还应该去哪里找?

推荐答案

检查 元素在 .config 文件中.

如果设置为 <supportedRuntime version="v4.0" sku=".NETFramework,Version=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天全站免登陆