The only difference seems to be that the *.snk file I was using was
from Verisign. I'm under the impression that for
development purposes that that should not make a difference.
Does your build window give you any info on what is happening with
that file?
Marc
Pardee, Roy wrote:
That makes a ton of sense--but I'm either doing
it wrong or it's not working. I opened up
C:\DeleteMe\log4net-1.2.0-beta8\src\log4net.sln in vs.net, allowed it
to convert the project to 2003 format, right-clicked on the project
& selected 'properties', and then 'configuration properties'. I
changed the Conditional Compilation Constants from
DEBUG;TRACE;NET;NET_1_0;NUNIT_TESTS
to
DEBUG;TRACE;NET;NET_1_0;NUNIT_TESTS;STRONG
and then rebuilt. But no difference--sn still
says the dll isn't strong-named.
Thanks!
When I had that problem I had to go into the project and set the STRONG
environment variable so that it could execute the stuff in the #if
STRONG clause
Marc
Pardee, Roy wrote:
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.
--
| Marc
d’Entremont |
Ph: (250)
386-4266 |
| Convergent
Media Network |
Fax: (250)
386-4267 |
| 210-19
Dallas Rd. |
Mobile:
(250) 886-8665 |
| Victoria,
BC |
[EMAIL PROTECTED] |
| V8V 5A6 |
This electronic message
transmission, including any attached files, contains information which
may be confidential and/or privileged. The information is intended to
be for the SOLE use of the individual or entity named above. If you are
not the intended recipient, be aware that any review, disclosure,
copying, distribution or use of the contents of this information is
prohibited. This message is not to be forwarded for any reason without
prior consent of the sender.
If you have received this
electronic transmission in error, please notify the sender immediately
by telephone (250) 386-4266 or by a "reply to sender only" message and
destroy all electronic and hard copies of the communication, including
attachments, without reading or saving in any manner.
--
Marc d’Entremont
| Marc
d’Entremont |
Ph: (250)
386-4266 |
| Convergent
Media Network |
Fax: (250)
386-4267 |
| 210-19 Dallas
Rd. |
Mobile: (250)
886-8665 |
| Victoria, BC |
[EMAIL PROTECTED] |
| V8V 5A6 |
This electronic message
transmission, including any attached files, contains information which
may be
confidential and/or privileged. The information is intended to be for
the SOLE
use of the individual or entity named above. If you are not the
intended
recipient, be aware that any review, disclosure, copying, distribution
or use
of the contents of this information is prohibited. This message is not
to be
forwarded for any reason without prior consent of the sender.
If you have received this
electronic transmission in error, please notify the sender immediately
by
telephone (250) 386-4266 or by a "reply to sender only" message and
destroy all electronic and hard copies of the communication, including
attachments, without reading or saving in any manner.
|