AssemblyKeyFile
-
Hi, how do you specify "RELATIVE" path for ASP.NET apps? (webapp.snk resides in same directory of the application dll - ie. bin\) This keeps giving me error message saying it can't find the snk file... Thanks in advance. Norman Fung
Use the MapPathServer command - it will give you the root directory (above \bin).
-
Hi, how do you specify "RELATIVE" path for ASP.NET apps? (webapp.snk resides in same directory of the application dll - ie. bin\) This keeps giving me error message saying it can't find the snk file... Thanks in advance. Norman Fung
Hi Norman, You can find the answer in the
AssemblyInfo.cs
file which should be included in your web project. Basically, you use either theAssemblyKeyFileAttribute
or theAL.exe
tool to sign your assembly with a strong name. Here, you want to use theAssemblyKeyFileAttribute
with a relative path, so you would specify this attribute as below:[assembly: AssemblyKeyFile(@"..\\..\\Webapp.snk")]
then you need to copy the key file
Webapp.sink
to the project directory which is specified as%HOMEPATH%\VSWebCache\<Machine Name>\< Project Directory>\obj\<Configuration>
For example with my machine:
C:\Documents and Settings\minhphan.SILKROAD\VSWebCache\CONGMINH\WebApplication1\obj
-
Hi Norman, You can find the answer in the
AssemblyInfo.cs
file which should be included in your web project. Basically, you use either theAssemblyKeyFileAttribute
or theAL.exe
tool to sign your assembly with a strong name. Here, you want to use theAssemblyKeyFileAttribute
with a relative path, so you would specify this attribute as below:[assembly: AssemblyKeyFile(@"..\\..\\Webapp.snk")]
then you need to copy the key file
Webapp.sink
to the project directory which is specified as%HOMEPATH%\VSWebCache\<Machine Name>\< Project Directory>\obj\<Configuration>
For example with my machine:
C:\Documents and Settings\minhphan.SILKROAD\VSWebCache\CONGMINH\WebApplication1\obj