Wednesday 5 June 2013

Accessing dynamic types from difference assemblies

When you set up a dynamic type in one assembly, you usually can't access it in another one by default. 
However, there is a way. You just have to declare explicitly on your AssemblyInfo to which assemblies you want to expose your dynamic data to by using the InternalsVisibleTo statement.

so, in your AssemblyInfo.cs (or dot whatever else if you're not into C# which makes you a dirty sinner), declare:

[assembly: InternalsVisibleTo("MyAssembly.WhichShouldSeeMyDynamicData")]

No comments:

Post a Comment