tlh file contains #include ""

Hello,

I have a managed dll and inthe post build event, i have

%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\regasm.exe /tlb:$(ProjectDir)$(TargetName).tlb $(TargetPath)
copy /y $(TargetPath) $(ProjectDir)

When i import this tlb in the VC project with

#import "C:\development\MyManagedAssembly.tlb"

while compiling it, i get an error

Error 27 fatal error C1083: Cannot open include file: '': No such file or directory c:\development\MyManagedAssembly.tlh 11

In the tlh file, the #include is "". here is the line from the tlh file

//

// Cross-referenced type libraries:

//

#include ""

//

Why is this empty #include coming from What part am i missing

Any help will be appreciated..i am not much into VC++.

Thanks

-Rupreet




Answer this question

tlh file contains #include ""

  • Electronic Screw

    The .tlh file is generated by the compiler from the .tlb file when you #import it. Obviously, it is confused about the contents of the .tlb file. Something along the lines of seeing that your assembly references another COM component or tool library but not being able to find it.

    To help you debug this, use the OleView.exe tool. You'll find it in c:\PF\MSVS8\Common7\Tools\Bin. Click File + View Typelib and open C:\development\MyManagedAssembly.tlb. Look for importlib() statements. If you can't make heads nor tail of it, copy the text for the right pane and post it to this thread.


  • tlh file contains #include ""