How to switch programming in C# to different versions of .NET ?

Out of 300 MB of .Net 3.5 , my code must not be even using 2 MB. There must be a way to extract those files and compile it.