• 关于.NET Core 2.0.2升级到2.1.1版本相关问题


    之前,因日常任务管理比较混乱,所以自己开发了PTager任务管理系统。

    当时用了.NET Core 2.0版本。

    现在想修改相关功能,但.NET Core已发布到2.1.301了,也即2.1.1。

    附上修改前的csproj文件:

    <Project Sdk="Microsoft.NET.Sdk.Web">
      <PropertyGroup>
        <TargetFramework>netcoreapp2.0</TargetFramework>
        <UserSecretsId>aspnet-***-05A5CB6C-2204-4A9F-A965-F9D775FAEBFE</UserSecretsId>
      </PropertyGroup>
      <ItemGroup>
        <PackageReference Include="BuildBundlerMinifier" Version="2.6.375" />
        <PackageReference Include="MailKit" Version="2.0.2" />
        <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
        <PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.0-preview2-final" />
        <PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.0.0-preview2-final" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" PrivateAssets="All" />
        <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" PrivateAssets="All" />
        <PackageReference Include="NUglify" Version="1.5.10" />
      </ItemGroup>
      <ItemGroup>
        <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.1" />
        <DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" />
        <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
      </ItemGroup>
    </Project>  

    因为2.1的版本开始,就不建议直接用 Microsoft.AspNetCore.All,所以修改为 Microsoft.AspNetCore.App

    其中因为默认用了本地安装的.NET Core 2.1.0,所以和SignalR的1.0.1版本有Http版本引用的冲突,所以需要制定*.App的版本号为2.1.1

    修改后的csproj文件如下:

    <Project Sdk="Microsoft.NET.Sdk.Web">
      <PropertyGroup>
        <TargetFramework>netcoreapp2.0</TargetFramework>
        <UserSecretsId>aspnet-***-05A5CB6C-2204-4A9F-A965-F9D775FAEBFE</UserSecretsId>
      </PropertyGroup>
      <ItemGroup>
        <PackageReference Include="BuildBundlerMinifier" Version="2.8.391" />
        <PackageReference Include="MailKit" Version="2.0.4" />
       <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.1" />
        <PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.1" />
        <PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.0.1" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" PrivateAssets="All" />
        <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" PrivateAssets="All" />
        <PackageReference Include="NUglify" Version="1.5.11" />
      </ItemGroup>
      <ItemGroup>
        <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.1" />
        <DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" />
        <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
      </ItemGroup>
    </Project> 
    

      

  • 相关阅读:
    Linux学习笔记(20)linux exec
    【最佳实践】filezilla软件用bat自动化ftp传输文件
    Windows定时任务定时执行bat文件标准输出默认位置
    安装mysql odbc5.3.13
    如何查看windows server是否有web发布?
    C#串口通讯
    asp.net中通过post的方式导出文件操作。
    C#USB口通讯
    jquery UI的Widet
    asp.net中的常规认证方式枚举(涵盖mvc)(一)
  • 原文地址:https://www.cnblogs.com/bu-dong/p/9216742.html
Copyright © 2020-2023  润新知