microsoft / ConcordExtensibilitySamples

Visual Studio Debug Engine Extensibility Samples
Other
121 stars 50 forks source link

Recent VsDbg versions missing System.Threading.Tasks.dll assembly #89

Closed sae42 closed 1 year ago

sae42 commented 1 year ago

We're hitting a problem with our VsDbg EE extension where we see a load fail on this assembly. It looks like at some point in the VsDbg releases this assembly from the shared framework was removed from the VsDbg releases. It's quite hard to track VsDbg changes so it's tricky to know for sure when this change occurred.

A workaround is to copy from say /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.14/System.Threading.Tasks.dll to the vsdbg folder. I think the issue is likely that .NET Standard 2.0 doesn't generate a reference to this assembly but earlier versions of .NET Standard 1.x do. Equally targeting .NET 6 seems to require this reference. We can resolve this ourselves by retargeting to .NET Standard 2.0 but is there any possibility of putting this shared framework assembly back into VsDbg releases? And is there somewhere that lists significant changes for VsDbg? I know GetVsDbg.sh can pick versions but it would be useful to have more information on what has changed in them for example.

gregg-miskelly commented 1 year ago

Hi Simon, sorry for the delay.

We can definitely add System.Threading.Tasks to the vsdbg folder for our next release. If you want to share the full list of your dependencies, I think it might make sense to include all of them as roots to our trimmer to make sure we don't remove any others in the future.

As for notification when a new vsdbg release is out, do you have a preferred mechanism? One though I had would be to have a GitHub issue that we could update as part of releases.

sae42 commented 1 year ago

Hi Gregg, I think System.Threading.Tasks.dll is the only missing dependency (certainly I could copy it in and everything worked ok again). Most of our dependencies are a consequence of using StreamJsonRpc and async interfaces. When we first did this work I got you to add a few other shared assemblies (System.Buffers.dll, System.Threading.Tasks.DataFlow.dll, System.Threading.Timer.dll and System.IO.Pipes.dll) so as long as they don't go missing I think we're good.

For release info, a github issue sounds good to me. I've gleaned most of my information from various release note entries and PRs over in the omnisharp vscode repo but there's a lot of other noise there obviously.

gregg-miskelly commented 1 year ago

All of those are currently on our list of assemblies that we will never trim away. Here is our current list:

    <TrimRoots Include="System.Buffers.dll" />
    <TrimRoots Include="System.Diagnostics.Process.dll" />
    <TrimRoots Include="System.IO.Pipes.dll" />
    <TrimRoots Include="System.Reflection.Emit.dll" />
    <TrimRoots Include="System.Threading.Tasks.Dataflow.dll" />
    <TrimRoots Include="System.Threading.Timer.dll" />
    <TrimRoots Include="System.Threading.Tasks.dll" /> // Just added, hasn't shipped yet
    <TrimRoots Include="System.ValueTuple.dll" /> // Just added, hasn't shipped yet
gregg-miskelly commented 1 year ago

I opened https://github.com/microsoft/ConcordExtensibilitySamples/issues/90 to serve as the announcement page for new releases.