gpt4 book ai didi

c# - Word 插件不读取 appSetting

转载 作者:太空狗 更新时间:2023-10-29 23:19:25 26 4
gpt4 key购买 nike

我已经构建了一个与公司内部网交互的简单单词插件。

出于某种原因,我似乎无法让插件从其配置文件中读取 appSettings。

是否有一些基本的东西不允许 office 插件像普通的 .Net 应用程序一样读取配置文件?

干杯

最佳答案

这个线程帮助了我:

https://connect.microsoft.com/VisualStudio/feedback/details/653444/visual-studio-sp1-or-specifically-vsto-sp1-issue-with-config-file-location

特别是,这为我解决了问题:

You'll need to make the change in your deployment project, not in the .vsto or .manifest files. Specifically, you need to change the string written in the "Manifest" registry value. For example, the walkthrough in this article directs you to set the "Manifest" value to "[TARGETDIR]ExcelAddIn.vsto|vstolocal": http://msdn.microsoft.com/en-us/vsto/ff937654.aspx. To satisfy the new URI scheme requirement for Fast Path loading, you actually need to set the value to "file:///[TARGETDIR]ExcelAddIn.vsto|vstolocal".

关于c# - Word 插件不读取 appSetting,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1671587/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com