There are some c++ projects(vcxproj) in my solution those really interop projects. All was fine until I tried to re-build them for .net v3.5 (they initially target .net v4.5)
I changed the version string to "v3.5" in the project files, changed the path for ilasm to
‘C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe’
and all looks fine.
I built these projects, made a msi package and tried to install it, but got this error:
Assembly Install: Failing with hr=8013141a
Assembly Error:Strong name signature verification failed for assembly '%1'. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key.
Product: MY_PROJECT -- Error 1937. An error occurred during the installation of assembly 'MY_PROJECT.Interop,Version="5.3.0.0",Culture="neutral", PublicKeyToken="0DC6B9046BBF1D8A",ProcessorArchitecture="MSIL"'. The signature or catalog could not be verified or is not valid. HRESULT: 0x80131045. assembly interface: IAssemblyCacheItem, function: Commit, component: {84C66D06-D31F-536F-B79F-71F7E5F4BFE3}
I checked my configuration. I use Visual Studio 2013 and VS 2010 is installed too, and some SDKs. VS 2013 uses OLD version of SN for signing my projects and this old version is located in the "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\sn.exe"
Just for case I changed the path to sn tool 4.5: "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\sn.exe"
and my interop files were installed without any issue!
this is a sequence I use for creating key files:
sn.exe -m
sn.exe -k CONTAINER-Authenticode.snk
sn.exe -i CONTAINER-Authenticode.snk CONTAINER
sn.exe -pc CONTAINER CONTAINER-Authenticode.pbk
Added system variables SN_ContainerName=CONTAINER; SN_Option=-Rc
The my question is, why is that, what version of SN should I use, where can I read something about that, and where can I made any error.
User contributions licensed under CC BY-SA 3.0