No typelib generated


namespace interfaces

{

  [system.runtime.interopservices.comvisible(true)]

  public interface ibaseballstats

  {

    double calcbattingavg(int atbats, int hits);

   }

}

i have 1 interface declared in project has "make assembly com-visible" , "register com interop" check boxes checked. when build app, warning saying dll "does not contain types can registered com interop". expecting see type lib file created in bin directory.

why warning , no tlb file? thx in advance.

todd

this documented in msdn or perhaps kb somewhere.  tlbexp not generate tlb unless have @ least 1 com visible class.  since assembly contains com visible interfaces tlbexp not generate tlb.  create dummy com class nothing interface generated.  alternatively create idl file hand , use midl generate necessary code generate tlb dummy class easier. 

i'm not sure why tool works way pretty rare have interface com assembly.  have @ least 1 com class com client can create.  although separating interfaces implementations thing current tool won't work properly.

michael taylor - 5/11/06



.NET Framework  >  Common Language Runtime Internals and Architecture



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'