• [原创]sln、csproj:VS2008 –> VS2005


    今天做了一个尝试,把VS2008建立的工程和解决方案,转化成VS2005的,成功了。

    用VS2008建立了1个“Windows 窗体应用程序”,命名为Form1,保存退出。

    Form1.sln(修改前)

    ————————————————————————————————————————

    Microsoft Visual Studio Solution File, Format Version 10.00
    # Visual Studio 2008
    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Form1", "Form1\Form1.csproj", "{68522317-6F1A-44D6-B0CD-39E6DC21C6D6}"
    EndProject
    Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
            Debug|Any CPU = Debug|Any CPU
            Release|Any CPU = Release|Any CPU
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
            {68522317-6F1A-44D6-B0CD-39E6DC21C6D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
            {68522317-6F1A-44D6-B0CD-39E6DC21C6D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
            {68522317-6F1A-44D6-B0CD-39E6DC21C6D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
            {68522317-6F1A-44D6-B0CD-39E6DC21C6D6}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
            HideSolutionNode = FALSE
        EndGlobalSection
    EndGlobal

    ————————————————————————————————————————

     

    Form1.sln(修改后)

    ————————————————————————————————————————

    Microsoft Visual Studio Solution File, Format Version 9.00
    # Visual Studio 2005
    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Form1", "Form1\Form1.vs2k5.csproj", "{68522317-6F1A-44D6-B0CD-39E6DC21C6D6}"
    EndProject
    Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
            Debug|Any CPU = Debug|Any CPU
            Release|Any CPU = Release|Any CPU
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
            {68522317-6F1A-44D6-B0CD-39E6DC21C6D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
            {68522317-6F1A-44D6-B0CD-39E6DC21C6D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
            {68522317-6F1A-44D6-B0CD-39E6DC21C6D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
            {68522317-6F1A-44D6-B0CD-39E6DC21C6D6}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
            HideSolutionNode = FALSE
        EndGlobalSection
    EndGlobal

    ————————————————————————————————————————

    Form1.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.30729</ProductVersion>
        <SchemaVersion>2.0</SchemaVersion>
        <ProjectGuid>{68522317-6F1A-44D6-B0CD-39E6DC21C6D6}</ProjectGuid>
        <OutputType>WinExe</OutputType>
        <AppDesignerFolder>Properties</AppDesignerFolder>
        <RootNamespace>Form1</RootNamespace>
        <AssemblyName>Form1</AssemblyName>
        <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
        <FileAlignment>512</FileAlignment>
      </PropertyGroup>
      ……
      <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
      <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
           Other similar extension points exist, see Microsoft.Common.targets.
      <Target Name="BeforeBuild">
      </Target>
      <Target Name="AfterBuild">
      </Target>
      -->
    </Project>

    ————————————————————————————————————————

     

    Form1.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>8.0.50727</ProductVersion>
        <SchemaVersion>2.0</SchemaVersion>
        <ProjectGuid>{68522317-6F1A-44D6-B0CD-39E6DC21C6D6}</ProjectGuid>
        <OutputType>WinExe</OutputType>
        <AppDesignerFolder>Properties</AppDesignerFolder>
        <RootNamespace>Form1</RootNamespace>
        <AssemblyName>Form1</AssemblyName>
        <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
        <FileAlignment>512</FileAlignment>
      </PropertyGroup>
      ……
      <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
      <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
           Other similar extension points exist, see Microsoft.Common.targets.
      <Target Name="BeforeBuild">
      </Target>
      <Target Name="AfterBuild">
      </Target>
      -->
    </Project>

    ————————————————————————————————————————

    保存后,使用VS2005打开、编译,没有问题,不知道复杂的工程会不会有问题呢?

  • 相关阅读:
    每日日报
    设计模式分类及典型实现
    SpringBean的生命周期
    Nginx
    大话--单例模式
    类图--小总结
    设计模式原则概述
    大话--装饰者模式
    Redis基础
    SpringIOC的实现原理
  • 原文地址:https://www.cnblogs.com/oneisyou/p/1814106.html
Copyright © 2020-2023  润新知