473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changing project properties programmatically

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
1 3699
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Arun Bhalla | last post by:
I'm working with VS.NET 2003 and .NET 1.1 (not SP1) on Windows XP SP1. My application is using the Windows Installer Bootstrap. (I may have also installed a module which detects requirements (.NET...
2
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically...
8
by: deko | last post by:
I'm trying to find a way to set form/control properties programmatically. In a nut shell: 1. Open a database 2. Open a form in design view 3. Do something like this: For Each prp In...
2
by: Kevin McNeish [C# MVP] | last post by:
Does anyone know how to set the project constants property for "All Configurations" programmatically? The following code does this by setting each project individually: foreach...
2
by: Fred Chen | last post by:
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...
32
by: deko | last post by:
I have a popup form with a textbox that is bound to a memo field. I've been warned about memo fields so I'm wondering if I should use this code. Is there any risk with changing the form's...
1
by: sunil | last post by:
Hi, I want to change the default installation folder to my own path. I did it by changing the application folder's DefaultLocation property. The installation works fine as long the path that I...
1
by: Randy | last post by:
I've got an ASP VS 2005 project. I'm trying to figure out how to programmatically change the font of a label. From memory, this was done easily in 2003, but the Font property is read-only. Can...
2
by: chris fellows | last post by:
Can someone tell me if .NET 2.0 framework has a namespace to enable project references to be changed programmatically? My C# project files are stored in source control with DLL references but I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.