如果不存在框架或版本,如何运行安装 [英] How Can I Run Installation If Framework Or Ie Version Don't Exists

查看:86
本文介绍了如果不存在框架或版本,如何运行安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我正在为我的C#.NET应用程序制作一个安装程序。它要求一些要求,例如Framework版本和IE版本。我怎么能这样做,如果没有安装.NET框架版本的版本导航用户到特定的网站或运行exe将安装框架和ie?

Hello,

I'm making an installer for my C# .NET application.It's asking for few requirements such as Framework version and IE version.How can i do that if ie version of .NET framework version is not installed navigate user to specific website or run exe which will install framework and ie?

推荐答案

你有两个选择: 1)声称某些版本的.NET作为先决条件;它不应该是保存版本作为您的目标框架版本,它应该是该版本或任何更高版本; 2)在您的应用程序中安装.NET框架。



请参阅:

http://support.microsoft.com/kb/818016 [ ^ ],

http://msdn.microsoft.com/en-us/library/adyexc1h%28v=vs.90%29.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/xak0tsbd%28v = vs.90%29.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/6hbb4k3e%28v=vs.110%29.aspx [<一个href =http://msdn.microsoft.com/en-us/library/6hbb4k3e%28v=vs.110%29.aspxtarget =_ blanktitle =New Window> ^ ]。



您需要检测是否已安装某个版本的.NET,以及哪些版本已安装。这取决于您使用的安装工具箱;它应该可以在所有情况下使用。



-SA
You have two options: 1) claim certain version of .NET as a prerequisite; it should not be the save version as your target framework version, it should be that version or any later version; 2) install .NET framework with your application.

Please see:
http://support.microsoft.com/kb/818016[^],
http://msdn.microsoft.com/en-us/library/adyexc1h%28v=vs.90%29.aspx[^],
http://msdn.microsoft.com/en-us/library/xak0tsbd%28v=vs.90%29.aspx[^],
http://msdn.microsoft.com/en-us/library/6hbb4k3e%28v=vs.110%29.aspx[^].

You will need to detect is some version of .NET is already installed, and which are installed. It depends on the installation toolbox you are using; it should be possible in all cases.

—SA


大多数安装程序都是本机应用程序:他们检查所需的.NET版本是否存在,如果不是,他们会自动下载并安装它以便目标应用程序可以运行。



如果你正在写您自己的安装程序,您几乎无法在C#中执行此操作 - 因为安装程序需要正确的.NET版本才能运行

例外情况是,您可以将用户限制为包含最低.NET版本的特定操作系统,然后在其属性中编写该版本的安装程序。例如,Vista包含.NET版本2,所以如果你的目标是,你的安装程序应该在所有后来的系统上运行。

这里有一个列表:: //blogs.msdn.com/b/astebner/archive/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os。 aspx [ ^ ]
Most installers are native applications: they check the required .NET version is present, and if it isn't they automatically download and install it so that the target application can run.

If you are writing your own installer, you pretty much can't do it in C# - as the installer would require the correct .NET version before it could run.
The exception to this is if you can restrict your users to particular operating systems which include a minimum .NET version and then write the installer for that version in it's properties. For example, Vista included .NET version 2 so if you target that, your installer should run on all later systems.
There is a list here: http://blogs.msdn.com/b/astebner/archive/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os.aspx[^]


这篇关于如果不存在框架或版本,如何运行安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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