I lost a lot of valuable time because of this problem, so I thought to share the solution that I got as a combination of other solutions posted by people who are more expert than me in this field.
Hope this saves some time for some of you.
- If your assembly is a third party assembly and you can not access it, or ask for a signed version from its provider, then you can use the solution here: Adding a Strong Name to a Third-Party Assembly .
- If you have the C++/CLI project, you can use the same file used for signing the project you are trying to reference to this C++/CLI. This is usually an .snk file. use this file and follow the steps here: How to sign C++/CLI assemblies with a strong name. If this still doesn't work continue to the next point.
- the answer of user634175 , on this link : Is there an easy way to sign a C++ CLI assembly in VS 2010? solved it to me in combination with the previous step.
<Project DefaultTargets="Build" ToolsVersion="4.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- snip -->
<ItemDefinitionGroup>
<Link>
<KeyFile>$(LinkKeyFile)</KeyFile>
</Link>
</ItemDefinitionGroup>
</Project>
Hope this saves some time for some of you.
No comments:
Post a Comment