Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Run C# Exe without .Net Framework

Tags:

.net

I am using Visual Studio 2010. I made a C# project and it runs perfectly on my Computer.

Problem is this that when Application is run on another Computer, that ask for .Net Framework. Everybody doesn't have administrator Access to install .Net Framework and also peoples don't want to install that.

What alternative i should follow to sort out this problem? (Specifically for Windows 7).

like image 429
Haji TAG Avatar asked Sep 30 '11 13:09

Haji TAG


2 Answers

Windows contains a version of .NET by default. Here's a listing of them.

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)

Options of deployment:

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.)

EDIT

There needs some clarity with some other answers, so I'm quoting this Wikipedia note.

.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.

like image 56
Sri Harsha Chilakapati Avatar answered Nov 03 '22 03:11

Sri Harsha Chilakapati


No way! CLR is absolutely needed for managed apps.

like image 5
Artem Chilin Avatar answered Nov 03 '22 04:11

Artem Chilin