作者:hK手机用户2927565637qq | 来源:互联网 | 2023-05-17 09:03
IamwritingaVS2008add-inthatconnectstoaremotedatabaseblahblah.我正在写一个连接到远程数据库的VS2008加载项等
I am writing a VS2008 add-in that connects to a remote database blah blah.
我正在写一个连接到远程数据库的VS2008加载项等等。
I am having a problem with the app.config in this project. When I use SubSonic in my code, it moans that is cannot find the SubSonicServer section. This is because the .config file cannot be found. This appears to a problem with paths as the add-in is a DLL running in the context of VS2008 and the working directory is C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE.
我在这个项目中遇到app.config问题。当我在我的代码中使用SubSonic时,它无法找到SubSonicServer部分。这是因为找不到.config文件。这似乎是路径的问题,因为加载项是在VS2008的上下文中运行的DLL,并且工作目录是C:\ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE。
Is there a way to get the app.config to deploy properly with the application so my add-in (and SubSonic) can find what it needs in the .config file, or is there a way to get SubSonic to work without the need for the .config?
有没有办法让app.config与应用程序正确部署,这样我的插件(和SubSonic)可以在.config文件中找到它需要的东西,或者有没有办法让SubSonic无需工作.config?
I am very experienced in SubSonic projects now, but only winforms, web, web service, and WPF applications. This is the first time I have tried to use SubSonic in a VS2008 Add-In project. I also have AppSettings in the config file which the ConfigurationManager cannot read because it cannot see the .config file.
我现在在SubSonic项目方面经验丰富,但只有winforms,Web,Web服务和WPF应用程序。这是我第一次尝试在VS2008加载项项目中使用SubSonic。我在配置文件中也有AppSettings,ConfigurationManager无法读取,因为它无法看到.config文件。
2AM now and brain is tired of trying to figure this one out. Hopefully there is an answer when I wake up :)
现在凌晨2点,大脑已经厌倦了试图解决这个问题。希望我醒来时有一个答案:)
TIA
2 个解决方案