When I in VS2010 use COM reference, it generates file with name like “Interop.*.dll” and application don’t work without it. Our distribute system is very old and don’t allow filenames more than 8 symbols(dos format). So, I should somehow rename Interop.* file, but my app always tries to found this Interop.* file. I tried to rename it, add to references(with deleting COM reference). It works, but only with original Interop file.
I found one solution, but I want to find more easy way, just properly rename Interop.* file.
Error message:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘Interop.RDO, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.File name: ‘Interop.RDO, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null’
As stated in Microsoft documentation for the tlbimp util, you can specify the name of the file you want to generate for a specific COM component.
Once your interop files are generated with the correct name, you should directly reference them in your VS2010 project, instead of referencing the COM components. This should prevent Visual Studio from creating new interops for your project.