.NET - 在运行应用程序之前验证并安装 .NET Framework 3.5
请先阅读完整的问题,然后再发表您的答案
大家好! 我目前正在 C# 中开发“高度定制的安装程序应用程序”,用于安装旧的经典 ASP 应用程序。它将在2.0版本开发期间使用(ASP.NET MVC with C#)。
由于它与默认安装包如此不同,我将其作为普通的 Windows 应用程序,而不是安装应用程序(安装应用程序不允许我们根据需要进行自定义)。
问题是:由于它是一个 Windows 应用程序,我必须“释放”它并发送带有 .DLL 的已编译的 .EXE,我不能“发布”,因为如果我这样做,发布的 .EXE 将“安装安装程序” “而不是我的申请。我需要一种方法来验证和安装 .NET Framework 3.5,就像发布选项中使用的引导程序包先决条件一样,但请记住,我不是在发布,而是在进行“发布”构建。
感谢您的帮助!
PLEASE READ THE FULL QUESTION BEFORE POST YOUR ANSWER
Hello guys!
I'm currently developing a "Extremelly customized Installer Application" in C# for installing a old classic ASP application. It'll be used during the 2.0 version is developed (ASP.NET MVC with C#).
As its so different from the efault install packages, I've made it as normal windows application, not as setup application (a setup application don't let us customize so much as I need).
And here is the problem: As its a windows application, I must "Release" it and send the compiled .EXE with the .DLLs, I must not "Publish" because if i do so, the published .EXE will "install the installer" and not my application. I need a way to verify and install the .NET Framework 3.5 like a bootstrap package prerequisite used in publishing option, but remember that I'm not publishing, I'm doing a "Release" build.
Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您不再将其视为安装程序而是将其视为配置实用程序,也许会有所帮助。需要安装程序才能运行。只需为其创建一个常规安装项目,该项目在安装后会自动启动该实用程序。检查此帖子 有关如何执行此操作的示例。
Maybe it will help if you stop thinking about it being an installer but consider it a configuration utility. That needs an installer before it can run. Just create a regular Setup project for it, one that automatically launches the utility after it is installed. Check this thread for an example on how to do that.
我知道这可能不是您所要求的,但是,您是否考虑过使用 WiX 工具包。
WiX 工具包构建了适用于安装软件的 Windows Installer (MSI),您可以使用自定义操作执行几乎所有操作,并且可以通过简单的方法执行自定义任务,例如安装先决条件。听起来您正在寻找的是 “如何:安装 .NET使用引导程序的框架”。
我强烈建议使用 Windows Installer 而不是自定义安装应用程序 (EXE),因为有些环境您无法测试,甚至可能没有考虑过。
Windows Installer 在使用多年以来已经经过了广泛的测试,对于我个人来说,作为一名系统管理员,看到 MSI 下载增强了我对该应用程序的信心;根据我的经验,Windows Installer 软件包比自定义安装解决方案更简单。
I know this is probably not what you are asking for, however, have you considered using the WiX toolkit.
The WiX toolkit builds Windows Installer (MSIs) which are geared for installing software, there is very little you can not do with custom actions and there are simple ways of doing custom tasks such as installing prerequisites. By the sounds of it the one you are looking for is "How To: Install the .NET Framework Using a Bootstrapper".
I would highly advise using Windows Installer over a custom setup application (EXE), as there are environments that you will not be able to test for, and may not have even considered.
Windows Installer has been extensively tested over the years it has been used, for me personally as a Systems Administrator seeing a MSI download boosts my confidence in the application; in my experience Windows Installer packages are less troublesome than custom install solutions.
Nullsoft 脚本安装系统是一个非常流行替代
获取.Net框架版本的示例代码< /a>
Nullsoft Scriptable Install System is a very popular alternative
sample code to get .Net framework version