从 VSPackage 部署配置文件?
我有一个 Visual Studio 扩展 (CustomTool),它依赖于 NLog 进行日志记录。我想将 NLog 配置文件部署到通过 VSPackage 安装该工具程序集的同一目录。
我查看了 Vsix 清单,但似乎找不到部署此类工件的方法。
有办法这样做吗?
更新:
显然,如果在主 VSIX 项目引用的项目上的文件上设置了“复制到输出”,则会打包该文件。但如果文件位于主 VSIX 项目中,即使已设置“复制到输出”,情况也并非如此?!有什么办法可以实现这一点吗?
I have a Visual Studio extension (CustomTool) that depends on NLog for logging. I'd like to deploy the NLog config file to the same directory that the tool's assembly gets installed to via the VSPackage.
I've looked at the Vsix manifest but can't seem to find a way to deploy such artifacts.
Is there a way to do so?
Update:
Apparently, if "Copy to Output" is set on a file on a project being referenced from the main VSIX project, it packages up the file. But this is not the case if the file is in the main VSIX project, even if "Copy to Output" has been set?! Any way to achieve that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保“生成操作”设置为“内容”并且“包含在 VSIX 中”为 True。
Make sure the Build Action is set to "Content" and "Include in VSIX" is True.