简体   繁体   中英

C# running on older .net version

I recently wrote ac# 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!

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM