NET兼容性 [英] dot NET Compatibility

查看:88
本文介绍了NET兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2010制作了一个c#程序,但是当我在另一台计算机上运行其exe文件时,出现一条错误消息,告诉我要安装".NET 4" ...

首先,有什么方法可以使我的程序与以前的.NET版本兼容?
(因为我不想在每台计算机上运行程序之前在每台计算机上安装".NET 4")

其次,可以为我提供Windows XP的".NET 4"安装文件吗?

在此先感谢您,

I made a c# program using Visual studio 2010 but when I run its exe file on another computer I get an error message telling me to install ".NET 4"...

First, is there any way to make my program compatible with previous .NET versions?
(because I don''t want to install ".NET 4" on every computer before I run my program on it)

Second, can you provide me with a ".NET 4" setup file for windows XP???

thanks in advance,

推荐答案

您需要更改项目中定位的.NET版本,请参阅此MSDN 网络安装程序 [独立安装程序 [
You need to change the .NET version you are targeting in your project, see this MSDN article[^] on how to do this.

You can either use the web installer[^] or use the standalone installer[^] for Microsoft Microsoft .NET Framework 4.


已发行的发行版VS2010中的.NET Framework 4将具有.Net Framework 4的依赖项,因此,如果未安装Framework 4,则可能无法在计算机上运行它.实际上,您可以将Framework 4运行时添加为项目的一部分,以便在创建程序包的同时将其与程序一起安装,但是使用exe仍然会出现问题.

这是框架4安装程序要下载的链接:

http://www.microsoft.com/download/zh-CN/details.aspx? displaylang = en& id = 17718 [ ^ ]
The release built from the VS2010 would have a dependency of .Net Framework 4 so you may not be able to run it on a machine if it does not have framework 4 installed. Actually you can add the framework 4 runtime as part of your project so it gets installed along with the program if you create a package of it but with an exe you would still have the issue.

This is the link for framework 4 installer to download:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17718[^]


这篇关于NET兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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