修改VS解決方案及工程名,解決如何打開高/版本VS項目


 

對於VS2008等低版本與高版本VS之間的轉換問題:

對照下面2個版本的不同點自由修改,切換到相應的版本文件(紅字修改,灰色刪除)

--------------------------------------------------------------------------------------------------

低版本VS2008:

修改[解決方案文件.sln] 用記事本打開,找到如下信息:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008


修改工程名.csproj:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>

    <ProjectGuid>{B1B8919C-53FA-4791-8123-2734B1F723D1}</ProjectGuid>

    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>

--------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------

高版本VS2013:

修改[解決方案文件.sln] 用記事本打開,找到如下信息:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1

 

修改工程名.csproj:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{6022CDCE-C809-4D35-A355-72EDDE889F9F}</ProjectGuid>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>

----------------------------------------------------------------------------------------------------

如果修改.net framework版本,請注意相應的修改引用的dll的目標版本號<RequiredTargetFramework>3.5</RequiredTargetFramework>

或者打開解決方案后,檢查工程下的引用是否正常,不正常移除后重新引用一下

 

vs2008轉成vs2013已經試過了沒問題(解決方案,工程名都能正常打開編譯運行)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM