Ask for bytes of not-yet-loaded winmds
When we try to bind something that is from a not-yet-loaded winmd, we generally see ErrorCode.ERR_DottedTypeNameNotFoundInNS because the namespace Windows.X is only provided by Windows.X.winmd. When this occurs, heuristically ask the debugger for an assembly with name Windows.X and content type AssemblyContentType.WindowsRuntime. The VB equivalent of ERR_DottedTypeNameNotFoundInNS is ERR_NameNotMember2. However, VB also has a second error code to consider: ERR_UndefinedType1, which is only produced in type-only contexts. Since the argument to ERR_UndefinedType1 is the qualified name, as a string, we have to do some extra work to determine the next part that needs to be resolved. Caveat: This doesn't work end-to-end (DevDiv #1130191).
Showing
想要评论请 注册 或 登录