You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version Used: VS 17.9.6 Compiler version 4.9.0-3.24121.1 (a98c90d) .NET 8 C#12
Steps to Reproduce:
Create a new project with the template VisualStudio.Extensibility Extension without VSSDK Compatibility
In the Command1.cs file inside the ExecuteCommandAsync method try to open a project/solution, here's a sample
public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
{
try
{
// I've tried several versions, the behaviour does not change
MSBuildLocator.RegisterDefaults();
using var workspace = MSBuildWorkspace.Create();
// Does not open the project neither returns some error
var project = await workspace.OpenProjectAsync("{path to some project}");
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
Expected Behavior:
open the project or throw some error.
I don't know if what I am trying to do is possible or if it is the right way to do it but I would have expected at least an error of some kind.
Actual Behavior:
the process does not go on, it seems to go on an endless wait
The text was updated successfully, but these errors were encountered:
@JoeRobich I think this is the new extensibility model, so it would be something else (although possibility a similar root cause)
@gamadori-osm: if you attach an event handler for MSBuildWorkspace.WorkspaceFailed, is that event fired? Any failure absolutely should result in your task not waiting forever, but maybe we have multiple bugs.
@gamadori-osm Hmm, strange. And if you don't do the MSBuildLocator at all, does that change anything? if you're still seeing the hang, what might be helpful then would be to grab a memory dump of the process once it's hung and if you can share it. We can debug from there.
@gamadori-osm Were you able to get a dump of a repro of this? And also if you haven't tried it, try upgrading to newer versions of the Workspaces.MSBuild package, in case you're seeing a bug we already fixed here.
Version Used: VS 17.9.6 Compiler version 4.9.0-3.24121.1 (a98c90d) .NET 8 C#12
Steps to Reproduce:
Expected Behavior:
open the project or throw some error.
I don't know if what I am trying to do is possible or if it is the right way to do it but I would have expected at least an error of some kind.
Actual Behavior:
the process does not go on, it seems to go on an endless wait
The text was updated successfully, but these errors were encountered: