Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Visual Studio 2012 fails to sign assemblies (publicKeyToken=null) when targeting Framework 2.0

$
0
0
Visual Studio 2012 fails to sign every C++\CLI assembly (publicKeyToken=null) if I target the 2.0 Framework. To do this I've also set the Visual Studio 2008 toolset for the project, because I need the compiled assembly is VC++ 9.0 runtime compatible, to avoid deploy on all my customer machine. I have none compilation or link errors, the only thing that I can see is that the publicKeyToken is always null.
To simplify thing and help the problem detection, I've made a new C++\CLI console application.
The only solution to have the assembly signed is to use the AssemblyKeyFileAttribute and specify manually the .SNK file path.
Since I'm curious and I want to understand what's wrong and prevent other side effects, I've tryed to compile manually the project using the Visual Studio Command Prompt using the same commands recorded in the project compilation log file. The command ClCompile (CL.exe), ResourceCompile (rc.exe), ManifestResourceCompile (rc.exe) works correctly whereas the command Link (link.exe) fails. The error reported by the linker is LNK1120 (_mainCRTStartup unresolved external reference).
Anyone has experienced the same problems? Anyone has any idea on how to try to compile manually the project without the LNK1120 error?
Foundamentally the problem is that I have to grant backward compatibility with older XP customer operating system (I know XP support is expired a lot of time ago), and since Visual Studio 2012 seems to support better C++\CLI intellisense (older Visual Studio C++\CLI is really bad) I want to try this new development IDE. Maybe I would migrate also to newest IDE but the problem still remain because of XP support, and each new IDE version adoption is always a bounce in the darkness.
Thank you.

Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>