Closed darkcompet closed 7 months ago
@darkcompet Sounds like there was an issue loading the project - can you share the contents of the 'C#' output window? Preferrably with the dotnet.server.trace
setting set to Trace
. That should hopefully give us some more info on what is going wrong.
@dibarbet Thanks for your feeback !
After set dotnet.server.trace
to Trace
, it does not show anything at Output tab.
This is new project that I created at this write this post, here is command to build the project.
dotnet new -o webapi test
I am experiencing this on Windows 11. My method at its definition says "0 references" even though it is written in my other scripts and is functioning at runtime. I am using VS Code and the C# extension to work on a Unity Engine project with Unity version 2019.4.17f1.
@dibarbet Thanks for your feeback !
After set
dotnet.server.trace
toTrace
, it does not show anything at Output tab. This is new project that I created at this write this post, here is command to build the project.dotnet new -o webapi test
...
@darkcompet would you mind attaching the extension logs folder (as a .zip) here? You can find it from the following command:
Seems like the extension might be failing to activate for some reason, the additional logs might give more clues.
I have the same issue, I don't have method references, I don't have auto-complete, and when I build the application, it throws an error, but it's not indicated as usual.
I am experiencing this on Windows 11. My method at its definition says "0 references" even though it is written in my other scripts and is functioning at runtime. I am using VS Code and the C# extension to work on a Unity Engine project with Unity version 2019.4.17f1.
@amarraff there is a known issue with older unity projects in the new extension version. If you're able to upgrade the unity editor version and use the C# devkit extension, there is a new unity extension you can use. More details here - https://devblogs.microsoft.com/visualstudio/announcing-the-unity-extension-for-visual-studio-code/#getting-started-with-the-unity-extension
If you can't upgrade Unity and you're on Windows, you could try the prerelease version of the C# extension (2.2.10) which has limited support for the old style projects (Linux / Mac coming soon). See https://github.com/dotnet/vscode-csharp/discussions/6320
If neither of those work, you can switch back to the O# implementation by setting the dotnet.server.useOmnisharp
vscode configuration.
If you're still having issues with any of those, please file a separate issue.
I have the same issue, I don't have method references, I don't have auto-complete, and when I build the application, it throws an error, but it's not indicated as usual.
@joseeltonf please attach the contents of the C# output window (preferably with dotnet.server.trace
set to Trace
). This problem generally means that the project failed to load for some reason. If the project fails to build that is a possible cause for the issue you are hitting.
@dibarbet I did attempt installing the prerelease version before coming here, which didn't work. Enabling omnisharp in the C# extension settings appears to have fixed it, thank you so much!
@dibarbet you're right, the failure occurred while loading the project, as shown in the output:
as it was a program that had already been created in Visual Studio Code and then opened in Visual Studio, I believe there may have been some issues with project references. I used the 'dotnet sln add' CLI command to reestablish the references in the project.
With this, the error was fixed for me:
If your output is returning 'found in workspace MiscellaneousFiles,' rearrange your project.
@dibarbet Thanks for your feeback ! After set
dotnet.server.trace
toTrace
, it does not show anything at Output tab. This is new project that I created at this write this post, here is command to build the project.dotnet new -o webapi test
...
@darkcompet would you mind attaching the extension logs folder (as a .zip) here? You can find it from the following command:
Seems like the extension might be failing to activate for some reason, the additional logs might give more clues.
This is log after vscode get updated to 2.1.2. And nothing is displayed at Output tab.
Hello, I am facing the same issue. I am using VS Code version 1.82.2 (system setup), the C# extension version v2.1.2. Please see attached the C# trace log. vscodeErrorLog.txt
Thank you in advance.
Closing this issue - I believe we've since resolved the loading issues I've found in the attached logs. Please try out the latest version of the extensions - if you're still having problems file a new issue with the latest logs. Thanks!
Environment data
dotnet --info
output: .NET SDK: Version: 7.0.100 Commit: e12b7af219Runtime environment: OS Name: Mac OS X OS Version: 13.4 OS Platform: Darwin RID: osx.13-arm64 Base Path: /usr/local/share/dotnet/sdk/7.0.100/
Host: Version: 7.0.0 Architecture: arm64 Commit: d099f075e4
.NET SDKs installed: 7.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found: x64 [/usr/local/share/dotnet/x64] registered at [/etc/dotnet/install_location_x64]
Environment variables: Not set
OmniSharp log
No icon of OmniSharp server at bottom bar, so nothing is displayed.
Steps to reproduce
this.service.
does not recommend anything.Expected behavior
Please make autocompletion and method reference work back. This is bug from v1.26.