-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Solution explorer says "A compatible .Net SDK was not found" #194
Comments
Hey y-chen, it is likely to be a platform specific issue. Different from other part of the extension, the BuildHost part was built on NET 6 runtime to work potentially with old SDKs, and then built to platform specific ready to run binaries. Just to conform this is on new apple silicone -- basically a M1 or M2 machine, right? |
Based on the information you mentioned earlier. It looks like that you installed both x64 and arm64 SDKs to your machine. I think you should only install the one matching your machine's hardware, either it is apple silicone machine, or intel based one. Both SDKs might be in the PATH. Since you installed Arm64 version of the extension, it would not work with x64 version of the SDK. You may need remove the incompatible version of the SDK from your machine to get it to work. |
I have recent purchased a MacBook Pro M2 Pro. Installed vscode & C# extensions (version 2.7.0) and got the exact same problem. I just installed the default dotnet 7 SDK available for a Mac. When i open a solution i got the exact same problem described here, i don't see how the described workaround can fix this |
I now figure out the issue. I did uninstall the x64 SDK and install the arm64 SDK and now the extension works |
@rodrigovaras : thanks a lot to conform the problem. Based on that, and how easy developer may install the SDK targeting wrong CPU, we will add logic to detect this condition, and provide more meaningful message for this situation. BTW, @y-chen : if you run dotnet --info (which we ran when it fails to resolve SDK and prints out the output in the projects output window, you can verify whether SDK is x64 based in the RID field. I haven't heard more information from @y-chen, and I will assume we have found the source of this problem. Once our new logic to provide better message is in, I will close this ticket. |
Hi @lifengl , sorry for the late reply. So I remove all the
Now when I try to use the solution explorer I don't get the error as before but I still can't open a project. It keeps loading: This is the extension output:
|
@y-chen : thanks to provide further information on this. I assume you saw the spinner when you expand a project. we need check the extension log to see whether it can help us to narrow down the reason behind it: 1, open vscode extension log, and under ms-dotnettools.csdevkit/ServiceHub folder, most information would be inside -Microsoft.VisualStudio.ProjectSystem.CompositionService--*****-1.log file, and you may see -Microsoft.VisualStudio.ProjectSystem.ProjectTreeProvider-.log as well, and maybe we can find some errors reported there? |
BTW, you may find a 'Projects' tab in the output window, which may print out some warning/errors from projects, which is separated from the extension output pane. |
I closed this issue as the reason of the original problem was found. We now detect this condition and provide additional message to the user when we ran into this platform mismatching issue. We don't have enough information to understand the new issue @y-chen ran into later, and we haven't heard more on this thread. @y-chen : if you tried later previews and still run into problems to expand projects, you can open a new issue to track the problem, and attach some logs would be necessary for us to understand issues unique to your environment, and we don't hear or get information from other people. |
Describe the Issue
Hi all,
I have a .Net 6 project that I want to open with vscode. So I installed the recommended C# Dev Kit extension but when I try to open a project in the Solution Explorer section I see "A compatible .Net SDK was not found" error instead of the content of the project and in the output tab I get the following logs:
IntelliCode doesn't work either.
As suggested in another issue, I tried to install .Net on my laptop by downloading and installing it from this page (both x64 and arm64) but when I run
dotnet --list-sdks
, version 7 doesn't show up.Steps To Reproduce
Expected Behavior
Solution Explorer shows project files and IntelliCode to work.
Environment Information
The text was updated successfully, but these errors were encountered: