Skip to content

Exception of type 'System.TypeInitializationException' in 'Microsoft.Build.Shared.XMakeElements' when loading a solution file. #8

Description

@ElektroStudios

Solution file content:

<Solution>
  <Configurations>
    <Platform Name="Any CPU" />
    <Platform Name="x64" />
    <Platform Name="x86" />
  </Configurations>
  <Project Path="SetDesktopWallpaper/SetDesktopWallpaper.vbproj" Id="19fc5409-cfdc-4e79-b3ad-34be4c8eefdd">
    <Platform Solution="*|x64" Project="x64" />
    <Platform Solution="*|x86" Project="x86" />
  </Project>
</Solution>

Full error log:

2026-06-06 16:25:20.676 [info] VB.NET Language Support activating...
2026-06-06 16:25:20.676 [info] Platform: win32 (x86_64)
2026-06-06 16:25:20.676 [info] Starting vbnet language server at: c:\Users\Administrador\.vscode\extensions\dnakode.vbnet-language-support-0.1.9-win32-x64\.server\VbNet.LanguageServer.exe
2026-06-06 16:25:20.676 [info] Locating .NET runtime version 10.0...
2026-06-06 16:25:20.741 [info] Using .NET runtime at: C:\Program Files\dotnet\dotnet.exe
2026-06-06 16:25:20.744 [info] Using transport: namedPipe
2026-06-06 16:25:20.744 [info] Spawning: c:\Users\Administrador\.vscode\extensions\dnakode.vbnet-language-support-0.1.9-win32-x64\.server\VbNet.LanguageServer.exe --logLevel Information --pipe
2026-06-06 16:25:20.976 [info] [Server] info: VbNet.LanguageServer[0]
      Registered MSBuild from: C:\Program Files\dotnet\sdk\10.0.201 (version 10.0.201)
2026-06-06 16:25:20.991 [info] [Server] info: VbNet.LanguageServer[0]
      VB.NET Language Server v0.1.8 starting with NamedPipe transport
2026-06-06 16:25:20.992 [info] [Server] info: VbNet.LanguageServer.Core.LanguageServer[0]
      VB.NET Language Server starting...
2026-06-06 16:25:21.091 [info] Server started with named pipe: \\.\pipe\vbnet-lsp-3a9cc948
2026-06-06 16:25:21.092 [info] [Server] info: VbNet.LanguageServer.Protocol.NamedPipeTransport[0]
      Pipe ready, name output to stdout: {"pipeName":"\\\\.\\pipe\\vbnet-lsp-3a9cc948"}
2026-06-06 16:25:21.384 [info] Language client state: Stopped -> Starting
2026-06-06 16:25:21.387 [info] Connected to named pipe: \\.\pipe\vbnet-lsp-3a9cc948
2026-06-06 16:25:21.392 [info] [Server] info: VbNet.LanguageServer.Protocol.NamedPipeTransport[0]
      Client connected to named pipe
info: VbNet.LanguageServer.Core.LanguageServer[0]
      Transport ready, waiting for initialize request
info: VbNet.LanguageServer.Protocol.MessageDispatcher[0]
      Message dispatcher started
2026-06-06 16:25:21.447 [info] [Server] info: VbNet.LanguageServer.Core.LanguageServer[0]
      Initialize request received from client: Visual Studio Code 1.123.0
info: VbNet.LanguageServer.Core.LanguageServer[0]
      Workspace root: file:///c:/Users/Administrador/Documents/Visual Studio Projects/_para conservar/_C�digos para conservar/SetDesktopWallpaper
2026-06-06 16:25:21.499 [info] Language client state: Starting -> Running
2026-06-06 16:25:21.511 [info] Language client trace level set to off
2026-06-06 16:25:21.511 [info] VB.NET Language Client started successfully
2026-06-06 16:25:21.512 [info] VB.NET Language Support activated in 865ms
2026-06-06 16:25:21.514 [info] [Server] info: VbNet.LanguageServer.Core.LanguageServer[0]
      Server initialized and running
2026-06-06 16:25:22.192 [info] [Server] info: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      MSBuildWorkspace created successfully
2026-06-06 16:25:23.903 [info] [Server] info: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      Loading solution: c:\Users\Administrador\Documents\Visual Studio Projects\_para conservar\_C�digos para conservar\SetDesktopWallpaper\SetDesktopWallpaper.slnx
2026-06-06 16:25:24.309 [info] [Server] fail: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      Workspace diagnostic: [BuildHost PID 8472] Exception while shutting down the BuildHost process.
2026-06-06 16:25:24.310 [info] [Server] fail: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      Workspace diagnostic: [BuildHost PID 8472] The BuildHost process is not responding. Process output:
      BuildHost Runtime Version: .NET Framework 4.8.4772.0
      Registered MSBuild instance at C:\Program Files\Microsoft Visual Studio\2026\Professional\MSBuild\Current\Bin
2026-06-06 16:25:24.322 [info] [Server] fail: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      Failed to load solution: c:\Users\Administrador\Documents\Visual Studio Projects\_para conservar\_C�digos para conservar\SetDesktopWallpaper\SetDesktopWallpaper.slnx
      Microsoft.CodeAnalysis.MSBuild.RemoteInvocationException: An exception of type System.TypeInitializationException was thrown: Se produjo una excepci�n en el inicializador de tipo de 'Microsoft.Build.Shared.XMakeElements'.
         at Microsoft.CodeAnalysis.MSBuild.RpcClient.InvokeCoreAsync(Int32 targetObject, String methodName, List`1 parameters, Type expectedReturnType, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.RpcClient.InvokeAsync[T](Int32 targetObject, String methodName, List`1 parameters, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.RemoteBuildHost.LoadProjectFileAsync(String projectFilePath, String languageName, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.DoOperationAndReportProgressAsync[TResult](ProjectLoadOperation operation, String projectPath, String targetFramework, Func`1 doFunc)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadProjectFileInfosAsync(String projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadProjectInfosFromPathAsync(String projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadAsync(CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadSolutionInfoAsync(String solutionFilePath, IProgress`1 progress, ILogger msbuildLogger, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadSolutionInfoAsync(String solutionFilePath, IProgress`1 progress, ILogger msbuildLogger, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenSolutionAsync(String solutionFilePath, ILogger msbuildLogger, IProgress`1 progress, CancellationToken cancellationToken)
         at VbNet.LanguageServer.Workspace.WorkspaceManager.LoadSolutionAsync(String solutionPath, CancellationToken cancellationToken, SolutionChangeKind changeKind) in D:\a\vbnet-lsp\vbnet-lsp\src\VbNet.LanguageServer.Vb\Workspace\WorkspaceManager.vb:line 130
2026-06-06 16:25:24.330 [info] [Server] info: VbNet.LanguageServer.Core.LanguageServer[0]
      Project loading enabled after configuration change; loading workspace
2026-06-06 16:25:25.758 [info] [Server] info: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      Loading solution: c:\Users\Administrador\Documents\Visual Studio Projects\_para conservar\_C�digos para conservar\SetDesktopWallpaper\SetDesktopWallpaper.slnx
2026-06-06 16:25:26.010 [info] [Server] fail: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      Workspace diagnostic: [BuildHost PID 5640] Exception while shutting down the BuildHost process.
fail: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      Workspace diagnostic: [BuildHost PID 5640] The BuildHost process is not responding. Process output:
      BuildHost Runtime Version: .NET Framework 4.8.4772.0
      Registered MSBuild instance at C:\Program Files\Microsoft Visual Studio\2026\Professional\MSBuild\Current\Bin
2026-06-06 16:25:26.011 [info] [Server] fail: VbNet.LanguageServer.Workspace.WorkspaceManager[0]
      Failed to load solution: c:\Users\Administrador\Documents\Visual Studio Projects\_para conservar\_C�digos para conservar\SetDesktopWallpaper\SetDesktopWallpaper.slnx
      Microsoft.CodeAnalysis.MSBuild.RemoteInvocationException: An exception of type System.TypeInitializationException was thrown: Se produjo una excepci�n en el inicializador de tipo de 'Microsoft.Build.Shared.XMakeElements'.
         at Microsoft.CodeAnalysis.MSBuild.RpcClient.InvokeCoreAsync(Int32 targetObject, String methodName, List`1 parameters, Type expectedReturnType, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.RpcClient.InvokeAsync[T](Int32 targetObject, String methodName, List`1 parameters, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.RemoteBuildHost.LoadProjectFileAsync(String projectFilePath, String languageName, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.DoOperationAndReportProgressAsync[TResult](ProjectLoadOperation operation, String projectPath, String targetFramework, Func`1 doFunc)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadProjectFileInfosAsync(String projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadProjectInfosFromPathAsync(String projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadAsync(CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadSolutionInfoAsync(String solutionFilePath, IProgress`1 progress, ILogger msbuildLogger, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadSolutionInfoAsync(String solutionFilePath, IProgress`1 progress, ILogger msbuildLogger, CancellationToken cancellationToken)
         at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenSolutionAsync(String solutionFilePath, ILogger msbuildLogger, IProgress`1 progress, CancellationToken cancellationToken)
         at VbNet.LanguageServer.Workspace.WorkspaceManager.LoadSolutionAsync(String solutionPath, CancellationToken cancellationToken, SolutionChangeKind changeKind) in D:\a\vbnet-lsp\vbnet-lsp\src\VbNet.LanguageServer.Vb\Workspace\WorkspaceManager.vb:line 130

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions