Plugin Developer DiscussionDiscussion for FogBugz Plugin developers |
||
So I've been working on some plugins and I've found that sometimes external assemblies work and other times they don't. I can't for the life of me figure out why. I've currently got an external assembly linked from a second project file. This will not load. I keep getting a plugin load failure System.IO.FileNotFoundException: Could not load file or assembly. Yet it exists in the plugin cache dir. What am i missing here? It's a simple external assembly that only references system and system.core.
Hi Tracstarr-
These can be really frustrating, as the error is (as you have seen) pretty opaque. If it's not obvious, try turning on Fusion logging: http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx Does that help? Thanks! Brett
well the logs give me the following. Googling pointed me towards an issue with indexing service, but I have it turned off. Perhaps you've seen this before?
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
Hi Tracstarr-
If the assembly is present in the same plugin subdir as the plugin .dll, is strongly-named, is showing up in the plugin cache dir, and is referenced properly, then my first guess would be that the IIS website app pool owner's permissions might not be correct. Let's try an experiment -- are you running FogBugz 7.1.5? If so, can you see what happens when you build Plugins/examples/CustomFields and allow it to upload to your test site? A fresh build of this will try to include the new FogCreek.Plugins.BugField .dll with the plugin, so if that works, then we can narrow down our field of search to how your second .dll is referenced. Thanks! Brett
well, adding that attribute allows the main plugin dll to load fine. However, if i then try to reference the external assembly, signed with or without that attribute, it still doesn't load.
=== Pre-bind state information === LOG: User = WIN2K8\FogBugz LOG: DisplayName = BBPlugins.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=aaf7db694a6a50c1 (Fully-specified) LOG: Appbase = file:///C:/Program Files (x86)/FogBugz/website/ LOG: Initial PrivatePath = C:\Program Files (x86)\FogBugz\website\bin Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Program Files (x86)\FogBugz\website\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config. LOG: Post-policy reference: BBPlugins.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=aaf7db694a6a50c1 LOG: The same bind was seen before, and was failed with hr = 0x80070002. |
Powered by FogBugz