-
Strong name key files?
Is there any way to use a relative path for your strong name key file for an assembly? I currently have:
Code:
<Assembly: AssemblyKeyFile("C:\Merrion Computing\Customers\Cooperation\Microsoft\EMFSpoolfileReader\EMFSpoolfileReader.snk")>
But if I take out the absolute path the compiler throws a hissy fit. Ideas?
-
Why?
Hi.
Why do you want to use a relative path? :confused:
I may be wrong, but as far as I know, it's only needed when you compile.
Once the DLL is compiled the file is no longer needed, unless you need to compile it again.
-
This is ture - but I share the source code between many developers and it doesn't make sense to force all of us to use the same path structure.
-
Fair enough
Hi.
Fair enough. Can't argue with that....;)
Sorry I don't have a solution though...
-
Try
System.Reflection.Assembly.GetExecutingAssembly().Location
This will return the location (including the DLL/exe name) of the assembly being executed as a string. So just remove the dll/exe name, and add the name of the keyfile.
I've never done this in an assembly file, so unsure if it will work for sure, but give it a try.