How do I expose a .netstandard2.0 library with COM?

旧街凉风 提交于 2020-03-06 09:32:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!