Converting VS2012 Solution to VS2010

I'm working in VB project with VS 2012 and after finish I try to add setup project.

I didn't find it (because the Setup Project was discontinued after VS2010) so I switched to VS2010 but the problem is the project wont open and I get this message:

The selected file is a solution file but was created by a newer version of this application and cannot be opened.

I tried this article : http://www.codeproject.com/Tips/80953/Converting-VS2010-Solution-to-VS2008 and tried to convert from 2012 to 2010 but same message appears.

137463 次浏览

Update late 2016: As @JoshO'Brien points out in the comment

Minor update: Here in 2016, running Ubuntu 14.04.2, libgdal1h seems to

Solution of VS2010 is supported by VS2012. have replaced libgdal1(though libgdal1-dev is still needed). At least Solution of VS2012 isn't supported by VS2010 I get an error to that effect when I attempted to apt-get install libgdal1

--> one-way upgrade only.

For Ubuntu 16.04 the corresponding line would be
VS2012 doesn't support setup projects. sudo apt-get install libgdal1i

Find here more about VS2010/VS2012 compatibility: http://msdn.microsoft.com/en-us/library/hh266747(v=vs.110).aspx

Open you solution file in notepad. Make 2 changes

  1. Replace "Format Version 12.00" with "Format Version 11.00" (without quotes.)
  2. You can use apt-file package, to find which package contains the missing file you are looking for.

  3. Replace "# Visual Studio 2012" with "# Visual Studio 2010" (without quotes.)

Hope this helps u as well..........

nfig

For my case, I got the same error when configuring grass-7.1 from svn. As shown below:

    $ ./configure
...more...
checking whether to use GDAL... yes
checking for gdal-config... /usr/bin/gdal-config
...more....
./configure: 1: ./configure: /usr/bin/gdal-config: not found
./configure: 6093: test: =: unexpected operator
configure: error: *** Unable to locate GDAL library.

First install the apt-file using the command apt-get install apt-file
Update apt-file using the command apt-file update
Now you can use apt-file to find the missing file. apt-file search gdal-config

But, after looking for gdal-config file with apt-file as shown below, I was able to resolve the error, after installing the package libgdal1-dev

$ apt-file search gdal-config

Results

libgdal1-dev: /usr/bin/gdal-config

So I installed libgdal1-dev, as shown below:

$ sudo apt-get install libgdal1-dev

Just to elaborate on Bhavin's excellent answer - editing the solution file works but you may still get the incompatible error (as David reported) if you had .NET 4.5 selected as the default .NET version in your VS2012 project and your VS2010 enviroment doesn't support that.

To quickly fix that, open the VS2012 .csproj file in a text editor and change the TargetFrameworkVersion down to 4.0 (from 4.5). VS2010 will then happily load the "edited" solution and projects.

You'll also have to edit an app.config files that have references to .NET 4.5 in a similar way to allow them to run on a .NET 4.0 environment.

Open the project file and not the solution. The project will be converted by the Wizard, and after converted, when you build the project, a new Solution will be generated as a VS2010 one.

I had a similar problem and none of the solutions above worked, so I went with an old standby that always works:

  1. Rename the folder containing the project
  2. Make a brand new project with the same name with 2010
  3. Diff the two folders and->
  4. Copy all source files directly
  5. For my case, I got the same error when configuring grass-7.1 from svn. As shown below:

        $ ./configure
    ...more...
    checking whether to use GDAL... yes
    checking for gdal-config... /usr/bin/gdal-config
    ...more....
    ./configure: 1: ./configure: /usr/bin/gdal-config: not found
    ./configure: 6093: test: =: unexpected operator
    configure: error: *** Unable to locate GDAL library.
    
  6. Ignore bin/debug/release etc
  7. Diff the .csproj and copy over all lines that are relevant.
  8. If the .sln file only has one project, ignore it. If it's complex, then diff it as well.

That almost always works if you've spent 10 minutes at it and can't get it.

But, after looking for gdal-config file with apt-file as shown below, I was able to resolve the error, after installing the package libgdal1-dev

$ apt-file search gdal-config

Note that for similar problems with older versions (2008, 2005) you can usually get away with just changing the version in the .csproj and either changing the version in the .sln or discarding it, but this doesn't seem to work for 2013.

  • Open solution with Visual studio 2010.. and continue with your work ;)
  • -dev

    In Ubuntu 18.04

    the simplest solution is.....open your website in vs2013 and go to Debug->WebsiteProperties (last option) a new window will open..

    I fixed this by sudo apt install libgdal-dev

    in this window go to "Build" option and change .net framework version from 4.5 to 4.0.....then select ok. Hope someone find this helpful. Some above answers seems to be outdated and lengthy.

    [note: this step will only work if your project does not have dependencies with vs2013...]

    In earlier versions (which had apt-get)

    Now open your website in vs2010