When opened, Visual Studio Code will show the appropriate vector symbols alongside the line number as usual, but once finished loading the vector symbols that indicate where one should be able to expand or collapse code are gone, and neither clicking the location, outline, nor shortcut keys have any effect. The vectors and ability to collapse folded code disappear at about the same time as a warning message in the lower right hand corner appears saying "Some projects have trouble loading. Please review the output for more details." Before that I am also getting an error message when things still work that says "Unable to start MSBuild language server (see the output window for details)." (The output window says:
Starting OmniSharp server at 2/4/2021, 3:58:32 PM
Target: d:Documents<redacted> CollabNew Macabre ProjectNew Macabre Project.sln
OmniSharp server started.
Path: c:Userscasto.vscodeextensionsms-dotnettools.csharp-1.23.8.omnisharp1.37.5OmniSharp.exe
PID: 40184
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Enterprise 2017 15.9.28307.812 - "C:Program Files (x86)Microsoft Visual Studio2017EnterpriseMSBuild15.0Bin"
2: StandAlone 16.8.0 - "c:Users<redact>.vscodeextensionsms-dotnettools.csharp-1.23.8.omnisharp1.37.5.msbuildCurrentBin"
[warn]: OmniSharp.CompositionHostBuilder
It looks like you have Visual Studio lower than VS 2019 16.3 installed.
Try updating Visual Studio to the most recent release to enable better MSBuild support.
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'c:Users<redact>.vscodeextensionsms-dotnettools.csharp-1.23.8.omnisharp1.37.5.msbuildCurrentBinMSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.8.0 - "c:Users<redact>.vscodeextensionsms-dotnettools.csharp-1.23.8.omnisharp1.37.5.msbuildCurrentBin"
CscToolExe = csc.exe
CscToolPath = c:Users<redact>.vscodeextensionsms-dotnettools.csharp-1.23.8.omnisharp1.37.5.msbuildCurrentBinRoslyn
MSBuildExtensionsPath = c:Users<redact>.vscodeextensionsms-dotnettools.csharp-1.23.8.omnisharp1.37.5.msbuild
MSBuildToolsPath = c:Users<redact>.vscodeextensionsms-dotnettools.csharp-1.23.8.omnisharp1.37.5.msbuildCurrentBin
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'd:Documents<redact> CollabNew Macabre Project'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'd:Documents<redact> CollabNew Macabre ProjectNew Macabre Project.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:Documents<redact> CollabNew Macabre ProjectNew Macabre Project.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'd:Documents<redact> CollabNew Macabre Project'.
[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.MSBuild.ProjectManager
Loading project: d:Documents<redact> CollabNew Macabre ProjectNew Macabre Project.csproj
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, 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
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'd:Documents<redact> CollabNew Macabre Project' on host 27768.
[fail]: OmniSharp.MSBuild.ProjectLoader
The reference assemblies for .NETFramework,Version=v4.7.2 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file 'd:DocumentsAl Petz CollabNew Macabre ProjectNew Macabre Project.csproj'.
d:Documents<redact> CollabNew Macabre ProjectNew Macabre Project.csproj
c:Users<redact>.vscodeextensionsms-dotnettools.csharp-1.23.8.omnisharp1.37.5.msbuildCurrentBinMicrosoft.Common.CurrentVersion.targets(1180,5): Error: The reference assemblies for .NETFramework,Version=v4.7.2 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: d:Documents<redact> CollabNew Macabre ProjectNew Macabre Project.csproj
.) For the past couple of months I have been plighted MS language build errors, and while that might be causing me some trouble this code folding problem is new, and I have nothing to go on.
question from:
https://stackoverflow.com/questions/66055834/how-can-i-fix-code-folding-in-visual-studio-code 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…