Share

NAnt - A .NET Build Tool

Tracker: Bugs

5 signing satellite resource assemblies - ID: 1587739
Last Update: Comment added ( drieseng )

When the attribute "keyfile" is used for the csc task
it won't be applied to the call to the "al" command
line tool for building satellite resource assemblies.

The attached file contains a patch
for "CompilerBase.cs" in its current version.


Volker Schoenharting ( schoenha ) - 2006-10-31 08:54

5

Closed

Fixed

Gert Driesen

Tasks

None

Public


Comments ( 10 )

Date: 2007-03-11 17:09
Sender: driesengProject AdminAccepting Donations


Yeah, of course. I have a local test for this issue which works just fine
(and verifies using sn).

Can you attach a "simple project" ?


Date: 2007-03-11 15:42
Sender: goodwill1120


I am building castle project. I think this simple issue could be tested
with a simple project though... Have you ever tried to build a really
simple project and then use sn.exe to verify the signature?


Date: 2007-03-11 14:57
Sender: driesengProject AdminAccepting Donations


It should indeed work fine with a recent nightly build. Do you have a
repro you can share ?


Date: 2007-03-03 08:56
Sender: goodwill1120


Is that being included in the latest nightly? I tried and it still fails
somehow. I verified again and the satellite assembly are still not signed.


Date: 2007-01-12 20:05
Sender: driesengProject AdminAccepting Donations


Fixed in cvs.

Thanks for the report !


Date: 2007-01-07 17:14
Sender: driesengProject AdminAccepting Donations


I finally had time to look into this a little further, and this is what I
noticed:

If the keyfile is specified using an AssemblyKeyFileAttribute, then the
assembly linker (al.exe) will use the filename that was specified there for
signing the satellite assembly.

So, you're correct in stating that we need to pass the /keyfile option to
al.exe to sign satellite assemblies (that were signed using /keyfile
option). I'll fix this asap.




Date: 2006-11-01 12:10
Sender: schoenha

Logged In: YES
user_id=211423

I have attached a small project that produces the error.

The following shows the output of nant (see also the
"nant.output.txt" file):

E:\Projects\SignTest>nant
NAnt 0.85 (Build 0.85.2478.0; release; 14.10.2006)
Copyright (C) 2001-2006 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///E:/Projects/SignTest/SignTest.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: build


prepare:

[mkdir] Creating directory 'E:\Projects\SignTest\build'.

build:

[csc] Compiling 3 files to
'E:\Projects\SignTest\build\SignTest.dll'.
[resgen] Read in 1 resources from
"E:\Projects\SignTest\Resources\Resource.resx"
[resgen] Writing resource file... Done.
[resgen] Read in 1 resources from
"E:\Projects\SignTest\Resources\Resources.de.resx"
[resgen] Writing resource file... Done.
[al] Compiling 1 files to
'E:\Projects\SignTest\build\de\SignTest.resources.dll'.

BUILD SUCCEEDED

Total time: 0.9 seconds.


E:\Projects\SignTest>sn -T build\SignTest.dll

Microsoft (R) .NET Framework Strong Name Utility Version
2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.

Public key token is 8bfff3725ef78b4d

E:\Projects\SignTest>sn -T build\de\SignTest.resources.dll

Microsoft (R) .NET Framework Strong Name Utility Version
2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.

build\de\SignTest.resources.dll does not represent a
strongly named assembly

E:\Projects\SignTest>


Date: 2006-10-31 16:05
Sender: driesengProject AdminAccepting Donations

Logged In: YES
user_id=707851

I cannot reproduce this here. In the test case I used, the satellite
assembly gets signed just fine.

Please reopen the bug report if you have a repro you can share.


Date: 2006-10-31 10:40
Sender: schoenha

Logged In: YES
user_id=211423

Using templates one can only supply information such as
version numbers etc.
On general principles it must not be possible to extract the
information necessary to sign an assembly (i.e. the private
key) from another assembly.


Date: 2006-10-31 09:01
Sender: driesengProject AdminAccepting Donations

Logged In: YES
user_id=707851

Correct me if I'm wrong, but we pass the built assembly as template to al.
So the satellite assembly should automatically
obtain the complete identity from it.

Do you have a small repro for this ?


Attached Files ( 2 )

Filename Description Download
CompilerBase.cs.patch Patch for CompilerBase.cs Download
SignTest.zip Test project Download

Changes ( 12 )

Field Old Value Date By
close_date - 2007-01-12 20:05 drieseng
resolution_id Accepted 2007-01-12 20:05 drieseng
status_id Open 2007-01-12 20:05 drieseng
resolution_id Works For Me 2007-01-07 17:14 drieseng
close_date 2006-10-31 16:05 2006-11-01 12:10 schoenha
status_id Closed 2006-11-01 12:10 schoenha
File Added 200948: SignTest.zip 2006-11-01 12:10 schoenha
status_id Open 2006-10-31 16:05 drieseng
close_date - 2006-10-31 16:05 drieseng
assigned_to nobody 2006-10-31 16:05 drieseng
resolution_id None 2006-10-31 16:05 drieseng
File Added 200740: CompilerBase.cs.patch 2006-10-31 08:54 schoenha