Is there a tool to convert a .Net 3.5 app back to 2.0?

Posted on 2008-11-12
Last Modified: 2013-12-17
I've written some cute, semi-useful apps.  They're in C# and .Net 3.5.  Unfortunately, a lot of the places around work where I would like to use them are machines with only .Net 2.0.  That means just to use my tool, I have to install a new framework.  Bummer.  Is there an easy way to convert a 3.5 app to 2.0?  Perhaps there is a tool out there for this?  My code goes in one side as 3.5 and comes out the other as 2.0?  Or am I stuck with basically rebuilding?  

Question by:mrcoulson
    LVL 16

    Accepted Solution

    there is no direct tool as such ... you can do one thing ... open that solution in vs2008 and select target framwork as 2.0  and compile that application ... if your code is using any specific framework feature it will throw some error else ... your application will work on 2.0 :)

    before that your machine should have framework 2.0 installed
    LVL 62

    Assisted Solution

    by:Fernando Soto
    Hi mrcoulson;

    Before recreating the application you may want to try the following. I have not done this myself but I don't see why it will not work. Also be aware that if you used and new 3.5 features in your code that section will need to be re-written for 2.0. Also check the reference node in Solution Explorer for any warning on the assemblies and resolve them.

    Save the project folder to another location
    Open the copy of the project in Visual Studio .Net
    Go to Solution Explorer and right click on the Project Name and select Properties from the context menu.
    Select the Application Tab
    Change the Target Framework: from 3.5 to 2.0 and a warning Dialog box will appear. Read and Select Yes.
    Re-open the project. If you used any assemblies that are 3.5 you will need to remove them and rewrite the sections of code that is not supported in 2.0.
    Compile and test.


    Author Comment

    Yeah, I've done that.  I'm a n00b at this and have only developed in 3.5, so going back to 2.0 is kind of like re-learning.  Here's a related question: is there a way to make Visual C# Developer's Intellisense pull from 2.0?

    See, I basically have learned 70% of what I know with Intellisense.  For example, I have a control and I want to do something with it, so I type its name and wait for Intellisense to tell me what's available for the control.  Of course, after that I may need to refer to MSDN to find out more about a method or something, but at least Intellisense gives me a mental springboard.

    So, is there a way to make Intellisense use 2.0?
    LVL 62

    Assisted Solution

    by:Fernando Soto
    Intellisense will display what is available on the Target .Net Framework. So if you are working in 3.5 everything that is supported in 3.5 will be shown and if you are working in 2.0 only 2.0 Functions/Methods/Types will be shown.

    Author Comment

    Oh, rad!  So if I change the target framework, Intellsense knows it.!

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now