Use Visual Studio 2017 with .Net Core SDK 3.0

前端 未结 8 830
再見小時候
再見小時候 2020-12-05 09:11

How Can I open .Net Core 3.0 project in Visual Studio 2017?

I have downloaded the .NET Core 3.0 SDK from dotnet.microsoft.com and created new project wi

相关标签:
8条回答
  • 2020-12-05 09:53

    This is fixed in latest vs preview. Install it following steps in here. https://docs.microsoft.com/en-us/visualstudio/mac/install-preview?view=vsmac-2019

    0 讨论(0)
  • 2020-12-05 09:56

    To create or open applications targeting .NET Core 3.0, Visual Studio 2019 or newer is required. When creating a new project Visual Studio may show you a yellow bar with the message "ASP.NET Core 3.0 or newer projects are not supported by this version of Visual Studio"

    more informaion: https://github.com/aspnet/Tooling/blob/master/dotnet-core-3.0-preview1.md

    0 讨论(0)
  • 2020-12-05 09:58

    Unfortunately .NET Core 3 requires MSBuild 16. Even if you enable preview versions of .NET Core in VS 2017 as others have suggested you will still get the error:

    The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 3.0.

    If you create a global.json file and put in eg.

    {
      "sdk": {
        "version": "3.0.100-preview5-011568"
      }
    }
    

    You then get shown the real problem which is:

    error : Version 3.0.100-preview5-011568 of the .NET Core SDK requires at least version 16.0.0 of MSBuild. The current available version of MSBuild is 15.9.21.664. Change the .NET Core SDK specified in global.json to an older version that requires the MSBuild version currently available.`

    MSBuild 16 only comes with VS 2019, so, the answer is that you CAN use VS 2017 with .NET Core 3, but only if you also have VS 2019 installed as well!

    0 讨论(0)
  • 2020-12-05 10:00

    .In VS 2017: You can just go to the ToolsOptionsProject and Solutions.NET Core and then check Use previews of the .NET Core SDK

    0 讨论(0)
  • 2020-12-05 10:03

    .Net Core 3.0 requires Visual Studio 2019 Preview 1, you can't use Visual Studio 2017. According to the .Net Blog, "Visual Studio 2019 will be the release to support building .NET Core 3 applications" and requires .Net 4.8

    When creating a new application/project, the project declares a dependency on .Net Core 3.0 via the netcorepp3.0 target framework.

    0 讨论(0)
  • 2020-12-05 10:05

    Visual Studio 2019 update

    About the original answer from @GoDev :

    Starting with Visual Studio 2019, the option has moved to:

    Tools > Options > Environment > Preview Features

    Official notes

    0 讨论(0)
提交回复
热议问题