I find that the check box “Show advanced build configuration” itself affects the result.
Here is my test code:
staticstring GetAssemblyPath(EnvDTE.Project vsProject)
{
string fullPath = vsProject.Properties.Item("FullPath").Value.ToString();
string outputPath = vsProject.ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value.ToString();
string outputDir = Path.Combine(fullPath, outputPath);
string outputFileName = vsProject.Properties.Item("OutputFileName").Value.ToString();
string assemblyPath = Path.Combine(outputDir, outputFileName);
return assemblyPath;
}
staticbool IsReliableDebug(EnvDTE.Project vsProject)
{
string DefineConstants = vsProject.ConfigurationManager.ActiveConfiguration.Properties.Item("DefineConstants").Value.ToString();
bool bReliableIsDebug = (DefineConstants.IndexOf("DEBUG") >= 0);
return bReliableIsDebug;
}
The output path retrieved by code is not same with the output path checked on UI.