No errors appear in Vscode (eg errors referencing wrong typed)

Asked

Viewed 1,254 times

1

I’ve looked at everything I had and I haven’t got it yet...

I am studying ASP.NET Core, with C#, and no errors appear in Visual Studio Code.

Example: if I reference a class with the wrong name, it does not give any warning. Where can I get this? (The structure errors appear)

Como nessa imagem, em tempo de desenvolvimento o VSCode não acusa nenhum erro

The mistake:

Some Projects have Trouble loading. Please review the output for more Details.

Source: C# (Extension)

   [info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Users\Vanessa\Desktop\Engenharia de Computação\Estágio\SSTecnologia\2-DotNETCore\ProAgil.Domain\ProAgil.Domain.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file 'c:\Users\Vanessa\Desktop\Engenharia de Computação\Estágio\SSTecnologia\2-DotNETCore\ProAgil.Domain\ProAgil.Domain.csproj'.
c:\Users\Vanessa\Desktop\Engenharia de Computação\Estágio\SSTecnologia\2-DotNETCore\ProAgil.Domain\ProAgil.Domain.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: o SDK 'Microsoft.NET.Sdk' especificado não pôde ser encontrado.  c:\Users\Vanessa\Desktop\Engenharia de Computação\Estágio\SSTecnologia\2-DotNETCore\ProAgil.Domain\ProAgil.Domain.csproj
   em Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   em Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List`1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError)
   em Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult)
   em Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
   em Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
   em Microsoft.Build.Evaluation.Evaluator`4.Evaluate(ILoggingService loggingService, BuildEventContext buildEventContext)
   em Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   em Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   em Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   em Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   em Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String toolsVersion)
   em OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath) na D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs:linha 129
   em OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath) na D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs:linha 72
   em OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectIdInfo projectIdInfo, ProjectLoader loader) na D:\a\1\s\src\OmniSharp.MSBuild\ProjectFile\ProjectFileInfo.cs:linha 98
   em OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func`1 loader) na D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs:linha 308

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: c:\Users\Vanessa\Desktop\Engenharia de Computação\Estágio\SSTecnologia\2-DotNETCore\ProAgil.API\ProAgil.API.csproj
  • 1

    By default, Vscode does not detect errors anyway. Who detects errors is the Visual Studio IDE. But you can have error detection in Code, has an extension that does this, but I’m not sure what her name is.

  • I haven’t got a clue?

  • installed the extension?

  • I could not find any extension on this... I already have some installed, but as I am learning to use Vscode now I do not know very well which would be

  • @Vanessa Alves, check if you have the extension C# for Visual Studio Code (Omnisharp) installed in Vscode: https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp

  • I have urged the extension yes. I have looked everywhere to solve this and I can’t

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.