Wednesday, March 7, 2012

Add-Type issue with multi-assembly project

I have a project that loads plugins from a folder.  The assemblies are each loaded and parsed to catalog the methods in that assembly that contain a specific attribute.  This was easier than using a type check because it allowed me to use inheritance for my plug-ins as well as allow them to call others from the same assembly without exposing those publicly.

At any rate, my base class for these plug-in was building to a BIN\DEBUG in its own source tree.  Many of the other class were building to a common Bin\Debug.  In doing this they would copy the base assembly over.

When running in the application UI, the base class was loaded directly.  The other assemblies all resolved and used this reference.  When launching via PowerShell even after an Add-Type for the base class these assemblies could not be loaded.  They would throw System.Reflection.ReflectionTypeLoadException" Unable to load one or more of the requested types" and suggest that details be pulled from "LoaderExceptions
".

Changing the build path for the base class assembly to the same as the other and having the other refrences to this location seems to have resolved the issue.



1 comment:

  1. Gambling and gambling are real, but not just of casino players
    At the casino's poker rooms, players 춘천 출장안마 have 인천광역 출장샵 the 상주 출장안마 option to a game of card 세종특별자치 출장안마 poker, or playing with their hands in the dealer's 원주 출장마사지 favor.

    ReplyDelete