By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,742 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,742 IT Pros & Developers. It's quick & easy.

Changing project properties programmatically

P: n/a
Hi,

I've created a custom component. I want one of the properties of my
custom component to be the output file name which is found in project
properties. I know that I can get this by writing a macro, but I
would prefer doing this in my component's constructor.

Currently I am trying to use ActiveSolutionProjects in the EnvDTE
object to obtain the active project but it always returns an empty
object.

Does anyone know how I can get the current project output file name
without using a macro?

Thanks,
Fred
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Fred

Is your component an AddIn? how are you getting the EnvDTE object?

If you run the same code as a macro do you get an object back?

Another way to get to the projects is by using the EnvDTE.Solution.Projects property.

--------------------
From: fr*******@yahoo.ca (Fred Chen)
Newsgroups: microsoft.public.vsnet.ide,microsoft.public.dotnet .general
Subject: Changing project properties programmatically
Date: 21 Jul 2003 14:33:02 -0700
Organization: http://groups.google.com/
Lines: 16
Message-ID: <f5**************************@posting.google.com >
NNTP-Posting-Host: 199.93.176.11
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1058823183 13945 127.0.0.1 (21 Jul 2003 21:33:03 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: 21 Jul 2003 21:33:03 GMT
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03! sn-xit-01!sn-xit-09!supernews.com!postnews1.google.com!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:101963 microsoft.public.vsnet.ide:7087
X-Tomcat-NG: microsoft.public.dotnet.general

Hi,

I've created a custom component. I want one of the properties of my
custom component to be the output file name which is found in project
properties. I know that I can get this by writing a macro, but I
would prefer doing this in my component's constructor.

Currently I am trying to use ActiveSolutionProjects in the EnvDTE
object to obtain the active project but it always returns an empty
object.

Does anyone know how I can get the current project output file name
without using a macro?

Thanks,
Fred


--
Gabriel Esparza-Romero, Visual C# Team
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.