News

 

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.


 

If your visual studio run too slow for download the nuget package that is common to the most project you build in daily rutine then you can follow same trick as 2013.

open the local appdata folder by this

%userprofile%\appdata\locallow

open the nuget > cache folder and add it to

Tools > options > Package source > Add it here and next time choose Offline for package source and you can save your time and bandwidth both.


 

If you compile your winform project (regardless to target version of .net framework) and it’s can’t be compiled on another machine (which don’t have update 1 RC as yours) then here is the trick to fix it.

 

Delete Every obj folder in root of every projects. if you have multiple project then consider this stackoverflow post to do it faster http://stackoverflow.com/questions/755382/i-want-to-delete-all-bin-and-obj-folders-to-force-all-projects-to-rebuild-everyt


Now when you done after delete all obj folder you can simply click F5 and it will be run fine.

 

Smile