This article is a mirror article of machine translation, please click here to jump to the original article.

View: 49492|Reply: 2

[.NET Core] Installing VS2019 causes VS2017 project files to be incomplete and missing expected import issues

[Copy link]
Posted on 4/20/2019 9:54:37 PM | | | |
After installing the vs2019 development tools a few days ago, open the .NET Core project, and then open it with the vs2017 development tools, and it will appear"The project file is incomplete. Lack of expected import. ”The error is as shown in the figure below:



See the list of all versions of the .NET Core SDK installed on your computer, as shown below:



Solution 1:

Recently, I uninstalled some configurations of .NET Core version 1.1 (originally using Visual Studio 2015), which caused the project to be opened with Visual Studio 2017 using .NET 2.2 version with the prompt: "Error: The project file is incomplete." Lack of expected import. The project cannot be loaded, first uninstall the sdk and dotnet-hosting and then reinstall, Visual Studio 2017 has also been re-repaired, and I also checked it on the Internet, delete the obj file or something, but it doesn't work. Finally, in the folder "Program Files (x86)", delete the "dotnet" folder (my computer system is 64-bit), and then reopen the project, everything is fine.

My computer is a win10 64-bit system, and there is no dotnet folder under the Program Files (x86) folder, so,failed to solve it

Solution 2:

The hyperlink login is visible.

I saw a foreign friend asking a similar question, the solution is to install the x86-bit .NET core version of the SDK, try to install the SDK 2.1.603 x86 version of the SDK, orfailed to solve itThe question. (The hyperlink login is visible.

Solution 3:

The project file is incomplete. Imports are expected to be insufficient.
This error message appears when opening a project/solution from VS2017 after opening VS2017 on VS2019.
The project is. Net Core WepApp and WebAPI.

The hyperlink login is visible.

Another foreign friend and meEncounteredissueSimply yesExactly the same, according to his answer, it willvs2017 to the latest versionThat's itWork something out! Since my vs2019 opens the project normally, I'll leave it hereNot tested, should be a bug from Microsoft


Since vs2017 upgrade requires 4 Gs, I won't upgrade.



(End)








Previous:Mobile phone mining machine "Chaink" lucky player tutorial
Next:The Art of Computer Programming 4 volumes
 Landlord| Posted on 5/5/2019 11:02:20 AM |
The error is that the dotnet SDK version is too high, and you can solve it by upgrading VS2017 or uninstalling the higher version of the dotnet SDK.
Posted on 3/12/2020 6:22:31 PM |
I just encountered this problem, thanks for sharing!
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com