Project file is incomplete. Expected imports are missing

后端 未结 30 1782
深忆病人
深忆病人 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:05

    I had the same problem with an ASP.net Core 2.0 project after I've installed the DotNetCore.2.0.5-WindowsHosting Framework on my development machine. I could solve this problem after I've deinstalled the WindowsHosting Framework and all .net Core packages. After this I've reinstalled the dotnet-sdk-2.1.200-win-x64 package and everything worked fine.

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

    Same issue...took me a while to figure out. Since I was working on an ASP.NET Core project that targeted .NET Core 1.1, I thought I still needed the .NET Core 1.1 SDK installed. Since I had .NET Core SDK 2.1 installed too there was some sort of conflict and I couldn't open the project file. After uninstalling .NET Core 1.1 I was then able to open my project.

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

    Turns out my project was dependent on another project in the solution, which had failed NuGet dependency issues, which in turn was because the Target Framework in the project properties was blank.

    I opened the .csproj file to check the target framework, downloaded the target framework and chose "repair", then restarted Visual Studio and all good again!

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

    I have resolved it by updating visual studio to 2017 version.

    The actual problem was that .net core version was later than Visual Studio.

    Go to Help> Check for update, update Visual Studio.

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

    Eh, rookie mistake, I had Visual Studio SSDT open and was trying to open an existing .Net Core project which produces the same error:

    "Project file is incomplete. Expected imports are missing"

    The solution was to use Visual Studio not SSDT, see in Help > About:

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

    The only thing that worked for me was to upgrade Visual studio:

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