I am exporting DLL to a typelib(.tlb) using
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe" $(TargetDir)Project.dll /tlb:com.Project.tlb /codebase
It is getting registered succesfully.I look in typelib using liewiewer,all method declaration was proper.
But if I add any new method in DLL project and rebuild/clean .tlb file seems to be not getting updated with newely added methods.
Please let me know what I am missing?
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe" $(TargetDir)Project.dll /tlb:com.Project.tlb /codebase
It is getting registered succesfully.I look in typelib using liewiewer,all method declaration was proper.
But if I add any new method in DLL project and rebuild/clean .tlb file seems to be not getting updated with newely added methods.
Please let me know what I am missing?

Praneeth KumarRank #4,422 · 344 reputationPosted Jun 10, 2011, 3:47 AM EDT
I know it sounds funny but I have faced this problem and I feel its cause Microsoft picks up stuff from Temp files. A build error clears the cached stuff and hoping it will help you fix.
Rahul M9 reputationPosted Jun 10, 2011, 4:27 AM EDT
Praneeth KumarRank #4,422 · 344 reputationPosted Jun 10, 2011, 5:44 AM EDT
The thing you want to watch out for (and the real reason for this post) is that if you used the /tlb option to register a type library, you need to make sure you include the /tlb option when unregistering. If you don't, only the COM object is unregistered, but the type library is still registered. And you can't unregister the type library by itself.
if the above does not work, can you try putting the dll in a different location and try registering from there??
Sam HobbsRank #107 · 20.5K reputationPosted Jun 10, 2011, 9:51 AM EDT