Why is my C ++ subscription not signed?

I have a C ++ project installed in /clr referenced by C # projects in the same solution. Unfortunately, it seems that C ++ is not getting the signature properly, which leads to the error message "The assembly does not have a strong name." ( sn.exe is consistent with this error.)
However, there is a snk file (Linker / Advanced) in the project settings, so it must be signed. In addition, all project settings look the same as in another C ++ project in the same solution - where everything works.

One thing I discovered after tearing my hair for hours:
When you remove the /NOLOGO for the linker, it becomes apparent that the linker is called twice. I have no idea why this could be. Now in the project that works, the linker receives the transmitted snk file at the command line ( /KEYFILE: for both calls, in the one that does not work, the second call does not receive the transferred snk file.

Why will the linker be called twice? What determines that it does not receive the snk file passed in the second call?

+6
source share
1 answer

Ok, I found a solution: apparently, MS released the SP1 release for VS2010, and you need to go and get confused in the MSBUild installation folder. Here 's an article that presents dirty details.

(And why it will work in one project, but not in another, which I have no idea about. And, frankly, I have lost enough hours by banging my head on this wall and will not investigate further.)

+9
source

Source: https://habr.com/ru/post/898146/


All Articles