Hello @Raihanudin Rafif ,
Welcome to Microsoft Q&A forum.
Please first confirm that .NET SDK
has been checked in VS Installer > Modify > Individual components > .NET > .NET SDK. If it isn’t checked, please check it and click Modify.
Please then create a new .NET based project and check if the same error appears, if the same error appears, please try following to narrow down this issue:
- Reboot your machine and restart VS.
- Repair Visual Studio from VS Installer > More > Repair.
- Reset VS settings(run Developer Command Prompt for Visual Studio 2022 > run
devenv /ResetSettings
).
If the same error doesn’t appear, then please try following:
- Right-click your project > Unload Project > confirm that the
<Project Sdk="Microsoft.NET.Sdk">
line exists > right-click your project again > Reload Project. Open VS Installer > Modify > Individual components > .NET > make sure that.NET SDK
has been checked, if not, check it and click Modify. - Remove the hidden .vs, bin and obj folders in your solution/project folder and rebuild your project in VS.
Please feel free to let us know if this issue disappears.
Best Regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.
@Tianyu Sun-MSFT I have the same problem, though the steps you outlined do not resolve it. I continue to have the issue even with a new project. What else can be done to diagnose/resolve? Thank you
Hi @Ashley Griggs ,
Please search
Edit the system environment variables
in Windows Search box and click Environment Variables… button, under the System variables, select Path and click Edit…Confirm if both
C:\Program Files\dotnet\
andC:\Program Files (x86)\dotnet\
paths exist. If both of them exist, please leaveC:\Program Files\dotnet\
beforeC:\Program Files (x86)\dotnet\
. You can selectC:\Program Files\dotnet\
and click Move Up button to move it up.If you are using any extension/antivirus, please try to disable them temporarily and reboot your machine then test again.
If above suggestions still don’t work, please try to reinstall VS and check again.
ive tried all but it doesnt fix the same problem I still don't see my project when I created one, I have tried uninstalling and resetting the vsc but it still not showing my project when I created one.
Sign in to comment