zoukankan      html  css  js  c++  java
  • 从.Net Core 2.x 到 3.x 的二三事

    之前使用的VS2017,附带的.Net Core SDK是2.x的
    迫于好多

    不清楚有没有办法可以直接把.Net Core 3.x的SDK直接捞过来安装使用,没搜到攻略,怕踩坑。

    现使用的方案是把VS2017卸载了,新安装VS2019,VS2019自带了.Net Core 3.x
    注意事项:

    1、卸载2017和安装2019要在Visual Studio Installler的程序中进行,2019的Installer要在官网下载,装community版本就ok了

    2、.Net Core 3.x没有内置dotnet-ef的指令,所以我们只能通过安装dotnet 工具使用
    安装指令

    dotnet tool install --global dotnet-ef

    若使用时仍有提示
    It was not possible to find any compatible framework version
    The framework 'Microsoft.NETCore.App', version '3.1.2' was not found

    You can resolve the problem by installing the specified framework and/or SDK.
    The specified framework can be found at:
      - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.2&arch=x64&rid=win10-x64
    到指示的链接选择SDK下载。就可以了
     
    p.s. 可能还有别的坑没遇到,此随笔持续更新


    3、dotnet core 2.x的代码在runtime升3.x后肯定是不能直接跑的,参考微软的升级攻略(https://docs.microsoft.com/zh-cn/aspnet/core/migration/30-to-31?view=aspnetcore-3.1&tabs=visual-studio)来改自己项目的代码。

  • 相关阅读:
    python
    python中xrange和range的区别
    python
    shell用if
    shell调用shell
    An unhandled exception of type 'System.TypeInitializationException' occurred in System.ServiceModel.dll
    C# 获取存在DataTable1不存在DataTable2的数据的快速方法
    textbox自动提示
    全面理解面向对象的 JavaScript(转载)
    C#中文乱码转换
  • 原文地址:https://www.cnblogs.com/ogurayui/p/12425897.html
Copyright © 2011-2022 走看看