none
How to downgrade from Visual Studio 2010 solution to Visual Basic 2008 Express Edition ?

    Question

  • I have a solution file which created using VS 2010 Ultimate version. It is only a Visual Basic application.

    In another computer, I installed Microsoft Visual studio 2008 express edition--Visual Basic only. 

    When I tried to "open project"  that *.sln in this computer. It did not work and displayed a box which says "The selected file is a solution,but created by a newer version of this application and can not be opened".

    I tried to edit that *.sln file. I changed "Microsoft Visual Studio Solution File, Format Version 11.00
    # Visual Studio 2010" to be "Microsoft Visual Studio Solution File, Format Version 10.00
    # Visual Basic Express 2008". 

    Indeed it could open that *.sln.  But it had a lot of errors.

    How to solve this problem? Thanks in advance.




    • Edited by hyeewang Monday, March 12, 2012 9:41 PM
    Monday, March 12, 2012 9:22 PM

Answers

  • The only way to do it is a piece at a time, manually. Did the VS 2010 project target .NET Framework 4.0? If so, that is probably the source of the issues as VS 2008 cannot see .NET Framework 4.0.

    It may help to open the original project in VS 2010 and change the target framework to 3.5 or less. That will allow you to see if the project uses features unique to .NET Framework 4.0. If such features are used, you will have to rewrite those parts of the project to not use 4.0 - only features. Once you have the project working with .NET 3.5, then that .sln changes you made should allow the project to open in VS 2008 Express.

    • Marked as answer by hyeewang Tuesday, March 13, 2012 1:51 PM
    Tuesday, March 13, 2012 12:25 AM
  • Hi hyeewang, when you open up VB 2008 Express, you should see the "Solution Explorer" window to the right side of the screen. If you still don't see it, please click "View" from the menu, and click on "Solution Explorer". Once you can see it, you will be able to see your project name. It is located right at the top and is in bold text. "WindowsApplication2" is the project name which is highlighted below in the picture.

    I can use menu File -- Add -- existing project. Is this same as your idea?

    No it is not the same. That adds an existing project into your solution.

    Actually,I do not know which files I should import into the new VS 2008 solution. Should I select *.sln only or the project directory with all sub-directories and files?

    You should browse into the VS 2010 project directory, and select the .vb files that you want to add into the new project when you are in the "Add Existing Item" dialog box.

    • Edited by systemx Wednesday, March 14, 2012 2:07 AM
    • Marked as answer by hyeewang Wednesday, March 14, 2012 2:53 AM
    Wednesday, March 14, 2012 1:57 AM

All replies

  • The only way to do it is a piece at a time, manually. Did the VS 2010 project target .NET Framework 4.0? If so, that is probably the source of the issues as VS 2008 cannot see .NET Framework 4.0.

    It may help to open the original project in VS 2010 and change the target framework to 3.5 or less. That will allow you to see if the project uses features unique to .NET Framework 4.0. If such features are used, you will have to rewrite those parts of the project to not use 4.0 - only features. Once you have the project working with .NET 3.5, then that .sln changes you made should allow the project to open in VS 2008 Express.

    • Marked as answer by hyeewang Tuesday, March 13, 2012 1:51 PM
    Tuesday, March 13, 2012 12:25 AM
  •  Thank you. What you said is really the case.

    You told me to " open the original project in VS 2010 and change the target framework to 3.5 or less". I am new to VB.net and do not know where to change  "the target framework".  Could you help again? Thanks in advance.

    Tuesday, March 13, 2012 3:09 AM
  • Hi hyeewang, you can change the target framework in VS 2010 with the following steps below:

    1. Open your solution
    2. Right-click your project which is underneath the solution name
    3. Click "Properties"
    4. On the left side, select "Compile"
    5. At the bottom, click the "Advanced Compile Options..." button
    6. At the bottom, look for "Target framework (All configurations)"
    7. Click on the drop down box, and select ".NET framework 3.5 Client Profile" and press the "Ok" button

    Out of curiosity, I created a project in VS 2010 targetting 4.0. After that, I changed the target framework to 3.5. I closed VS 2010, launched VS 2008 and tried to open the solution file that was created in VS 2010 with the target framework changed to 3.5. I got an error saying that the solution was created with a newer version of VS and cannot be opened. Can you verify this pvdg42?

    Hyeewang, looks like you will have to create a new VB.net project in VS 2008, and then import the existing files from the VS 2010 solution into your new VS 2008 project with the following steps below:

    1. Create a new VS 2008 project, and once done, right-click your project name
    2. Click "Add"
    3. Click "Existing item"
    4. Browse to the VS 2010 solution directory and select all the files you wish to import into the new VS 2008 solution
    5. Click "Add"

    • Edited by systemx Tuesday, March 13, 2012 8:27 AM
    Tuesday, March 13, 2012 8:27 AM
  • Dear systemx, Thank you very much.

    Now I am in the computer with VS 2008 express, not in the computer with VS 2010. I can not change the target framework right now.

    However,I am trying to import the exsited 2010 *.sln according to your guidance. I still have some questions.

    1. Create a new VS 2008 project, and once done, right-click your project name
     2. Click "Add"
     3. Click "Existing item"
     
    I have launched my Visual Basic Express 2008 and created a new VS 2008 project. But I can not find my project name to right click. Which box is it located in?

    I can use menu File -- Add -- existing project. Is this same as your idea?

    4. Browse to the VS 2010 solution directory and select all the files you wish to import into the new VS 2008 solution
    5. Click "Add"

    Actually,I do not know which files I should import into the new VS 2008 solution. Should I select *.sln only or the project directory with all sub-directories and files?

    Thank you for your help.

    Cheers

    Tuesday, March 13, 2012 1:53 PM
  • Hi hyeewang, when you open up VB 2008 Express, you should see the "Solution Explorer" window to the right side of the screen. If you still don't see it, please click "View" from the menu, and click on "Solution Explorer". Once you can see it, you will be able to see your project name. It is located right at the top and is in bold text. "WindowsApplication2" is the project name which is highlighted below in the picture.

    I can use menu File -- Add -- existing project. Is this same as your idea?

    No it is not the same. That adds an existing project into your solution.

    Actually,I do not know which files I should import into the new VS 2008 solution. Should I select *.sln only or the project directory with all sub-directories and files?

    You should browse into the VS 2010 project directory, and select the .vb files that you want to add into the new project when you are in the "Add Existing Item" dialog box.

    • Edited by systemx Wednesday, March 14, 2012 2:07 AM
    • Marked as answer by hyeewang Wednesday, March 14, 2012 2:53 AM
    Wednesday, March 14, 2012 1:57 AM
  • systemx. Thank you. You are really helpful.

    According to your instruction, I changed the target framework of my VS2010 solution from .Net framework 4.0 client profile to .Net framework  3.5 client profile and ran the solution. It worked.

    I do not know the difference between ".Net framework  3.5 client profile" and ".Net framework  3.5". I do not know which suit Visual Basic 2008 express edition. I want to try ".Net framework  3.5 client profile" first.

    I opened Visual Basic 2008 express edition. Use FILE - open project.. Just as I expected, it did not work. I edited the sln file like the way in my first post. I opened the project again and it worked. Also, it ran well generally.

    I also learned what you said about how to find "project name". I bothered you so much.

    Thank you for help.
    Have a good day.

    Wednesday, March 14, 2012 2:55 AM
  • Hi hyeewang, please have a look at this link. The first paragraph briefly explains the difference between the .NET framework 3.5 client profile and the .NET framework 3.5. In short, the client profile type.

    Out of curiosity, is there any reason why you would go back to VS 2008 Express? There is also an VB 2010 Express version that exists which you can get from here if you did not know.

    Wednesday, March 14, 2012 3:39 AM
  • Hi, systemx. Thank you for your information.

    I really do not want to go back to VS 2008. But the company only installed VS2008 express edition for me to do a configuration application software including GUI. I have a VS2010 at home and has alrerady done some job in it. That is the reason I want to "go back or foward".

    I also can try VS2010 express. I think it need not something to go back. The only concern is that wheather the express edition can really do what I need, although I only want to do a simple application.

    Thursday, March 15, 2012 9:32 PM
  • I feel your pain, but basically there is no convenient "going back and forth" between VS 2008 and VS 2010. Every time you open the project in VS 2010 (assuming it was last opened in VS 2008), the Upgrade Wizard will run and update your .sln and .vbproj files. When you return to VS 2008, you'll have to manually edit those files each time.

    One alternative for a bandaid for you is the availability of VS 2008 Express. You can install VS 2008 Express side by side with VS 2010 on your home computer:

    http://msdn.microsoft.com/en-us/express/future/bb421473

    Friday, March 16, 2012 1:06 AM