如何调试具有使用 app.config 文件的 .net 互操作项目的 VB6 项目? [英] How can I debug a VB6 project that has a .net interop project which uses an app.config file?

查看:41
本文介绍了如何调试具有使用 app.config 文件的 .net 互操作项目的 VB6 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 app.config 文件的 .net 互操作项目.当我在调试模式下运行使用互操作控件的 VB6 项目时,ConfigurationManager 找不到 app.config 文件.当我把VB6项目做成exe文件,把app.config文件重命名为(VB6二进制文件名).exe.config后,ConfigurationManager就可以找到这个文件了.

I have a .net interop project that uses an app.config file. When I am running the VB6 project that is using the interop control in Debug mode, the ConfigurationManager cannot find the app.config file. When I make the VB6 project into an exe and rename the app.config file to (VB6 binary name).exe.config, the ConfigurationManager can find the file.

有没有办法重命名 app.config 文件或更改设置,以便在 VB6 在调试模式下运行时 ConfigurationManager 可以找到 app.config 文件?

推荐答案

一个肮脏的黑客是将 app.config 文件放入 VB6 文件夹并将其重命名为 vb6.exe.config

A dirty hack is to place the app.config file into the VB6 folder and rename it to vb6.exe.config

这篇关于如何调试具有使用 app.config 文件的 .net 互操作项目的 VB6 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆