How to sign a C ++ / CLI project to use in C # Signed Solution?

I am using VS2012. I have my own C ++ library and a C ++ / CLI project that I created to wrap my own C ++ library. I collect projects for x64 bits.

I don't have much experience with C ++ or C ++ / CLI, this is the first project I'm trying to sign.

How I signed my C ++ / CLI project:

  • I placed my strong name in the same folder where the C ++ / CLI is located, and then I went: Right-click on the project → Configuration properties → Connector → Advanced → Key file.
  • I wrote the name of my file in the Key File: StrongNameKey.snk attribute .

It builds without errors, and I can run tests. I also have another solution that uses the resulting dll and it builds fine and passes the test. But this solution does not use signed assemblies.

Errors I get:

I have a C # solution with all its assemblies.

At first I used my C ++ / CLI DLL in this solution without signing it, and it worked mostly. But when trying to use one of the Wrapper classes in ComboBox in WPF, I had an error similar to this .

This post made me realize that I forgot to sign the C ++ / CLI assembly.

So, then I signed them as I described above, but when I tried to use the dll in my C # solution, I got a lot of errors. None of them were associated with my dll, except for 2 warnings.

18 "MSIL" "MyNamespace.MyCppCLI", "AMD64" . . , Configuration Manager, , . MyTestApp

AMD, x64. # AnyCPU.

: , 2 .

"" #, ++/CLI- ( ). ++/CLI . # , ComboBox, , , .

, .

++/CLI? ?

+4

All Articles