It is just like it says, the ComTypes.EXCEPINFO structure doesn't have the [ComVisible(true)] attribute. This was intentional. Note that this is only a warning, not an error.
It was intentional because the type library you create from your [ComVisible] C# code will always include stdole2.tlb. Which is a standard type library that declares all the common Automation types, like IDispatch and the structures it uses.
This is something you can see with Oleview.exe. Run it from the Visual Studio Command Prompt, use File + View Typelib and select your type library. Use Tlbexp.exe if you don't have it yet. You'll see the IDL that was decompiled from the type library, it has this near the top:
// TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
importlib("stdole2.tlb");
Now use File + View Typelib and select c:\windows\system32\stdole2.tlb. You'll see EXCEPINFO declared there.
Or in other words, whatever tool reads your type library will always have a declaration for EXCEPINFO. Regasm.exe just isn't smart enough to realize that, it doesn't look at imported type libraries.
Technically you can suppress the warning by adding a reference to "stdole", you'll see it on the .NET tab. And use stdole.EXCEPINFO
in your code instead. This will put the definition of EXCEPINFO in your type library. Not so sure what will happen in the tool you use that reads the type library when it sees two definitions for EXCEPINFO so it's better to just not do that. Just ignore the warning.