0

I have followed instruction from other posts and from http://msdn.microsoft.com/en-us/library/xwb8f617.aspx to give strong name to my dll, which is a native (unmanaged) C++ dll. However when it is still not strong named when I try to verify:

>sn.exe -v myStuff.dll
=> myStuff.dll does not represent a strongly named assembly

I add my .snk file to the project and added the file to Properties->Linker->Advanced->KeyFile.

How should I troubleshoot?

M W
  • 1,269
  • 5
  • 21
  • 31
  • Ok I have found that the /KEYFILE linker option is simply not taking effect. On another C++/CLI project, /KEYFILE is being used and .dll is signed properly. Why is the flag not used by the linker in my unmanaged project? – M W Jul 18 '12 at 21:04

1 Answers1

1

I thought I just read a question like this a moment ago. Someone had (rightly) stated that strong names are not applicable to native dlls.

I do hope you solve your issue, but in attempting to strongly name your native dll, you're barking up the wrong tree.

fishfood
  • 4,092
  • 4
  • 28
  • 35
  • Yes I found that out. However it still doesn't solve my problem, which is to use a native C++ dll from a managed C++/CLI wrapper dll, which will in turn be used by a C# app. – M W Jul 19 '12 at 15:40
  • I hope that you find a way forward. I'm not a C# developer, but I do have considerable experience with C++ on windows and linux platforms. Might I suggest having a look at this FAQ on MSDN: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/5df04db1-bbc8-4389-b752-802bc84148fe/ – fishfood Jul 19 '12 at 18:34
  • 1
    Thanks lapin! I did find my answer. See my related question (after suspecting I was barking up the wrong tree as you said): http://stackoverflow.com/questions/11551521/unmanaged-c-need-strong-name-to-be-referenced-by-c-cli-dll-with-strong-nam – M W Jul 20 '12 at 15:59