Roy, To create a release build of log4net for a specific CLR, you can use the following command line:
NAnt.exe -f:log4net.build -D:project.build.config=release compile-<framework identifier> For example: to build log4net in a release configuration for .NET 1.1, you'd use NAnt.exe -f:log4net.build -D:project.build.config=release compile-net-1.1 Hope this helps, Gert > -----Original Message----- > From: Pardee, Roy [mailto:[EMAIL PROTECTED] > Sent: zaterdag 5 maart 2005 1:42 > To: [email protected] > Subject: Having trouble signing log4net.dll > > Hey All, > > I'd like to sign the log4net.dll assembly (version 1.2.0-beta8) w/a > locally generated .snk, and am having trouble. I'm not NANT-literate, > which is probably the issue. > > Here's what I've tried: > > Copied my snk file to the log4net basedir (in my case, > c:\DeleteMe\log4net-1.2.0-beta8) and renamed it to log4net.snk. > > Opened c:\DeleteMe\log4net-1.2.0-beta8\src\AssemblyInfo.cs, > and changed > the last few lines to this: > > #if STRONG > [assembly: AssemblyDelaySign(false)] > // [assembly: AssemblyKeyFile(@"..\..\..\log4net.snk")] > [assembly: > AssemblyKeyFile(@"c:\DeleteMe\log4net-1.2.0-beta8\log4net.snk")] > #endif > > Opened a command prompt & ran the BUILD.cmd batch file. > > (BTW--it looks like this builds everything everything--how would I get > this batch file to only build the .net v1.1 version w/the strong > naming?) > > I get a 'BUILD SUCCEEDED' (full output is appended below). The file > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.1\debug\log4net.dll has the > expected fresh timestamp. > > But when I navigate over to > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.1\debug and say: > > sn -v log4net.dll > > to verify the strong name I get: > > log4net.dll does not represent a strongly named assembly > > And further, when I try to build my project (having refreshed the > reference to log4net.dll) I get this build error: > > Unable to emit assembly: Referenced assembly 'log4net' does not have a > strong name > > Can anybody throw me a clue? > > Thanks! > > -Roy > > P.S. Here is the full text of the BUILD.cmd run, in case it's useful. > > C:\DeleteMe\log4net-1.2.0-beta8>build > LOG4NET_DIR is C:\DeleteMe\log4net-1.2.0-beta8 > BUILD_FILE is C:\DeleteMe\log4net-1.2.0-beta8\log4net.build > Buildfile: file:///C:/DeleteMe/log4net-1.2.0-beta8/log4net.build > > check-current-build-config: > > set-build-configuration: > > set-debug-build-configuration: > > set-build-configuration-flags: > > set-runtime-configuration: > > check-bin-dir: > > check-doc-dir: > > check-sdkdoc-dir: > > check-sdkdoc-debug: > > check-build-debug: > > check-build-defines: > > set-net-1.0-runtime-configuration: > > set-net-1.0-runtime-configuration: > > compile-all: > [echo] Compiling all build configurations for all runtime > configurations. > > set-debug-build-configuration: > > set-build-configuration-flags: > > compile-build: > [echo] Compiling all runtime configurations for the debug build > configurati > on. > > set-netcf-1.0-runtime-configuration: > > set-netcf-1.0-runtime-configuration: > > check-log4net-basedir: > > compile-netcf-1.0: > > check-current-bin-dir: > > clean-current-bin-dir: > [echo] Cleaning the bin/netcf/1.0/debug binaries directory. > [delete] Deleting directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\netcf\1.0\deb > ug. > [mkdir] Creating directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\netcf\1.0\deb > ug > [csc] Compiling 114 files to > C:\DeleteMe\log4net-1.2.0-beta8\bin\netcf\1.0 > \debug\log4net.dll > > set-net-1.0-runtime-configuration: > > set-net-1.0-runtime-configuration: > > compile-net-1.0: > > clean-current-bin-dir: > [echo] Cleaning the bin/net/1.0/debug binaries directory. > [delete] Deleting directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.0\debug > . > [mkdir] Creating directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.0\debug > > [csc] Compiling 127 files to > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.0\d > ebug\log4net.dll > > set-net-1.1-runtime-configuration: > > set-net-1.1-runtime-configuration: > > compile-net-1.1: > > clean-current-bin-dir: > [echo] Cleaning the bin/net/1.1/debug binaries directory. > [delete] Deleting directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.1\debug > . > [mkdir] Creating directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.1\debug > > [csc] Compiling 127 files to > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.1\d > ebug\log4net.dll > [echo] Mono 1.0 is not available. Build skipped. > [echo] SSCLI 1.0 is not available. Build skipped. > > set-release-build-configuration: > > set-build-configuration-flags: > > compile-build: > [echo] Compiling all runtime configurations for the release build > configura > tion. > > set-netcf-1.0-runtime-configuration: > > compile-netcf-1.0: > > clean-current-bin-dir: > [echo] Cleaning the bin/netcf/1.0/release binaries directory. > [delete] Deleting directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\netcf\1.0\rel > ease. > [mkdir] Creating directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\netcf\1.0\rel > ease > [csc] Compiling 114 files to > C:\DeleteMe\log4net-1.2.0-beta8\bin\netcf\1.0 > \release\log4net.dll > > set-net-1.0-runtime-configuration: > > compile-net-1.0: > > clean-current-bin-dir: > [echo] Cleaning the bin/net/1.0/release binaries directory. > [delete] Deleting directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.0\relea > se. > [mkdir] Creating directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.0\relea > se > [csc] Compiling 127 files to > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.0\r > elease\log4net.dll > > set-net-1.1-runtime-configuration: > > compile-net-1.1: > > clean-current-bin-dir: > [echo] Cleaning the bin/net/1.1/release binaries directory. > [delete] Deleting directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.1\relea > se. > [mkdir] Creating directory > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.1\relea > se > [csc] Compiling 127 files to > C:\DeleteMe\log4net-1.2.0-beta8\bin\net\1.1\r > elease\log4net.dll > [echo] Mono 1.0 is not available. Build skipped. > [echo] SSCLI 1.0 is not available. Build skipped. > > BUILD SUCCEEDED > > Total time: 105 seconds > > Roy Pardee > Research Analyst/Programmer > Center For Health Studies (Cancer Research Network) > Group Health Cooperative > (206) 287-2078 > > This message and any attached files might contain confidential > information protected by federal and state law. The information is > intended only for the use of the individual(s) or entities originally > named as addressees. The improper disclosure of such > information may be > subject to civil or criminal penalties. If this message reached you in > error, please contact the sender and destroy this message. Disclosing, > copying, forwarding, or distributing the information by unauthorized > individuals or entities is strictly prohibited by law. > >
