AssemblyLoadException in postsharp, problem with arguments from referenced DLLs?
Posted
by RodH257
on Stack Overflow
See other posts from Stack Overflow
or by RodH257
Published on 2010-06-02T03:08:22Z
Indexed on
2010/06/02
3:13 UTC
Read the original article
Hit count: 533
I'm just starting out with postsharp/AOP. I want to make some instrumentation for C# to track the usage of some addins that I write for a peice of software.
I am trying to use the OnMethodBoundaryAspect class to take note of the values of some of the parameters when the method is called. Those parameters are types which are referenced in an external DLL.
When I add my attribute to the method, the project won't build, I get the following error
Error 2 Unhandled exception (2.0.5.1204, 64 bit, CLR 2.0, Release): PostSharp.CodeModel.AssemblyLoadException: Error while loading the assembly "C:\Program Files\Autodesk\Revit Structure 2011\Program\RevitAPI.dll": Could not load file or assembly 'revitapi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
The REvitAPI.dll is the file with the type in it. I've also tested just adding the attribute to the project but not applying it to any methods, this also causes the error. So it appears its not related to the method parameter types itself, but merely the existence of this DLL.
Has anyone come across this issue before, or can anyone point me in the right direction of where to get some more info on this?
© Stack Overflow or respective owner