Last post Jun 10, 2016 05:25 AM by Chris Zhao
Jun 09, 2016 03:17 PM|dudisreenath|LINK
I am working on c# application. and I come to know that we are using below 5 dlls as a references in that application.
I got an request to add dll "SHDocVw.dll" in addition to above dlls.So I have downloaded from net "SHDocVw.dll," (6.1.7601.18222) .. So I have added this reference into our project.
Once I add this dll and build the code ,I got below error.
error CS1704: An assembly with the same simple name 'Interop.SHDocVw, Version=126.96.36.199, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side.
Please kindly help me to resolve this error.
Jun 10, 2016 05:25 AM|Chris Zhao|LINK
This error points out that two references have the same assembly identity because the assemblies in question lack strong names, they were not signed, and thus the compiler has no way of distinguishing between them in metadata. Thus, the run time ignores
the version and culture assembly name properties. The user should remove the redundant reference, rename one of the references, or provide a strong name for them.
reference: Compiler Error CS1704
Try setting the debugger options to use the legacy debug engine: Tools -> Options -> Debugging -> General: check both "Use the legacy C# and VB expression evaluators" and "Use Managed Compatibility Mode".