tags:

views:

71

answers:

3

Hi,

I recently wrote a c# program on framework 4, before realising the entire company runs 3.5.

This is a problem mainly because of the charting support.

My question is: is it possible to just embed the dlls that would be missing in the application? So .net is on the machine, just missing some parts that are packaged with the app.

Thanks for any feedback!

+3  A: 

You will have trouble doing this because .NET 4 runs on a new version of the runtime, CLR.

I think your best and safest bet would be to try and compile the project for Framework 3.5. Of course it depends on the size and which features you have used, but I don't think you should have much trouble converting. Of course, if you rely heavily on new features, such as dynamic, it might not be so easy.

driis
+1  A: 

Are you using any .NET specific code? If not you can just rebuild the application and target .NET 3.5, its a simple setting change in project properties take a look here:

http://msdn.microsoft.com/en-us/library/bb398202.aspx

kyndigs
+1  A: 

Yes you can. Just consider the new features of .net framework 4 as a third-party charting library. But make sure that (1)you've involved all necessary dlls. (2) you didn't use other new features of .net 4 besides charting.

Danny Chen
Thanks for all the replies. I will have to wait to give it a go before accepting the right answer - and if there is any more feedback, feel free to throw it out there!
Mark
I have told Visual Studio to embed the charting dll, but it says it will not compile as 3.5 - is there more to it, like telling the code where to look?
Mark
Nevermind - think I might have it! Thanks for your help.
Mark