tags:

views:

146

answers:

5

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.

+1  A: 

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.

John Saunders
Well, that depends on your target platform doesn't it?
Superstringcheese
If you're sending an app which is 2mb with embedded framework libraries it will increase the size of an app up to 22mb
Nick Brooks
Then get people to install the framework separately, rather than embedding it in your app. Or perhaps make your installer download and install it if it's not present. Keeps the size of your app low (for the people who already have the framework), while still including all required dependencies.
Anon.
My story. We had to replace ("upgrade" they called it) SW for DVB-T transmitter. We went from 8-bit SBC to full fledged SBC with embedded Debian Linux, 512MB RAM, RTC, ARM9, RTC,2 SATA ports (unused) and two SD card slots, all for <150€. We plugged in 1GB SD card, full Debian and Mono 2.4 on it. With 1 or 2 glitches, we developed almost exclusively with VS and .NET and simply deployed to Mono on device, which is hardlybigger than a pack of candies. It runs ASP.NET, SNMP server, SQLite and other stuff. Needs 5V PSU. I really can't see *why* .NET runtime is such a problem on a full blown PC?
Dejan Stanič
+3  A: 

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

David Stratton
I have Xenocode Virtualisation Studio but it creates huge files if I embed framework in it
Nick Brooks
What problem are you trying to solve?
Lasse V. Karlsen
+2  A: 

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

Neil N
Embedding framework is not a problem , I have the required tools to do that
Nick Brooks
Ok, so then remove the parts you dont use... whats the issue here?
Neil N
+1  A: 

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

Sander Rijken
A: 

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

EricBudd
It is not a linker, it is a virtualisator and I have it at work but it creates huge files and it makes a sandbox when you run it
Nick Brooks