3
votes

My .net project references a COM type library which I registered on my developer machine(I don't have control over this one). It looks like VS2010 generates interop assemblies on the fly - 2 different(they really differ) for Release and Debug. These are put in /obj/Release and /obj/Debug folders respectively. The thing is that the COM library is not and should not be registered on the build machine.

What are my options here? I don't feel like putting the /obj/Release(Debug) folders with the interop assemblies under source control. If I have to do that I would like to change the paths but I don't see any way to do that.

If I have to use tlbimp to generate the IA's myself how do I generate the 2(Debug and Release) versions?

1

1 Answers

4
votes

You can create an interop assembly manually by using tlbimp.exe, and then reference those assemblies instead of the actual COM library. This means Visual Studio does not have to generate the interop-assemblies and you have full control over them. You would have to check these in of course, but then you can put them anywhere you want.

Edit:

Since the interop assembly contains only metadata, that is to say no executable code, there should be no difference between a "Release" or "Debug" build, in fact tlbimp.exe does not have options to specify either.