microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
220 stars 9 forks source link

[BUG] C# Dev Kit - Create .Net Project fails silently #1289

Closed lorenschwartz closed 1 week ago

lorenschwartz commented 1 month ago

Describe the Issue

I am trying to create a new .Net Project using Ctrl+Shift+P >> ".NET New Project".

I see the following activity int he OUTPUT window: Using dotnet configured on PATH Dotnet path: /opt/homebrew/Cellar/dotnet/8.0.4/libexec/dotnet Activating C# + C# Dev Kit + C# IntelliCode... waiting for named pipe information from server... [stdout] {"pipeName":"/var/folders/q0/0rsxznqx7qx4gh08wj8w37hw0000gn/T/7702b148.sock"} received named pipe information from server attempting to connect client to server... client has connected to server [Info - 5:43:18 PM] [Program] Language server initialized

And that's it... nothing else happens.

Steps To Reproduce

No response

Expected Behavior

Dialogue for selecting a dotnet template type.

Environment Information

smitpatel commented 1 month ago

Do you have a folder open in workspace? Do you have a solution open? If you wait for some time (it can take up some time to create template cache and start all services, if there is nothing in cache and running) after clicking ".NET> New Project" does the template list show up?

lorenschwartz commented 1 month ago

No to both. I've closed all folders and solutions. Tried quitting and restarting VSCode multiple times. Also, it's been at the same spot for over 6 hours now.

I have other MBPs (all Intel machines) with VSCode settings synched and it works fine on those machines. Not sure if that's a clue or a red herring, though.

smitpatel commented 1 month ago

That could be issue in loading something platform specific. When it is hung can you share logs of extension? In the VS code window with hang, use command palette to search for "Open extensions logs folder". From that folder we need content of csdevkit folder to evaluate logs.

lorenschwartz commented 1 month ago

I checked and that folder is suspiciously absent. Not so on my other machines where this is working. I’ve confirmed the C# DevKit is installed and enabled on the latest stable version. How else could I validate the installation or what else should I do next to debug this, please. And thanks for the help.

On Jul 17, 2024, at 12:25 AM, Smit Patel @.***> wrote:

That could be issue in loading something platform specific. When it is hung can you share logs of extension? In the VS code window with hang, use command palette to search for "Open extensions logs folder". From that folder we need content of csdevkit folder to evaluate logs.

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-dotnettools/issues/1289#issuecomment-2232372778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI3KQIUEDWTKJEFPZXA5NTZMXW5JAVCNFSM6AAAAABK7NE6NCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZSGM3TENZXHA. You are receiving this because you authored the thread.

smitpatel commented 1 month ago

Can you share list of folders you see in the extensions logs folder? Lack of that folder indicates that C# dev kit didn't activate. Can you open some workspace which has solution file and projects and try running Add new project command in that and see if that is working? That would help us isolate that if extension itself is failing to activate in all cases or add new project is failing to activate it correctly.

lorenschwartz commented 1 month ago

Sure…

On Jul 17, 2024, at 11:08 AM, Smit Patel @.***> wrote:

Can you share list of folders you see in the extensions logs folder?

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-dotnettools/issues/1289#issuecomment-2233554522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI3KQOXVQYJFGMUF2EFONDZM2CFPAVCNFSM6AAAAABK7NE6NCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZTGU2TINJSGI. You are receiving this because you authored the thread.

smitpatel commented 1 month ago

@lorenschwartz - If you were trying to add screenshot in last post then I think, adding image via mail reply doesn't work with github. You may need to use the web UI.

lorenschwartz commented 1 month ago

image

Thanks for the tip @smitpatel . Please find the screenshot attached here.

smitpatel commented 1 month ago

@lifengl - C# dev kit extension is not activating on mac machine. Any suggestions how to investigate further?

smitpatel commented 1 month ago

@lorenschwartz - Can you verify you are not running into setting which blocks extension activation as mentioned here https://code.visualstudio.com/docs/csharp/cs-dev-kit-faq#_why-isnt-c-dev-kit-activating-c-dev-kit-commands-are-not-found

lorenschwartz commented 1 month ago

@smitpatel I can confirm that I am running v2.39.29, that dotnet.preferCSharpExtension is not set and that I'm not running a read only OS. I've also performed the process to isolate if other extensions are interfering in any way and none are.

Thinking out loud here, but could I copy the contents of this folder from a working computer to this one? Would that work or just make the matters worse? Thanks

github-actions[bot] commented 1 month ago

@smitpatel, the 'needs-more-info' label has been removed upon receiving further response from the original bug filer.

smitpatel commented 1 month ago

No, that folder is supposed to be created when C# dev kit activates itself. It is not required for it to run. Can you share output of all the windows of C# dev kit. There are few of them created. We may be able to figure out why C# dev kit fails to activate correctly.

smitpatel commented 1 week ago

Closing as requested information is not provided and we are unable to investigate further. We can reopen issue if we get more information to investigate.