How Add a COM-Exposed .NET Project to the VB6 (or VBA) References Dialog?

前端 未结 4 989
余生分开走
余生分开走 2021-01-02 05:32

I have created a .NET assembly that is exposed to COM according to the exceptional article Build and Deploy a .NET COM Assembly by Phil Wilson.

And everything works

相关标签:
4条回答
  • 2021-01-02 06:13

    Did your regasm command include the /codebase flag?

    0 讨论(0)
  • 2021-01-02 06:25

    I know this was a long time ago, but I can't find any sensible answers. I had a similar problem and the resolution was to run Visual Studio as the same user who installed it. If I run it as a different user everything except the COM registrations works.

    0 讨论(0)
  • 2021-01-02 06:25

    The Typelib registry entries will be missing in the registry. You need to use regtlibv12 [path]MyTypeLib.tlb from the Microsoft.NET\framework\ folder for the version of .NET you built the assembly with. After doing this, the additional registry entries will exist, and VBA references can find it. Alternatively for Windows 10 I use regtlib.exe [path]MyTypeLib.tlb in the windows folder You must then reharvest the asesembly for your installer so it now has the typelib entries. I personally use wix installers, and use 'heat' for this purpose. Regasm /regfile will not do it. Use heat on both the .dll and the .tlb to get both the classid and the typelib registry entries

    0 讨论(0)
  • 2021-01-02 06:33

    It doesn't give the warning if you run VS2008 under Vista, but not elevated. Elevated is the way we (Vista users) learn to always use the thing, but for this, for some reason, it likes it better the other way.

    N.B.: while elevated, mine launched some sort of install for SQL Server Tools that I was eventually able to get past, but when running not elevated, it tries to do this again and fails with permission problems. It doesn't seem to affect the actual build result, though.

    0 讨论(0)
提交回复
热议问题