Improved logging for PostSharp.Sdk.CodeModel.AssemblyLoadException

hakan's Avatar

hakan

26 Mar, 2013 06:38 PM

As I've seen quite a bit of people seem to have problems with PostSharp 2 going through binaries and trying to find dependencies. I have the same problem right now, and I can't find which assembly has the dependency. I've checked with ProcessMonitor and the file it loads right before the error is not referencing the version PostSharp complains about, I've even checked with ILDASM. I'm sure I'll find it, but it's very tedious to track down (we have a ton of assemblies and dependencies, large project).
Something that would really help would be if PostSharp would log which assembly it's trying to load. Right now it logs lots of information about where it tries to find the missing assembly, but it doesn't log anything about why it's trying to look for this obsolete version of a dependency. Just having the path and DLL would save a ton of time. Please consider this, even for the 2.1 version.

Thanks,
/Hakan

  1. Support Staff 1 Posted by PostSharp Techn... on 27 Mar, 2013 10:17 AM

    PostSharp Technologies's Avatar

    I think the current log contains all information you are looking for: WHERE it is looking for, WHY it is looking there, and WHY there is a mismatch.

    Do you have a specific example where this information is missing (please show me the error message including the exception stack)? Thanks.

    -gael

  2. 2 Posted by hakan on 27 Mar, 2013 06:11 PM

    hakan's Avatar

    The issue is not with which assembly it's trying to load, that information is all there in the log. The issue is WHICH assembly triggered the search/load in the first place. For example, I found out that I had accidentally committed an assembly (CheckinModule.dll), which had references to an older shared component (Framework.dll) and PostSharp was trying to load CheckinModule, which triggered a search for Framework.dll with the specified version. I could see PostSharp was looking for Framework version 407 (latest was 409), but out of my 50+ DLLs I didn't know it was CheckinModule.dll that was referencing the old Framework.dll, nothing in the Postsharp log indicated CheckinModule.dll was the culprit. That information would've been a huge timesaver.

    Thanks!
    /Hakan

  3. Support Staff 3 Posted by PostSharp Techn... on 07 Jun, 2013 03:49 PM

    PostSharp Technologies's Avatar

    Could you add your idea to https://postsharp.uservoice.com/? We'll try to make this site a little more active. Thank you.

    -gael

  4. System closed this discussion on 13 Apr, 2016 10:33 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac