-
I am creating a plugin that creates a button in a software I am using. I debugged the code I have and my code crashes (at the bootstrapper.Run()) when running showing the following message Exception thrown: 'System.InvalidCastException' in Prism.Wpf.dll An exception of type 'System.InvalidCastException' occurred in Prism.Wpf.dll but was not handled in user code Unable to cast transparent proxy to type 'InnerModuleInfoLoader'. The entry point of my plugin contains:
My bootstrapper.cs class:
My modules have a post-build command to copy the .dll in the bin/debug/Modules folder for my plugin and I have checked the folder myself after building (its there). I really dont know whats wrong. My module class:
This is similar to : https://stackoverflow.com/questions/8158512/error-running-a-wpf-prism-app-from-an-arcgis-desktop-add-in-button-unable-to-lo However I dont really understand the solution they mention there. Prism.dll is already in the plugin's bin/debug folder.. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
I have been smashing my head at this for a while. I downloaded Fusion++ to take a look at the .dll being loaded. I noticed just when the error happens I get an error loading Prism.wpf.dll. Even though its in the bin/debug folder but for reason the compiler or whatever is looking into the folder of the host software (hosting the plugin). Please see below:
|
Beta Was this translation helpful? Give feedback.
-
Hard to say as your debugging environment is dependent on Fusion++. All I can say is that you need to know where Fusion is looking for plugin dependencies , and then make sure ALL your plugin dependencies are there. Even framework dependencies if not being pulled from the GAC. |
Beta Was this translation helpful? Give feedback.
-
Anyone facing same issue: I had to used ConfigureModuleCatalog() instead of CreateModuleCatalog(). I have yet to know why CreateModuleCatalog() wasnt working for me. Final code:
Edit: thanks to Brian's help. |
Beta Was this translation helpful? Give feedback.
Anyone facing same issue: I had to used ConfigureModuleCatalog() instead of CreateModuleCatalog(). I have yet to know why CreateModuleCatalog() wasnt working for me.
Final code:
Edit: thanks to Brian's help.