PC Review


Reply
Thread Tools Rate Thread

Changing project properties programmatically

 
 
Fred Chen
Guest
Posts: n/a
 
      21st Jul 2003
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
 
Reply With Quote
 
 
 
 
Gabriel Esparza-Romero [MSFT]
Guest
Posts: n/a
 
      22nd Jul 2003
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: (E-Mail Removed) (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: <(E-Mail Removed)>
>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: groups-(E-Mail Removed)
>NNTP-Posting-Date: 21 Jul 2003 21:33:03 GMT
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.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-mail
>Xref: 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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing File "Summary" Properties Programmatically hutteto Microsoft Excel Programming 15 5th Jan 2011 05:18 PM
Changing project references programmatically chris fellows Microsoft Dot NET 4 3rd Jan 2008 02:43 PM
Set project configuration properties programmatically cyberco Microsoft Dot NET Compact Framework 0 15th Aug 2007 10:14 AM
Changing Properties in Tools / Options Programmatically =?Utf-8?B?S2V2aW4=?= Microsoft Outlook VBA Programming 1 30th Jul 2004 08:05 PM
Changing print properties programmatically =?Utf-8?B?S2Vubnk=?= Microsoft ASP .NET 1 20th Jan 2004 07:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:12 AM.