Visual Studio 2012 doesn't convert vs2010 solution?

后端 未结 10 771
没有蜡笔的小新
没有蜡笔的小新 2020-12-03 06:44

I opened my vs2010 solution with vs2012 but it didn\'t make any conversion as from 2008 to 2010 was happening. So my solution still remains the same as 10 label on it. when

相关标签:
10条回答
  • 2020-12-03 07:01

    It is about Visual Studio 2012 Compatibility

    If you created your assets in Visual Studio 2010 with Service Pack 1 (SP1), many of them will load and run in Visual Studio 2012 without any further action on your part.

    Many assets will also open again in Visual Studio 2010 with SP1 without any issues, even after you open those assets in Visual Studio 2012

    0 讨论(0)
  • 2020-12-03 07:02

    Manual editing of the solution file is not necessary, or recommended. Simply open the VS2010 solution in VS2012, left-click the solution (at the very top of the Solution Explorer), then use File | Save As to overwrite the original file. This will effectively convert the VS2010 solution file to a VS2012 solution file.

    0 讨论(0)
  • 2020-12-03 07:10

    I came across this question while googling for a solution to a specific problem: MSBuild was failing to execute the Publish target against a VS2012 solution that had started life in VS2010 when called from the command line (specifically through TeamCity):

    error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\2.3\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    

    MSBuild was looking for the Azure SDK 2.3 targets in the VS10 location (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\2.3\Microsoft.WindowsAzure.targets). The cause is explained by Sayed Ibrahim Hashimi in a blog post and, as I understood it, boils down to some decisions they made while enabling cross-version compatibility for solution files. The solution was simple: add the VisualStudioVersion property to the MSBuild invocation, something like this:

    msbuild.exe MyAwesomeWeb.sln /p:VisualStudioVersion=11.0
    

    Practically speaking, this overrides the following in each csproj file:

    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    

    Presumably you could get the same result by editing all of these by hand to replace 10.0 with 11.0 but that might break backwards-compatibility -- I haven't tried it. I also haven't tried an update to VS2013 to see if the problem persists.

    So to wrap this up by answering the question: yes, there are some differences before you "convert" (using any of the methods offered by other answerers) and some differences remain afterwards.

    0 讨论(0)
  • 2020-12-03 07:12

    it's to simple just edit the .sol file change the version to 11

    like this

    Microsoft Visual Studio Solution File, Format Version 12.00

    Visual Studio 2012
    0 讨论(0)
提交回复
热议问题