Skip to content
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

C# doens't propose me using namespace or framework installed related to add them automatically to the class #3738

Closed
TheBanker1710 opened this issue Apr 22, 2020 · 13 comments

Comments

@TheBanker1710
Copy link

Please paste the output from your clipboard

@JoeRobich
Copy link
Member

@TheBanker1710 Sorry you are having trouble with the C# extension. Can you please report your issue using the built in report issue command?

  1. Open Visual Studio Code
  2. Bring up the command palette (press F1)
  3. Type CSharp: Report an issue

This gives us additional information to help diagnose the issue you are experiencing. Closing this issue and will be looking for one with more detail. Thanks!

@TheBanker1710
Copy link
Author

In fact, I'm following a tuto on Udemy about .NET CORE and Angular, and the C# extension or Visual Code doesn't show me the quick fix when there is an error. It doesn't underline the error, it seems it doesn't recognize the new classes added and the new framework added too.

Capture

@TheBanker1710
Copy link
Author

Starting OmniSharp server at 22/04/2020 à 19:06:55
Target: c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact\AspNetReact.sln

OmniSharp server started.
Path: C:\Users\mathi.vscode\extensions\ms-dotnettools.csharp-1.21.17.omnisharp\1.35.0\OmniSharp.exe
PID: 5844

Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.4 - "C:\Users\mathi.vscode\extensions\ms-dotnettools.csharp-1.21.17.omnisharp\1.35.0.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'C:\Users\mathi.vscode\extensions\ms-dotnettools.csharp-1.21.17.omnisharp\1.35.0.msbuild\Current\Bin\MSBuild.exe'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.4 - "C:\Users\mathi.vscode\extensions\ms-dotnettools.csharp-1.21.17.omnisharp\1.35.0.msbuild\Current\Bin"
CscToolExe = csc.exe
CscToolPath = C:\Users\mathi.vscode\extensions\ms-dotnettools.csharp-1.21.17.omnisharp\1.35.0.msbuild\Current\Bin\Roslyn
MSBuildExtensionsPath = C:\Users\mathi.vscode\extensions\ms-dotnettools.csharp-1.21.17.omnisharp\1.35.0.msbuild
MSBuildToolsPath = C:\Users\mathi.vscode\extensions\ms-dotnettools.csharp-1.21.17.omnisharp\1.35.0.msbuild\Current\Bin
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact\AspNetReact.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact\AspNetReact\AspNetReact.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact'.
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact\AspNetReact\AspNetReact.csproj
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact' on host 16068.
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact\AspNetReact\AspNetReact.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\mathi\Documents\Visual Studio 2015\Projects\AspNetReact\AspNetReact\AspNetReact.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: AspNetReact

@TheBanker1710
Copy link
Author

Issue Description

Steps to Reproduce

Expected Behavior

Actual Behavior

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.44.2
C# Extension: 1.21.17

Dotnet Information SDK .NET Core (refl�tant tous les global.json)�: Version: 3.1.102 Commit: 573d158fea

Environnement d'ex�cution�:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.102\

Host (useful for support):
Version: 3.1.2
Commit: 916b5cba26

.NET Core SDKs installed:
3.0.100 [C:\Program Files\dotnet\sdk]
3.1.102 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
Angular2 johnpapa 9.1.2
csharp ms-dotnettools 1.21.17
material-icon-theme PKief 4.0.1
ng-template Angular 0.901.2
path-intellisense christian-kohler 1.4.2
prettier-vscode esbenp 4.5.0
vscode-angular2-files alexiv 1.6.2
vscode-nuget-package-manager jmrog 1.1.6
vscode-typescript-tslint-plugin ms-vscode 1.2.3

@TheBanker1710
Copy link
Author

It doesn't recognize new classes or new package added :/ I don't know what to do :/

@JoeRobich
Copy link
Member

Hi @TheBanker1710, From you screenshot it looks like the using directive that imports DatingApp.Api should end in a ; instead of a .. A simple typo that changes how the c# file is parsed. Let me know if you still have issues.

@TheBanker1710
Copy link
Author

Yes I know, it was just to show toi that the file didn't react and underline the errors like DataContext... :/

@JoeRobich
Copy link
Member

@TheBanker1710 Ah, sorry, I didn't catch that. Can you share your project with us so that we can try and repro your error?

@TheBanker1710
Copy link
Author

Yep, here is the project in ZIP ;-) Thanks for your help :-)
DatingApp.API.zip

@JoeRobich
Copy link
Member

Sorry I should have reopened this issue yesterday.

I pulled your source and opened it. Unfortunately I wasn't able to reproduce your issue. I can see from your OmniSharp log in your screenshot that it doesn't completely load your project, which is why it isn't giving you intellisense or errors. In VS Code settings can you search for OmniSharp: Logging Level, set it to debug, and restart VS Code? That should produce a more details OmniSharp log for us to review.

image

@TheBanker1710
Copy link
Author

Done, what do I have to do now to send the logs to you?

@JoeRobich
Copy link
Member

@TheBanker1710 Can you attach them as a file to this issue? or create gist and link to them?

@cartermp
Copy link

Closing out as no info/no repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants