diff options
Diffstat (limited to 'src/qtprojectlib/QtProject.cs')
-rw-r--r-- | src/qtprojectlib/QtProject.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/qtprojectlib/QtProject.cs b/src/qtprojectlib/QtProject.cs index d05a22b8..9fd860d0 100644 --- a/src/qtprojectlib/QtProject.cs +++ b/src/qtprojectlib/QtProject.cs @@ -2840,7 +2840,29 @@ namespace QtProjectLib var cur_platform = conf.Platform as VCPlatform; if (cur_platform.Name == activePlatformName) { var cur_solution = conf.ConfigurationName + "|" + cur_platform.Name; +#if VS2013 || VS2015 + // In VS2013/15, if the LocalDebuggerEnvironment property is defined, it + // will be stored in the .user file before the QTDIR property, which is an + // error because there is a dependency. To work around this, first remove + // the property and then add it after QTDIR is defined. + string debuggerEnv = propertyAccess.GetPropertyValue( + "LocalDebuggerEnvironment", cur_solution, "UserFile"); + if (!string.IsNullOrEmpty(debuggerEnv)) { + var debugSettings = conf.DebugSettings as VCDebugSettings; + if (debugSettings != null) { + //Get original value without expanded properties + debuggerEnv = debugSettings.Environment; + } + propertyAccess.RemoveProperty( + "LocalDebuggerEnvironment", cur_solution, "UserFile"); + } +#endif propertyAccess.SetPropertyValue("QTDIR", cur_solution, "UserFile", qtDir); +#if VS2013 || VS2015 + if (!string.IsNullOrEmpty(debuggerEnv)) + propertyAccess.SetPropertyValue( + "LocalDebuggerEnvironment", cur_solution, "UserFile", debuggerEnv); +#endif } } |