对于完整的 .NET 项目,您可以在 Project Properties > 中勾选一个框以使项目 COM 可见.应用程序选项卡 >装配信息..:
For a full .NET project you can tick a box to make the project COM Visible in Project Properties > Application tab > Assembly Information..:
但是,.NET Standard 项目不存在 Assembly Information.. 按钮,而是在 Project Properties > 中输入数据.包选项卡,但该选项卡没有Make Assembly COM-Visible 的复选框:
However, the Assembly Information.. button doesn't exist for .NET Standard projects, instead that data is entered on the Project Properties > Package tab, but that tab doesn't have a checkbox for Make Assembly COM-Visible:
您是否仍然可以通过其他方法使 .NET Standard 库 COM 可见,或者出于某种原因这样做没有意义?
Can you still make .NET Standard libraries COM Visible by some other method, or does it not make sense to do that for some reason?
推荐答案我在 GitHub 上评论了您的问题.您绝对可以使 .NET Standard 库 COM 可见,前提是您选择的运行时同时支持 .NET Standard 和 COM 可见性.
I commented on your issue at GitHub. You can definitely make .NET Standard libraries COM visible, provided the runtime you choose supports both .NET Standard and COM visibility.
以下是使用 Visual Studio 2017 和 WiX 的示例:ComVisibleNetStandard
Here's an example using Visual Studio 2017 and WiX: ComVisibleNetStandard
更多推荐
使 .NET Standard 库 COM 可见?
发布评论