Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scale-tone/dotnet-8-itypeinfo-issue


https://github.com/scale-tone/dotnet-8-itypeinfo-issue

Last synced: 15 days ago
JSON representation

Awesome Lists containing this project

README

        

# dotnet-8-itypeinfo-issue

Demonstrates the issue whereas a .NET8-based custom user control cannot be inserted into VBA forms.

Contains a WinForms Control Library built with .Net Framework 4.8 and its exact replica (with all GUIDs and ProgIds preserved) built with .NET 8. Type Library from the first project is also injected into the second one via \ directive.

## How to use

1. Run Visual Studio *as administrator*.
2. Open and build the `DotNetFramework\TinoTestWindowsFormsControlLibrary` project.
3. Open VBA editor in Word or Excel:

4. At this point the `TinoTestWindowsFormsControlLibrary.TinoTestUserControl` custom control should become available. Insert it onto a form:






6. Observe the .Net Framework-based control working:

7. Open and build the `DotNET\TinoTestWindowsFormsControlLibrary` project.
8. Manually put the full path to .NET-based control's shim file into the `InprocServer32` Registry Key:

![image](https://github.com/scale-tone/dotnet-8-itypeinfo-issue/assets/5447190/5143dcdd-24a8-4c1a-b84c-7ab7310bebe4)

10. Restart Word/Excel and reopen its VBA editor.
11. Place the control onto a form again.
12. Observe that now the .NET-based control is successfully instantiated:

but then the editor fails with `0x80131165 TypeLib not registered` error: