Changing project properties programmatically

  • Thread starter Thread starter Fred Chen
  • Start date Start date
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
 
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.

--------------------
 
Back
Top