|
From: Kevin D. <kd...@op...> - 2004-10-13 16:28:36
|
Yes! We have an answer.... This is a 'known issue' (see Users Guide) Assemblies decorated with the StrongNameIdentityPermission attribute can only be called by other assemblies that are marked with the specified key. Now, 'called' is a somewhat vague term that includes some of the functionality within reflection. When reflection attempts GetTypes(), a demand is triggered and the stack walk hits the NDoc assemblies. These assemblies obviously do not have the same key, and so a SecurityException is thrown :( I can think of two possible work-arounds, and both are unpleasant... 1. disable CAS on the machine running Ndoc - most definitely not recommended 2. recompile NDoc using the same key as your assemblies - possibly not too bad if you always use the same key file for all your work... Obviously, our error reporting is rubbish for this type of error - I will look at rewriting the offending code ASAP regards, Kevin --- "Never attribute to malice that which can be adequately explained by stupidity" > -----Original Message----- > From: ndo...@li... > [mailto:ndo...@li...] On Behalf Of > Pascal Bourque > Sent: Thursday, 14 October 2004 1:43 AM > To: ndo...@li... > Subject: RE: [ndoc-devel] Beta 2 problem loading assemblies > > Yes, it is a ReflectionTypeLoadException. Here's the > ToString() output of the exception: > > ------------------------- > System.Reflection.ReflectionTypeLoadException: One or more of > the types in the assembly unable to load. > at System.Reflection.Module.GetTypesInternal(StackCrawlMark& > stackMark) > at System.Reflection.Assembly.GetTypes() > at NDoc.Core.ReflectionEngine.BuildXrefs() in > d:\dev\sourceforge\ndoc\src\core\reflectionengine\reflectionen > gine.cs:li > ne 3497 > ------------------------- > > LoaderExceptions contains 2 exceptions: > > ------------------------- > System.Security.SecurityException: Request for the permission > of type > System.Security.Permissions.StrongNameIdentityPermission, > mscorlib, Version=1.0.5000.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089 failed. > |