Memi.Reflection

Private members of memi's thoughts

Design Time Directory in VS 2005

I'm currently working on some design time editors, which need to read configuration settings from the web.config / app.config files, located in the main project folder.

The main problem is to find the directory of the project. There are some good posts about it, like here and here, but alas, they are all good only for VS 2003. I couldn't find any info about implementing such a functionality in VS 2005.

Do you know of any source available regarding this issue?

Posted: Mar 20 2005, 09:24 PM by memi | with 4 comment(s)
Filed under:

Comments

AndrewSeven said:

The EnvDTE is still there, you could use it to explore the project properties a bit or try some of the other d-t services.


# March 20, 2005 6:27 PM

Simon Calvert said:

In VS2005, you'll be able to get to config easily, and use the strongly-typed management APIs on configuration.

IWebApplication webApp = (IWebApplication)Component.Site.GetService(typeof(IWebApplication));
if (webApp != null)
Configuration config = webApp.OpenWebConfiguration(true);

Simon
ASP.NET
# March 21, 2005 12:27 PM

Memi Lavi said:

Hi Simon.

Thanks for the info.
Perhaps I'm missing something, but I can't find any reference to the Component object in the code. In addition, I'm talking about WinForms application, and not Web Application.

To clarify: I'm trying to get this info in the EditValue method of my custom UITypeEditor.
Do you know how do I get this info there?
# March 22, 2005 1:52 PM

Howard van Rooijen's Blog said:

I was working on some proof of concept web controls this weekend; my team has just started work on a...
# May 29, 2006 10:46 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)