Changing project properties programmatically

F

Fred Chen

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
 
G

Gabriel Esparza-Romero [MSFT]

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.

--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top