Project file is incomplete. Expected imports are missing

后端 未结 30 1786
深忆病人
深忆病人 2020-12-07 19:30

After format my computer I reinstalled Vs 2017 V 15.6.3 and install ASP.Net Core SDK from Microsoft 2.1.4

But when I create new asp core application VS failed with e

相关标签:
30条回答
  • 2020-12-07 20:25

    Delete all build generated bin and obj folders. This worked for me after renaming project and trying to reload solution. Not really sure about the real cause of incompatible loading.

    0 讨论(0)
  • 2020-12-07 20:27

    I have solved this problem a couple of times lately by closing Visual Studio and running the following commands

    1. dotnet nuget locals -c all
    2. dotnet clean
    3. dotnet build

    There seems to be times, especially at the beginning of projects, when nuget gets out of whack (technical term).

    0 讨论(0)
  • 2020-12-07 20:27

    After installing VS2019 I started to have the same error when opening existing .Net Core solutions in VS2017.
    In Visual Studio Installer I've updated VS2017 to the latest version (15.9.11) and the problem disappeared.

    Later after upgrading VS2019 to the latest release I started to have the same errors and had to upgrade VS2017 again.

    0 讨论(0)
  • 2020-12-07 20:30

    I just had the same issue while installing the new preview version of VS 2019. I fixed it by uninstalling the latest update which in turn uninstalled the most recent downloaded version of core. Which I belive caused the missmatch.

    0 讨论(0)
  • 2020-12-07 20:31

    Repairing last Core installation worked for me

    0 讨论(0)
  • 2020-12-07 20:31

    Run dotnet restore on command line for the solution.

    Tip. If you've uninstalled the latest .net core version let's say 2.1.403 and installed the previous one, ensure the 2.1.403 folder has been actually removed at the path

    C:\Program Files\dotnet\sdk\

    I had the issue due to there left an empty folder with 2.1.403

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