.net - 如何在没有 .Net Framework 的情况下运行 C# Exe

标签 .net

我正在使用 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/

相关文章:

c# - 正则表达式:来自文本的 URI 部分

.net - 如何使用 Net.TCP 从 1 个客户端实现对 WCF 服务的并发请求

c# - 如果异常是从 Microsoft 的代码中抛出的,我如何找出最初导致异常的原因?

c# - ML.Net 重新训练现有模型而不是训练新模型

.net - 奇怪的#_=_出现在response.redirect ASP.NET之后的url末尾

c# - 启动离线 ClickOnce 应用程序并等待退出

c# - Graphics.DrawString与TextRenderer.DrawText?哪些可以提供更好的质量

.net - 从具有不同 GUID 的 .Net 引用 COM+

c# - 尝试反序列化对象时出现 "Exception has been thrown by the target of an invocation."

c# - 每次使用 Prism 请求模块时,我都需要运行一个函数