From efa6ff705a3ab2e0817a9e304afe4429ee6fbc9a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 18 Sep 2009 22:08:43 +0000 Subject: [PATCH] Search for SDK tools in Windows 7 SDK. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4967 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Src/Services/FileUtility/FileUtility.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs b/src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs index 4b7666ea8c..4d4ff73e19 100644 --- a/src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs +++ b/src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs @@ -131,6 +131,19 @@ namespace ICSharpCode.Core } } + static string windowsSdk70InstallRoot = null; + /// + /// Location of the .NET 3.5 SP1 SDK (Windows SDK 7.0) install root. + /// + public static string WindowsSdk70InstallRoot { + get { + if (windowsSdk70InstallRoot == null) { + windowsSdk70InstallRoot = GetPathFromRegistry(@"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0", "InstallationFolder") ?? string.Empty; + } + return windowsSdk70InstallRoot; + } + } + #endregion public static string Combine(params string[] paths) @@ -185,6 +198,10 @@ namespace ICSharpCode.Core /// The path of the executable, or null if the exe is not found. public static string GetSdkPath(string exeName) { string execPath; + if (!string.IsNullOrEmpty(WindowsSdk70InstallRoot)) { + execPath = Path.Combine(WindowsSdk70InstallRoot, "bin\\" + exeName); + if (File.Exists(execPath)) { return execPath; } + } if (!string.IsNullOrEmpty(WindowsSdk61InstallRoot)) { execPath = Path.Combine(WindowsSdk61InstallRoot, "bin\\" + exeName); if (File.Exists(execPath)) { return execPath; }