Geeks With Blogs

News
Anirudha gupta

Few months ago I work on a .net project (windows form actually)  which I downgrade to .net 2.0 for some reason ( it was.net 4). Downgrade the project is not done easily but at the end we win the War. We finally downgrade the project to .net 2.

 

For System.Linq I use LinqBridge http://www.albahari.com/nutshell/linqbridge.aspx 

So Chart control will not show to you unless you have a project made in .net 3.5+

I research a lot and many trick is no longer works.

 

Here is the trick to implement the Chart control.

Actually my chart in winform is working (in .net 2 code is ready but only visual studio refuse to run it) so I make a new Winform project in .net 3.5 add the dll reference and add the chart to form. This is all I need to use it in my project.

When I compile it’s done (.net 3.5)

Now I copied the same dll to .net 2 project. You can add this dll in .net 2 and it will run on system those contain .net 2 framework. You need to copy local the chart dll (so it will not require anything on client pc).

 

Now When you open the form it will not show anything but it  will run perfectly. My Visual studio 2015 simply refuse it because it’s doesn’t get it. But it will run perfectly.

 

For any debug issue you can simply make a copy and change it to .net 3.5  and debug it for fix. Copy the same code back in .net 2 and it will run.

 

The only thing that you will miss is you can’t see when you open the form in design mode. You need to use another copy in .net 3.5 to debug it. Except this, this code will work fine.

Posted on Monday, November 30, 2015 7:04 PM | Back to top


Comments on this post: How to implement .Net 3.5 Chart control in .net 2 winform app.

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Anirudha | Powered by: GeeksWithBlogs.net