title: How to get expanded path from EnvDTE / VCProjectEngine
body: <p>I am trying to write a tool to create a zip file containing all PDBs files from one Visual Studio 2010 solution.</p>
  
  <p>I can get every PDB filepath in the solution with the following code. However, the property value contains Visual Studio macro like $(TargetDir), $(TargetName) and so on.</p>
  
  <p>Is there a function in the EnvDTE API to expand those macros to their current values ?</p>
  
  <p>On the other hand, any other methods that would achieve my initial goal are also welcome !</p>
  
  <p>Thanks</p>
  
  <pre><code>        System.Type t = System.Type.GetTypeFromProgID("VisualStudio.DTE.10.0");
          object obj = Activator.CreateInstance(t, true);
          DTE dte = (DTE)obj;
          Solution sln = dte.Solution;
          sln.Open(args[0]);
          while (sln.IsOpen == false)
          {
              System.Threading.Thread.Sleep(100);
          }
  
          sln.SolutionBuild.SolutionConfigurations.Item("Release").Activate();
  
          foreach (EnvDTE.Project project in sln.Projects)
          {
              Console.WriteLine("Inspecting project {0}", project.Name);
  
              VCProject vcproj = (VCProject)project.Object;
  
              if (vcproj == null) // this is not a visual c++ project
                  continue;
  
              IVCCollection cfgs = vcproj.Configurations;
              VCConfiguration cfg = cfgs.Item(1);
              VCLinkerTool tool = cfg.Tools("VCLinkerTool");
              if (tool == null) // this is not a DLL/EXE project
                  continue;
              Console.WriteLine("Program database = " + tool.ProgramDatabaseFile);
          }
  </code></pre>