-
Notifications
You must be signed in to change notification settings - Fork 4k
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
VS 2022 can't find .NET Framework build host after update #73854
Comments
Found same issue after upgrade. File: MSBuildProjectLoader.cs 'buildHost' gets null value: RemoteBuildHost buildHost = (await _buildHostProcessManager.GetBuildHostAsync(projectPath2, cancellationToken..)).Item1; |
@JoeRobich do you have any ideas here while @jasonmalinowski is oof?
|
Hi, any news on this issue ? |
Hi everybody, is there any workaround available to mitigate this issue (e.g. copying required exe and ddls into the "right" directory"?). At the moment I am stuck. |
Hello @CyrusNajmabadi, The nuget Can anyone investigate why the contentFiles is missing or maybe transfert the issue to the VS team ? |
Bonjour je rencontrais le même problème que vous avec vs2022 (17.10.1) /* mon nouveau code _roslynSolution = WSworkspace.CurrentSolution; en esperant que cela puisse vous débloquer aussi Cdt |
@erchauvet Thanks for providing your code snippet. It solves my problem :-) |
So for folks who are trying to use MSBuildWorkspace to analyze the currently open solution -- you should not be using MSBuildWorkspace in that situation -- @erchauvet's code snippet is what you should be doing the VisualStudioWorkspace represents the current open solution, and will be vastly faster to use, since that's the same snapshot we're driving many features with. If you're using it to analyze some other solution, then we'll still get this fixed, but this hopefully gets you in the right direction in a lot of cases. |
Same problem |
1 similar comment
Same problem |
I guess the problem is related to updated version of Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace package. |
This issue is a critical issue blocking my customers. Will the solution be provided before the official .NET 9 release? |
This issue has been moved from a ticket on Developer Community.
[severity:It’s more difficult to complete my work]
I have an exception in VS 2022 after fresh update from 17.7.1 to 17.9.2. The exception is thrown in my VS add-on by execute following code
System.AggregateException: One or more errors occurred. —> System.InvalidOperationException: Unable to locate the .NET Framework build host at c:\program files\microsoft visual studio\2022\enterprise\common7\ide\commonextensions\microsoft\vbcsharp\languageservices\BuildHost-net472\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe - line 206
at Roslyn.Utilities.Contract.Fail(String message, Int32 lineNumber)
at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.GetPathToDotNetFrameworkBuildHost()
at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.CreateDotNetFrameworkBuildHostStartInfo()
at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager. d__8.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager. d__7.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker. d__20.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker. d__21.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker. d__19.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader. d__22.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader. d__22.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace. d__24.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at CallsLogger.ExceptionWrapper.ChangeSources(AsyncPackage package, Func
3 action)—> (Inner Exception #0) System.InvalidOperationException: Unable to locate the .NET Framework build host at c:\program files\microsoft visual studio\2022\enterprise\common7\ide\commonextensions\microsoft\vbcsharp\languageservices\BuildHost-net472\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe - line 206
at Roslyn.Utilities.Contract.Fail(String message, Int32 lineNumber)
at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.GetPathToDotNetFrameworkBuildHost()
at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.CreateDotNetFrameworkBuildHostStartInfo()
at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager. d__8.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager. d__7.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker. d__20.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker. d__21.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker. d__19.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader. d__22.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader. d__22.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace. d__24.MoveNext()<—
Original Comments
Feedback Bot on 3/4/2024, 09:19 PM:
(private comment, text removed)
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: