Plugin not working with different version of .Net framework

I've built a plugin against version 4.0 of the framework - this is so that I can get support for the System.Reactive namespace in mscorlib assembly. The plugin does not reference any other libraries, it does not reference the Reactive Extensions assemblies - the plugin compiles down to a single assembly.

I can use the plugin against .Net 4.0 projects and I see the highlighting as expected, but when used against 4.5 or Windows Phone 8 projects I do not see the expected highlighting.

Is there an obvious reason why this would be the case?



ta

Ollie

2 comments
Comment actions Permalink

I worked out the issue is down to the way .net 4.5 'groups' the .net framework. System.Reactive namespace in mscorlib dll and this 'grouped' together under into the assembly 'System.Runtime' and whn I'm checking the assembly name I receiving a miss match between what I expect and what I'm seeing.

Whats the best way to deal with the scenario - the same type appearing to come from different assemblies when using different version of the .net framework?

If I want to validate the assembly where a type is defined, can I dynamically attempt to load the assembly at runtime or does the PSI framework offer something else?


ta

Ollie

0
Comment actions Permalink

Hi Ollie. I don't have an answer for this one, and won't be able to look into it for the next couple of days, but I'd start by looking into type forwarding. I suspect the .net framework is forwarding System.Reactive from mscorlib to System.Runtime. If that's the case, I think you'd need to examine either the type or the assembly for type forwarding attributes, to get the assembly name they've been forwarded from/to. You can see ReSharper do something similar in ForwardedTypeFilter.

Hope this helps
Matt

0

Please sign in to leave a comment.