是否有可能为.Net框架版本制定条件 [英] Is it possible to make condition for .Net framework version

查看:71
本文介绍了是否有可能为.Net框架版本制定条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Code Project,

i希望制作一个可以使我的程序(游戏自动更新器和发射器)更好一点的小东西。

我的程序编码在.Net Framework 3.5上,简单地说如果我安装.Net Framework 3.5比我可以使用我的程序没有任何bug,但如果我没有安装框架3.5那么我的程序将运行但它将无法正常工作,因为它应该。所以我只想制作一个小东西,如果它可以制作,如果安装.net框架3.5然后客户端可以完美运行,如果没有,那么客户端将无法启动。

任何人都可以帮助我这个?

在此先感谢

这是程序链接

程序(启动器)

Hello Code Project,
i want to make one little thing that can make my program(Game Auto Updater & launcher) bit more better.
my program is coded on .Net Framework 3.5, and simply if i have .Net Framework 3.5 installed than i can use my program without any bug, but if i don't have framework 3.5 installed then my program will run but it will not work correctly as it should. so i just want to make a little thing that if its possible to make like, If .net framework 3.5 is installed then client can run perfectly if not then client will not start.
can anyone help me with this?
Thanks in Advance
This is program Link
Program(Launcher)

推荐答案

最佳答案是Wes Aday的评论。请看我的评论。



没有必要检查一下。如果你编程目标某些.NET版本,你将无法运行此检查代码;它甚至不会加载。那么,为什么要写这样的东西?



一些应用程序在没有安装的情况下使用是完全可以的;它甚至应该是首选。甚至微软也开始鼓励这种方式。只有在系统中更改某些内容时才需要安装:注册表,文件关联,将某些内容放在按用户帐户配置的某些共享目录或所有用户中。在所有其他情况下,没有安装的应用程序是最好的。



在未安装所需的.NET版本的情况下,应用程序无法运行。更确切地说,它将无法加载负载。操作系统将显示相应的错误消息。没有什么可担心的。

在先决条件中只提及有关.NET框架的要求。



-SA
The best answer was the comment by Wes Aday. Please see my comment as well.

There is no a point to check it up. If you program target some .NET version, you won't be able to run this checking code; it won't even load. So, why trying to write such thing?

It's perfectly OK for some application to be used without installing; it and should even be preferred. Even Microsoft started to encourage this way. The installation is only needed if you change something in the system: registry, file associations, put something in some shared directories configured per user account or "all users". In all other cases, the application without installation is the best.

In required .NET version is not installed, the application simply fails to run. More exactly, it will fail to load load. The OS will show appropriate error message. There is nothing to worry about.
Only mention about the requirements about a .NET framework in your prerequisites.

—SA


使用项目设置中的Visual Studio发布选项创建安装程序,Visual Studio会创建一个检查应用程序要求的安装程序。您可以将.NET 3.5设置为一个要求。 :)
Create the installer with the Visual Studio publish option in the Project Settings, Visual Studio creates a installer that checks the requirements for the application. You can set .NET 3.5 as a requirement. :)


使用安装程序:它将确保安装所需的版本,如果不安装则下载/安装。
Use an installer program: it will ensure that the required version is installed and download / install it if it isn't.


这篇关于是否有可能为.Net框架版本制定条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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