Browse Source

Prompt user to install Microsoft Build Tools 2013 when opening project with ToolsVersion=12.0.

Closes #395: Tools v12 not supported.
pull/403/head
Daniel Grunwald 12 years ago
parent
commit
1621a04324
  1. 15
      src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs

15
src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs

@ -1231,6 +1231,21 @@ namespace ICSharpCode.SharpDevelop.Project @@ -1231,6 +1231,21 @@ namespace ICSharpCode.SharpDevelop.Project
try {
LoadProjectInternal(loadInformation);
} catch (InvalidProjectFileException ex) {
if (ex.ErrorCode == "MSB4132") {
if (UpgradeToolsVersion(loadInformation)) {
// successful upgrade has loaded the project
} else if (projectFile != null && projectFile.ToolsVersion == "12.0") {
// ToolsVersion 12.0 not found: the user needs to install Microsoft Build Tools 2013
throw new ToolNotFoundProjectLoadException(ex.Message, ex) {
Description = "Microsoft Build Tools 2013 are necessary for opening Visual Studio 2013 solutions.",
LinkTarget = "http://www.microsoft.com/en-us/download/details.aspx?id=40760"
};
} else {
throw;
}
} else {
throw;
}
if (!(ex.ErrorCode == "MSB4132" && UpgradeToolsVersion(loadInformation))) {
throw;
}

Loading…
Cancel
Save