There are a bunch of DTE classes that expose a Properties collection property such as:
EnvDTE.Project.Properties
EnvDTE.ProjectItem.Properties
EnvDTE.Configuration.Properties
The properties collection are not typed because they depend on the project type, language and so on. Unfortunately there is no documentation in the MSDN for the list of collection property names.
So you basically end up doing something like this:
public void GetPropertyValues(EnvDTE.Properties properties)
{
foreach(EnvDTE.Property property in properties)
{
try
{
Debug.WriteLine(
string.Format("Property Name: {0} - Property Value: {1}",
property.Name, property.Value.ToString));
}
catch
{
}
}
}
And once you find the one that you want, you do:
ProjectItem.Properties.Item("PropertyName").Value ...
But with the help of Reflector you can reflect the following interfaces to get a list of property names:
For project item properties:
VSLangProj.FileProperties
VSLangProj.FolderProperties
VSLangProj80.FileProperties2
VSLangProj80.FolderProperties2
For project properties:
VSLangProj.ProjectProperties
VSLangProj2.ProjectProperties2
VSLangProj80.ProjectProperties3
VSLangProj.ProjectConfigurationProperties
VSLangProj2.ProjectConfigurationProperties2
VSLangProj80.ProjectConfigurationProperties3
Pablo