简体   繁体   English

SharpShell组合件的app.config安装在哪里?

[英]Where is the app.config installed for a SharpShell assembly?

I created a shell context extension using the SharpShell nuget package. 我使用SharpShell nuget包创建了一个外壳上下文扩展。 I then used the ServerManager executable to help install/register my assembly, and it works. 然后,我使用ServerManager可执行文件来帮助安装/注册我的程序集,它可以工作。

The problem I am running into is that I have no idea where the app.config is installed. 我遇到的问题是我不知道app.config的安装位置。 I have a user setting that I want to adjust, but I can't find the proper app.config file. 我有一个要调整的用户设置,但是找不到正确的app.config文件。 Where exactly does the app.config get stored for shell extension assemblies? shell扩展程序集的app.config到底存储在哪里?

Using the normal configuration manager, the xxx.exe.config file will be read in the directory where the main (EXE) assembly is, not the DLL. 使用普通的配置管理器,将在主(EXE)程序集而不是DLL的目录中读取xxx.exe.config文件。

This makes it difficult if someone wants a config for a DLL. 如果有人想要DLL的配置,这将变得很困难。 I stumbled about this some time ago, where I had an application based on MS Access with many additional libraries. 前段时间,我偶然发现了一个基于MS Access的应用程序,其中包含许多其他库。 One of them needed a config file. 其中之一需要配置文件。 We had to install a msaccess.exe.config in the MS access application directory. 我们必须在MS Access应用程序目录中安装msaccess.exe.config。 Not very elegant. 不太优雅。

So, in your case it probably will be C:\\Windows\\explorer.exe.config 因此,在您的情况下,可能是C:\\Windows\\explorer.exe.config

See also inherit the proper app.config in a program started from context menu by SharpShell 另请参见在SharpShell从上下文菜单启动的程序中继承适当的app.config

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM