Bugs item #999629, was opened at 2004-07-28 12:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=999629&group_id=31650

Category: Tasks
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tom Cabanski (tcabanski)
Assigned to: Nobody/Anonymous (nobody)
Summary: Solution task cannot build project with delay signed ref

Initial Comment:
I have a project that contains a number of assemblies 
that get strongly named (signed) for distribution.  On 
development boxes we build using delayed signing and 
generally have strong name verification off for the 
various assemblies. 

When we test releases, we turn on strong name 
validation and sign the assemblies.  After testing is 
complete, we switch back to verification off and delay 
signing.

The latest versions of NAnt have a problem with partially 
signed assemblies.  In the case where verification is on, 
we cannot build because the referenced dlls are partially 
signed; nant complains that it cannot load the dll during 
the build process because the dll is not strongly named.

This leads to an interesting problem: the dlls have to 
exist before verification can be tuned off.  In the 
situation where dll a references b dll which references c 
dll, we have to build and let it fail because of 
verification on a, turn verification off for a, build and let 
it fail because of b, turn off verification on b and so on.  
This does not occur in VS.NET.

The problem is caused by 
NAnt.VSNet.GetAllReferencedModules where the 
following line of code appears:

 
_refResolver.AppendReferencedModulesLocatedInGivenDir
ectory(moduleDirectory, referenceToResolve, ref 
allReferences, ref unresolvedReferences);

This method uses Assembly.LoadFromFile to load a dll 
and find out what it references.  Of course, if the 
loaded dll is partially signed and verification is on, this 
fails.

Why is this method required?  We comment it out and 
our solution still works.  I would guess this is needed 
when building without a solution in case you forgot to 
specify the refrences.  The problem is it completely 
screws things up when using partially signed assemblies.

The bottom line is this: If NAnt needs to read the 
assembly to figure out the references, it needs to 
somehow skip verification on the assembly.  At the very 
least, it needs to open the assembly and look for 
references only if not using the solution task.  I'm not 
really sure how to fix this myself and that is why I am 
submitting a bug. 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=999629&group_id=31650


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to