Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for TypeIdentifierAttribute #50

Closed
yck1509 opened this issue Oct 24, 2015 · 2 comments
Closed

Support for TypeIdentifierAttribute #50

yck1509 opened this issue Oct 24, 2015 · 2 comments

Comments

@yck1509
Copy link
Contributor

yck1509 commented Oct 24, 2015

In .NET 4, TypeIdentifierAttribute is used to indicate two COM interface should be treated as equivalent by runtime even if they're in different assemblies.

e.g.

        static void Main(string[] args) {
            var path = @"C:\Program Files\Reference Assemblies\Microsoft\VSTO40\v4.0.Framework\";
            var t1 = Assembly.LoadFile(path + "Microsoft.Office.Tools.Common.dll").GetType("Microsoft.Office.Tools.AddIn");
            var t2 = Assembly.LoadFile(path + "Microsoft.Office.Tools.Common.v4.0.Utilities.dll").GetType("Microsoft.Office.Tools.AddIn");
            Console.WriteLine(t1.IsEquivalentTo(t2));
            Console.WriteLine(t1.IsAssignableFrom(t2));
        }

When resolving member references, these type equivalence should be taken into account. I have some sample people sent to me that shows the problem with resolving. If you need it please tell me about it.

@0xd4d
Copy link
Collaborator

0xd4d commented Oct 25, 2015

Please test latest commit. It passes my few tests, but I haven't tested a real world assembly yet.

@yck1509
Copy link
Contributor Author

yck1509 commented Oct 26, 2015

It works for my case. I suppose it is fixed.

@yck1509 yck1509 closed this as completed Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant