Modern Agriculture
Modern Agriculture

Reputation: 3

running C# application on PC without having .net framework

I prepared a C# application that reads from registry and saves result in a simple notepad file. I tried to run it on another PC that doesn't have .net Framework. It gave initialization error because of not having .net Framework. The problem is that I can't install .net framework on that PC which has Win XP. Is there any way that I can run this application without having .net framework?? Please help as I need it urgently>>>....

Upvotes: 0

Views: 846

Answers (2)

TIKSN
TIKSN

Reputation: 615

Pack .NET DLLs with the application.

In reference section set copy on build.

Right click on reference (e.g. System.Web) and press F4. Rest is pretty self-explainatory.

Upvotes: -1

Kurubaran
Kurubaran

Reputation: 8902

Latest windows OS is normally packed with a default .Net Framework. Windows XP is packed with

XP

  • NET v1.0 Service pack 1
  • NET v2.0 -- Service packs 2 & 3

If it's not necessary for you to use latest version of .net Framework then you could change the target .Net Framework of your application[Go to Project Properties > Application > Target framework] to lowest version that default OS version has then you should be able to run your program without installing latest .net framework.

Upvotes: 2

Related Questions