Hi Norm,
Visual Studio .NET will not search for the strong name key file under the
project folder but under the VSWebCache folder when you're working on a web
service project. So you have to copy a key file to the VSWebCache folder to
get a relative path.
If you want to keep your private key file safe and only want to maintain
one copy of the strong name key file for all the projects, you can use
Delay Signing. Delayed signing at build time allow you to reserve space in
the portable executable (PE) file for the strong name signature, but defer
the actual signing until some later stage (typically just before shipping
the assembly).
Please refer to the following link for more information:
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpcondelayedsigningassembly.asp
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
--------------------
| From:
no***@knorrassociates.com (Norm Dotti)
| Newsgroups: microsoft.public.dotnet.languages.vb
| Subject: Re: AssemblyKeyFile relative to?
| Date: 15 Sep 2003 06:19:53 -0700
| Organization:
http://groups.google.com/
| Lines: 28
| Message-ID: <21**************************@posting.google.com >
| References: <Oi*************@TK2MSFTNGP10.phx.gbl>
<#l*************@cpmsftngxa06.phx.gbl>
<21**************************@posting.google.com >
<PY*************@cpmsftngxa06.phx.gbl>
<21**************************@posting.google.com >
<R#**************@cpmsftngxa06.phx.gbl>
<21**************************@posting.google.com >
<JQ**************@cpmsftngxa06.phx.gbl>
<21**************************@posting.google.com >
<Cd**************@cpmsftngxa07.phx.gbl>
| NNTP-Posting-Host: 67.85.172.14
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1063631994 6408 127.0.0.1 (15 Sep 2003
13:19:54 GMT)
| X-Complaints-To:
gr**********@google.com
| NNTP-Posting-Date: 15 Sep 2003 13:19:54 GMT
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA06.phx.gbl!TK2MSFTNGXA0
5.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwix.com!newsfeed.cwix.com!prodigy.c
om!pd2nf1so.cg.shawcable.net!residential.shaw.ca!s n-xit-03!sn-xit-01!sn-xit-
08!sn-xit-09!supernews.com!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.vb:137012
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| I agree, relative path is the way to go. I've been trying to use
| relative path all along. As you may recall ..\\..\\App.snk doesn't
| work for the Web Service project. I have may apps on E: but the web
| service's "home" relative start directory is on C:.
|
| Please tell me how to provide a relative, non-machine/user dependent
| path for all my project types that point to the same snk file. I don't
| see how this is possible.
|
|
|
v-****@online.microsoft.com (Kevin Yu) wrote in message
news:<Cd**************@cpmsftngxa07.phx.gbl>...
| > Hi Norm,
| >
| > You don't need to hardcode them in your program.
| >
| > %HomePath% can be got as
| > System.Environment.GetEnvironmentVariable("HomeDri ve") +
| > System.Environment.GetEnvironmentVariable("HomePat h")
| >
| > And MachineName as System.Environment.MachineName.
| >
| > However, I recommend you use relative path instead. It could be
| > "..\\..\\App.snk"
| >
| > Kevin Yu
| > =======
| > "This posting is provided "AS IS" with no warranties, and confers no
| > rights."
|