krb
krb

Reputation: 16315

Create C# applications which are not framework dependant?

Is creating applications which don't depend on all of the framework components possible? I know that you can merge the framework with the app but the whole framework is about 20mb and I'm not sure if all of it is used.

Upvotes: 0

Views: 283

Answers (5)

David
David

Reputation: 73554

if you're asking if you can create a C# application that can be run on a machine without the .NET framework installed, the answer is no. C# apps (as with other managed apps) need the runtime provided by the framework to run.

Edit

Correction. I was wrong, but with caveats.

See the following link:

http://www.pobox.com/~skeet/csharp/faq/#framework.required

Upvotes: 3

EricBudd
EricBudd

Reputation: 21

You could try a linker like the one found here. I don't know how well they work, but it is an option.

Upvotes: 0

Sander Rijken
Sander Rijken

Reputation: 21615

Starting at .NET 3.5, you can target the "Client Profile", a smaller subset of the .NET Framework. See the introduction post by Scott Guthrie

Upvotes: 1

Neil N
Neil N

Reputation: 25258

If you want to do that, your best bet is to switch to Mono. Mono has a linker.

Upvotes: 2

John Saunders
John Saunders

Reputation: 161773

It's a mistake to tie one arm behind your back, by limiting the amount of the Framework that you think you need.

If 20mb of disk space is a problem, then you've got some real problems.

Upvotes: 1

Related Questions