Visual Studio 2017 install breaks Visual Studio 2015 ASP.NET Core Projects

前端 未结 5 1673
情歌与酒
情歌与酒 2020-12-12 18:47

After installing Visual Studio 2017 Professional I can\'t build my ASP.NET Core in Visual Studio 2015 Professional anymore. I never opened this project in VS2017

I ge

相关标签:
5条回答
  • 2020-12-12 19:13

    @ClaudioNunes and @MegaTron have the correct answer. After reading that answer, I realized my .NET Core solution did not have a global.json file. I added a new solution folder and added a global.json file. Since none of my projects are nested in sub folders, I only had to remove "src" and "test" from the projects array:

    {
      "projects": [],
      "sdk": {
        "version": "1.0.0-preview2-003131"
      }
    }
    

    The project now opens correctly in VS 2015 with VS 2017 RC installed.

    0 讨论(0)
  • 2020-12-12 19:16

    The project upgrade has been improved from Visual Studio 2017 RC to Visual Studio 2017 RTM and is working now.

    I ended up opening my Visual Studio 2015 ASP.NET Core Solution in Visual Studio 2017 which upgraded each project in the solution. I then updated the nuget packages and the solution worked without any side effects.

    0 讨论(0)
  • 2020-12-12 19:19

    Go to Programs and Resources, use "Core" to filter and find Preview 3 installation ("Microsoft .NET Core 1.0.1 - SDK Preview 3 (x64).") and remove it.

    NOTE: Run dotnet --version before and after remove this SDK. On my case results in 1.0.0-preview3-004056(before) and 1.0.0-preview2-1-003177(after).

    I can't see side effects on vs2017 yet.

    0 讨论(0)
  • 2020-12-12 19:24

    Take a look at this link: https://github.com/aspnet/Tooling/blob/master/known-issues-vs2017.md#known-issues-for-aspnet-core-support-in-visual-studio-2017

    If you update the tooling for Visual Studio 2015 to the latest version, it should fix the issue. Note this is not the Visual Studio 2015 update, but the ASP.NET Core and tooling.

    0 讨论(0)
  • 2020-12-12 19:28

    A possible workaround is to add a global.json to solution and specify the sdk version to be used as in

    {
      "projects": [ "src", "test" ],
      "sdk": {
        "version": "1.0.0-preview2-003131"
      }
    }
    
    0 讨论(0)
提交回复
热议问题