J
Jarmo Muukka
Hello,
I started to use FxCop to check my assemblies. One requirement is a strong
name key. Placing the .snk file for library projects was easy. I placed the
file in project directory and in AssemlyInfo.cs I
haveAssemblyKeyFile("..\\..\\myprojectname.snk"). This is because the
compiler has its default directory in <Project
Directory>\obj\<Configuration> (where Configuration is either Debug or
Release).
Now to the problem. I have placed the .snk file into the web application
directory. I noticed that there is no fool proof way to tell the location in
AssemblyKeyFile attribute. Compiler has its default directory in
%HOMEPATH%\VSWebCache\<Machine Name>\<Project
Directory>\obj\<Configuration>.
1) I cannot use relative path.
2) I don't want to use absolute path, because if I move the project or
rename directories, it breaks. Also, this is not possible solution at work
in multiple developer projects, because we don't use the same directory
structure in our computers. We use VSS at work.
Bad design I would say. Was it designed at all?
Is there a solution for this?
And, it is not a solution, if you say that everyone should copy the .snk
file to %HOMEPATH%\VSWebCache\<Machine Name>\<Project
Directory>\obj\<Configuration> or use the same directory structure their
computers.
JMu
I started to use FxCop to check my assemblies. One requirement is a strong
name key. Placing the .snk file for library projects was easy. I placed the
file in project directory and in AssemlyInfo.cs I
haveAssemblyKeyFile("..\\..\\myprojectname.snk"). This is because the
compiler has its default directory in <Project
Directory>\obj\<Configuration> (where Configuration is either Debug or
Release).
Now to the problem. I have placed the .snk file into the web application
directory. I noticed that there is no fool proof way to tell the location in
AssemblyKeyFile attribute. Compiler has its default directory in
%HOMEPATH%\VSWebCache\<Machine Name>\<Project
Directory>\obj\<Configuration>.
1) I cannot use relative path.
2) I don't want to use absolute path, because if I move the project or
rename directories, it breaks. Also, this is not possible solution at work
in multiple developer projects, because we don't use the same directory
structure in our computers. We use VSS at work.
Bad design I would say. Was it designed at all?
Is there a solution for this?
And, it is not a solution, if you say that everyone should copy the .snk
file to %HOMEPATH%\VSWebCache\<Machine Name>\<Project
Directory>\obj\<Configuration> or use the same directory structure their
computers.
JMu