Skip to content

[Debug] Could not load file or assembly Microsoft.VisualStudio.Interop #33

@Alienmario

Description

@Alienmario

While debugging my application, the following error appears after ExecFunction is called.

Jetbrains Rider, .net 9.0

Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Interop, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Interop, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.VsDebuggerAttacher.InternalAttachToTargetProcessDebugger(Int32 pid, Int32 targetPid)
   at System.VsDebuggerAttacher.AttachToTargetProcessDebugger(Int32 pid, Int32 targetPid)
   at System.DebuggerAttachHelper.AttachTo(Int32 targetProcessId)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Tmds.Utils.DebuggerAttacher.TryAttach(Int32 targetProcessId)
   at Tmds.Utils.ExecFunction.Program.Main(String[] args)
   at SCLauncher.Program.Main(String[] args) in C:\VCS\SCLauncher\Program.cs:line 28

Edit:
It appears main IDEs already handle child process debugging (Visual Studio via Power tool, Rider in early access). Perhaps this feature could be turned off by default?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions