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

TypeLoadException when assembly is picked up by MEF #24

Open
MatthewSteeples opened this issue May 15, 2013 · 3 comments
Open

TypeLoadException when assembly is picked up by MEF #24

MatthewSteeples opened this issue May 15, 2013 · 3 comments

Comments

@MatthewSteeples
Copy link

I've brought in this library as a dependency of another library and all of a sudden it's generating errors when MEF analyses the assemblies for imports (it analyses all of the assemblies in the bin folder).

The error is that it doesn't like the fact that BerDecodeException.GetObjectData has different security demands than Exception.GetObjectData. Is there any reason that this SecurityPermission is required and is it possible to remove it?

System.TypeLoadException: Inheritance security rules violated while 
overriding member:
'DevDefined.OAuth.KeyInterop.BerDecodeException.GetObjectData
(System.Runtime.Serialzation.SerializationInfo,
System.Runtime.Serialization.StreamingContext)'. 

Security accessibility of the overriding method must match the security
accessibility of the method being overriden.
@paulduran
Copy link

@MatthewSteeples did you manage to find a solution to this? I'm having the same problem

@MatthewSteeples
Copy link
Author

I'm afraid in the end what I did was I excluded this assembly from being analysed by MEF. I never had chance to work out why the error was appearing.

@paulduran
Copy link

@MatthewSteeples No worries, I ended up taking the same approach...

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

2 participants