问题
I have a dotnet core library, a framework 4.7.2 library and a vb6 application. I want to write a common library for them both to access and so choose .netstandard2.0 I tried using the 4.7.2 framework wrapper library between .netstandard2.0 library and vb6. However I ran into assembly binding problems
Looking at the docs I see
In .NET Core, the process for exposing your .NET objects to COM has been significantly streamlined in comparison to .NET Framework.
However no mention .netstandard2.0
I decided to try following the docs anyway even though my project is using .netstandard2.0
I got up to the instructions on Generating the COM Host in which case the output files ProjectName.dll, ProjectName.deps.json, ProjectName.runtimeconfig.json and ProjectName.comhost.dll should build.
However the ProjectName.comhost.dll and ProjectName.runtimeconfig.json do not create.
I see in this dotnet standard issue that Microsoft plans on having tooling support in "Preview 4"
I am running VS 16.4.5
来源:https://stackoverflow.com/questions/60540720/how-do-i-expose-a-netstandard2-0-library-with-com