How can I qualify a .NET type with assembly name for Visual Studio debugger to disambiguate while using an ambiguous type?

前端 未结 3 1942
天命终不由人
天命终不由人 2021-02-20 10:30

I am using the VS debuggers \'Immediate Window\' to call a static API on a class which is an ambiguous type defined in 2 different assemblies.

The call fails with the fo

3条回答
  •  南旧
    南旧 (楼主)
    2021-02-20 11:02

    It sounds like you have two types which have the same name and namespace but live in different assemblies? If that is the case, unfortunately there is no way to disambiguate this call in the immediate window. The immediate window considers both of these types to be in scope and since assembly name cannot be a part of the cast syntax in C# or VB.Net there is no way to disambiguate these types.

    The only option you have is to create an alternate debug only API which binds to one or the other. Then call this during the debugging session.

提交回复
热议问题