是否可以从网络驱动器加载 VSTO 插件的实例?

发布于 2024-09-27 11:29:49 字数 621 浏览 0 评论 0原文

我有一个 VSTO 3.0 Word 插件。在这里,他们在网络驱动器上完成所有工作(出于备份原因等)。

不管怎样,当我在 IDE 中时,我可以运行我的项目,它会自动启动 Word,我可以调试、中断等,就好了。

但是...如果我编译项目,然后在 ide 外部运行 Word,Addin 注册表项当然仍然指向 VSTO dll 的网络副本,而不是本地计算机(C 驱动器)副本,并且插件总是加载失败。

我可以将 DLL 复制到本地计算机,更新注册表以指向 C: 位置,然后运行 ​​word,它可以正常加载。

但我想知道是否有任何方法可以配置 VSTO 以便能够直接从网络共享加载插件。

我尝试在 Word 2010 中设置“受信任位置”以指向我的网络位置,但没有帮助。

这样做的唯一奇怪之处是,当我设置 VSTO_SUPPRESSDISPLAYALERTS=0 时,我从 Word 返回的错误消息包含 file://j:/path/path/path 的路径,即映射的驱动器号。

但是,当我尝试将 j:\path 位置添加到 word 中的“受信任位置”时,它总是将其转换为完整的路径规范,即 \domain\dfs\path\path。

我想知道这种不匹配是否是造成问题的原因,但我无论如何也找不到它。

I've got a VSTO 3.0 Word Addin. Around here, they do all work off network drives (for backup reasons, etc etc).

Anyway, when I'm in the IDE, I can run my project, it automatically starts Word, i can debug, break, etc, just fine.

HOWEVER... If I compile the project, then run Word OUTSIDE of the ide, the Addin registry entry is, of course, still pointing to the NETWORK copy of the VSTO dll, not a local machine (C Drive) copy, and the addin always fails to load.

I can copy the DLL down to the local machine, update the registry to point to the C: location, and then run word and it loads fine.

But I was wondering if there's any way to config VSTO to be able to load an addin from a network share directly.

I've tried setting the "TRUSTED LOCATIONS" in Word 2010 to point to my network location, but it didn't help.

The only oddity in doing so is that the error message I get back from Word when I have VSTO_SUPPRESSDISPLAYALERTS=0, contains a path of file://j:/path/path/path, ie a mapped drive letter.

BUT, when I try to add the j:\path location to my "trusted locations" in word, it always converts it to a full pathspec, ie \domain\dfs\path\path.

I'm wondering if that mismatch is what's screwing it up, but I can't find anyway around it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绮烟 2024-10-04 11:29:49

嗯,据我所知,如果不在 IDE 中运行插件,就不可能将它们加载到网络驱动器上。如果有人出现并且知道其他情况,我很想知道,但我会继续并暂时将这个问题标记为关闭。

本质上,我所做的就是创建一个小 REG 脚本,将添加项重新注册为指向本地驱动器,然后,当我需要作为版本运行(即不在 VS IDE 中)时,我编译、复制 dll本地下载,然后运行regscript。不是很好,但也不算太差。

Well, as far as I can tell, it's just not possible to load addins on a network drive without running them in the IDE. If someone comes along and knows otherwise, I'd love to know, but I'll go ahead and mark this question closed for now.

Essentially, what I've done is create a little REG script that reregisters the add in to point to the local drive, then, when I need to run as a release (ie NOT in the VS IDE), I compile, copy the dll down locally, and run the regscript. Not great, but not too bad either.

错々过的事 2024-10-04 11:29:49

请参阅此处的注册表项以启用网络加载项的 VSTO 4 加载:安装 VSTO 4.0 导致 VSTO 3.0 插件停止工作

See the registry key to enable VSTO 4 loading of network add-ins here: Installing VSTO 4.0 Causes VSTO 3.0 Addin to quit working

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文