I was getting a System.TypeLoadException as it couldn’t find the file i had just added in my project. Every time i ran my test against the project i kept getting the same result. Enter plenty of colourful language and head bashing.
Fortunately in my googling i came across this helpful explanation on StackOverflow. It turns out that if a version of the file exists in the GAC then it will use the GAC version (assuming the version number is the same) and not the version you think you are debugging. Thank god for Google but how did i get here?
I am currently on a Microsoft CRM project and i had to build a plugin (dll) and deploy it. The development environment is hosted by the client and is also the test environment. Anyway it turns out when you want to deploy two dlls as part of a plugin (for example the plugin dll and some domain or business logic layer dll) then you have to deploy the secondary dll (not the plugin) to the GAC so that it can be referenced… nuff said there really.
So the short version is try and avoid debugging projects that are in the GAC as well. I think Chandler from friends sums it up quite nicely “oh god, can open… worms everywhere”
No comments:
Post a Comment