Hello Developron,
Thank you for taking time to post this issue in Microsoft Q&A forum.
But the project has not been added to the solution.
Did you select this option Place solution and project in the same directory
when created a new project(solution)?
If I try to manually add the project to the solution with the Add existing project option, it gives an error.
From your description, it seems this issue is caused by deleting some old installed versions of .NET Core SDK. Please type dotnet –list-sdks
in Command Prompt to display and check the installed SDKs. You may need to install some old versions of .NET Core SDKs, for example, version 2.2.402.
Besides, please check the system variables
of Environment Variables
, and make sure that the value C:\Program Files\dotnet
is added for variable DOTNET
(right-click This PC > Properties > Advanced system settings > Environment Variables… > System variables).
By the way, did you install .NET Core SDK
from VS Installer > VS 2019 Community > Modify > Individual Components > .NET Core SDK?
Sincerely,
Tianyu
- If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.