我正在使用 Visual Studio 2010。
我做了一个 C# 项目,它在我的电脑上完美运行。
问题是当应用程序在另一台计算机上运行时,要求 .Net Framework。
每个人都没有安装 .Net Framework 的管理员权限,而且人们也不想安装它。
我应该遵循什么替代方案来解决这个问题?
(特别适用于 Windows 7)。
最佳答案
默认情况下,Windows 包含一个 .NET 版本。这是它们的 list 。
XP
- .NET v1.0 -- Service pack 1
- .NET v2.0 -- Service packs 2 & 3
Vista
- .NET v3.0 -- All service packs
Windows 7
- .NET v3.5 -- All versions and service packs
Windows 8
- .NET v4.0 + Metro UI available.
Windows 8.1
- .Net v4.5 + Metro UI available.
Windows 10
- .Net v4.6 + Metro UI + Universal Apps available.
Note:
All contains .NET v4.6 if Windows Update is enabled. (Not for all versions of windows)
部署选项:
There are several options of deployment.
Checking for .NET in installation. (Install systems like NSIS support this). See this for more info.
If you want to deploy portable app, notify users to install the required .NET version. (easier)
Target .NET 2.0 and all users are able to run your app since I think nobody is using XP SP1. (easiest. I use this to deploy mine.)
编辑
需要一些其他答案的清晰度,所以我引用 this维基百科注释。
.NET Framework 1.0 is integral OS component of Windows XP Media Center edition or Tablet PC edition. Installation CDs for the Home editions and the Professional editions of Windows XP SP1, SP2 or SP3 comes with .NET Framework installation packages.
关于.net - 如何在没有 .Net Framework 的情况下运行 C# Exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7611023/