P
Patrick Kowalzick
Dear NG,
I am trying to build a strong named library with Visual C++.
-Therefore I am generating a key pair using
sn -k strong_name.snk
-Create a new Project in the Visual Studio: Visual C++ Projects -> .NET ->
Class Library (.NET)
in the main file I add the lines at the beginning of the file
#using <mscorlib.dll>
[assembly:System::Reflection::AssemblyVersion("1.0.0.0")];
[assembly:System::Reflection::AssemblyKeyFileAttribute("strong_name.snk")];
and put the strong_name.snk in the Project Dir (and a copy in the
Debug/Release for testing).
-after compiling I test with
sn -v strong_name.dll
which returns:
"strong_name.dll does not represent a strongly named assembly"
-compiling in the command line using
cl /LD shtrong_name.cpp /clr
and testing again with
sn -v strong_name.dll
returns:
"Assembly 'strong_name.dll' is valid"
So I searched in the compiler and linker options, but I do not really get
the clue, which part of the options prevents my dll to be strong named :-(.
Any ideas?
Thank you very much,
Patrick
I am trying to build a strong named library with Visual C++.
-Therefore I am generating a key pair using
sn -k strong_name.snk
-Create a new Project in the Visual Studio: Visual C++ Projects -> .NET ->
Class Library (.NET)
in the main file I add the lines at the beginning of the file
#using <mscorlib.dll>
[assembly:System::Reflection::AssemblyVersion("1.0.0.0")];
[assembly:System::Reflection::AssemblyKeyFileAttribute("strong_name.snk")];
and put the strong_name.snk in the Project Dir (and a copy in the
Debug/Release for testing).
-after compiling I test with
sn -v strong_name.dll
which returns:
"strong_name.dll does not represent a strongly named assembly"
-compiling in the command line using
cl /LD shtrong_name.cpp /clr
and testing again with
sn -v strong_name.dll
returns:
"Assembly 'strong_name.dll' is valid"
So I searched in the compiler and linker options, but I do not really get
the clue, which part of the options prevents my dll to be strong named :-(.
Any ideas?
Thank you very much,
Patrick