将EnyimMemcached从.NET Core RC1升级至RC2

.NET Core RC1时project.json中的配置如下:

{
    "version": "3.2.4",
    "summary": "EnyimMemcached",
    "frameworks": {
        "dnxcore50": { }
    },
    "configurations": {
        "Debug": {
            "compilationOptions": {
                "allowUnsafe": true
            }
        },
        "Release": {
            "compilationOptions": {
                "allowUnsafe": true
            }
        }
    },
    "dependencies": {
        "Microsoft.Extensions.Logging.Abstractions":"1.0.0-*",
        "Newtonsoft.Json": "8.0.3",
        "System.Linq.Expressions": "4.0.11-*",
        "System.Net.Primitives": "4.0.11-*",
        "System.Net.Sockets": "4.1.0-*",
        "System.Runtime.Serialization.Json": "4.0.1-*",
        "System.Runtime.Serialization.Primitives": "4.1.0-*",
        "System.Security.Cryptography.Algorithms": "4.0.0-*",
        "System.Threading.Timer": "4.0.1-*",
        "System.Net.NameResolution": "4.0.0-*",
        "System.Console": "4.0.0-*",
        "System.IO": "4.0.11-*",
        "System.IO.FileSystem": "4.0.1-*",
        "System.Threading.Thread": "4.0.0-*",
        "System.Text.Encoding": "4.0.11-*"
    }
}

升级至ASP.NET Core RC2时project.json修改为如下配置:

{
  "version": "4.0.0",
  "packOptions": {
    "summary": "EnyimMemcachedCore"
  },
  "configurations": {
    "Debug": {
      "buildOptions": {
        "allowUnsafe": true
      }
    },
    "Release": {
      "buildOptions": {
        "allowUnsafe": true
      }
    }
  },
  "frameworks": {
    "netcoreapp1.0": { }
  },
  "dependencies": {
    "Microsoft.Extensions.Logging.Abstractions": "1.0.0-rc2-final",
    "Newtonsoft.Json": "8.0.4-beta1", 
    "System.Linq.Expressions": "4.0.11-rc2-24027",
    "System.Net.Primitives": "4.0.11-rc2-24027",
    "System.Net.Sockets": "4.1.0-rc2-24027",
    "System.Runtime.Serialization.Json": "4.0.2-rc2-24027",
    "System.Runtime.Serialization.Primitives": "4.1.1-rc2-24027",
    "System.Security.Cryptography.Algorithms": "4.1.0-rc2-24027",
    "System.Threading.Timer": "4.0.1-rc2-24027",
    "System.Net.NameResolution": "4.0.0-rc2-24027",
    "System.Console": "4.0.0-rc2-24027",
    "System.IO": "4.1.0-rc2-24027",
    "System.IO.FileSystem": "4.0.1-rc2-24027",
    "System.Threading.Thread": "4.0.0-rc2-24027",
    "System.Text.Encoding": "4.0.11-rc2-24027"
  }
}

.NET Core RC1时Enyim.Caching.xproj文件的内容如下:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
  </PropertyGroup>
  <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
  <PropertyGroup Label="Globals">
    <ProjectGuid>0ec50fbb-03b7-4b76-9d72-aadcb8bb3a8b</ProjectGuid>
    <RootNamespace>Enyim.Caching</RootNamespace>
    <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
    <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
  </PropertyGroup>
  <PropertyGroup>
    <SchemaVersion>2.0</SchemaVersion>
    <TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
  </PropertyGroup>
  <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

升级至.NET Core RC1时将Enyim.Caching.xproj文件的内容修改为:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
  </PropertyGroup>
  <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
  <PropertyGroup Label="Globals">
    <ProjectGuid>a427e18a-3ae4-4805-b70c-3b017c794dee</ProjectGuid>
    <RootNamespace>Enyim.Caching</RootNamespace>
    <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
    <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
  </PropertyGroup>
  <PropertyGroup>
    <SchemaVersion>2.0</SchemaVersion>
    <TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <ProduceOutputsOnBuild>True</ProduceOutputsOnBuild>
  </PropertyGroup>
  <Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

【相关链接】

VS2015编译ASP.NET Core RC2项目出错:unknown keyword platform

.NET跨平台之旅:成功将示例站点升级至ASP.NET Core RC2

posted @ 2016-05-24 11:13 dudu 阅读(...) 评论(...) 编辑 收藏