C# running on older .net version
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开发者_C百科.
Thanks for any feedback!
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.
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.
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
精彩评论