Hi Larry,
> I'm trying to publish my web site from VS by right-clicking the project
> and selecting "Publish Web Site". On the dialog that appears, I then check
> "Enable strong naming on precompiled assemblies" and enter the name of my
> ".pfx" file in the "Key file location" field. The following error results
> however when I proceed with publishing:
pfx file is not for "strong-naming" the assemblies. It's for
digitally-sigining any module (exe, dll or otherwise).
The snk file (created from sn) will be used to sign the assembly.
:
: "Error 5 Cryptographic failure while signing assembly 'c:\Documents and
: Settings\Developer1\Local Settings\Temp\Temporary ASP.NET
: Files\publish\8cf0e763\82cfb5f8\App_Web_5cvwn6lo.d ll' -- 'Key file
: 'c:\MyProject.snk' is missing the private key needed for signing' "
I think MyProject.snk contains only the public key.
Just tryout the following at command line (create a dummy class
HelloWorld.cs):
C:\>csc /keyfile:MyProject.snk /out:HelloWorld.dll /t:library HelloWorld.cs
If you get the error, it's time to regenerate the key (sn -k).
--
Happy Hacking,
Gaurav Vaish
http://blogs.mastergaurav.com
http://eduzine.edujini-labs.com
---------------------------