My application (C#, .NET 4.0, VS2010) references a COM dll (Adobe InDesign CS6 Type Library). When I build the application, the "interop.indesign.dll" is being generated by tlibimp and appears in obj\x86\release. However, it doesn't appear in bin\x86\release.
Only two options are available for the reference. Embed Interop-types is set to true (false results in errors) and Isolated is set to false.
Now here's the problem. The application formerly used the InDesign CS4 Type Library. On customer's request it was bumped up to CS6. The application works if InDesign CS4 and CS6 are installed on the PC. It doesn't work with only CS6 installed. This looks like there's still a reference to CS4, but I'm 100% sure, I removed everything. All references point to CS6 type library, checking the .csproj file(s) didn't show any unwanted stuff.
Is there any way to fix this other than rebuilding the whole project folder from scratch? Any help is highly appreciated.
After some more research I found the solution for my problem. The InDesign CS6 type library wasn't correctly registered. I think the InDesign installer (or InDesign itself) is the one to blame here.
To fix this problem run the following from command line:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regtlibv12.exe "C:\ProgramData\Adobe\InDesign\Version 8.0\de_DE\Scripting Support\8.0\Resources for Visual Basic.tlb"
After that, the type library was correctly registered and the application worked as expected.