【问题标题】:Where is the app.config installed for a SharpShell assembly?SharpShell 程序集的 app.config 安装在哪里?
【发布时间】:2015-04-17 14:50:04
【问题描述】:

我使用SharpShell nuget 包创建了一个shell 上下文扩展。然后我使用了ServerManager 可执行文件来帮助安装/注册我的程序集,它可以工作。

我遇到的问题是我不知道 app.config 的安装位置。我有一个想要调整的用户设置,但找不到合适的 app.config 文件。外壳扩展程序集的 app.config 究竟存储在哪里?

【问题讨论】:

    标签: c# contextmenu windows-shell sharpshell


    【解决方案1】:

    使用普通配置管理器,xxx.exe.config 文件将在主 (EXE) 程序集所在的目录中读取,而不是 DLL。

    如果有人想要一个 DLL 的配置,这会很困难。前段时间我偶然发现了这一点,我有一个基于 MS Access 的应用程序和许多其他库。其中一个需要一个配置文件。我们必须在 MS 访问应用程序目录中安装 msaccess.exe.config。不是很优雅。

    所以,在你的情况下,它可能是C:\Windows\explorer.exe.config

    另请参阅 inherit the proper app.config in a program started from context menu by SharpShell

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-05
      • 1970-01-01
      • 2017-05-29
      • 2023-03-15
      • 1970-01-01
      • 2011-01-04
      相关资源
      最近更新 更多