1
votes

Trying to build a project that uses managed C++/CLI and it compiles successfully when in the 64-bit build config. When I switch to Win32 config it fails siting the managed C++/CLI dll is not a strong named assembly. When switching configs I have verified that both have the Project -> Configuration Properties -> Linker -> Advanced -> Key File entry has the proper path to the snk file ($(SolutionDir)key.snk)

Not sure if I'm missing something here. I haven't been able to find anything on Google...

[UPDATE]

If I use a post build event in the C++/CLI project the output window shows the following error:

c:\path\file.dll does not represent a strongly named assembly

I'm using the following post build event:

sn -Ra "$(TargetPath)"  "$(SolutionDir)key.snk"

Again - the above post build event works on the x64 config but not the win32. (I have tried compiling on both 32-bit & 64-bit machines w/ same result)

1

1 Answers

1
votes

Just ran into the same problem today, after some digging it looks like this is caused by a bug introduced in Microsoft Visual Studio 2010 SP 1.

A description of what caused the bug and a workaround can be found at the following link:

http://blogs.msdn.com/b/vcblog/archive/2011/03/11/10140139.aspx