Browse Source

Look for SDK tools in Windows SDK 7.1

4.1
Daniel Grunwald 14 years ago
parent
commit
ae3458d900
  1. 17
      src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs

17
src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs

@ -140,6 +140,19 @@ namespace ICSharpCode.Core @@ -140,6 +140,19 @@ namespace ICSharpCode.Core
}
}
static string windowsSdk71InstallRoot = null;
/// <summary>
/// Location of the .NET 4.0 SDK (Windows SDK 7.1) install root.
/// </summary>
public static string WindowsSdk71InstallRoot {
get {
if (windowsSdk71InstallRoot == null) {
windowsSdk71InstallRoot = GetPathFromRegistry(@"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1", "InstallationFolder") ?? string.Empty;
}
return windowsSdk71InstallRoot;
}
}
#endregion
[Obsolete("Use System.IO.Path.Combine instead")]
@ -202,6 +215,10 @@ namespace ICSharpCode.Core @@ -202,6 +215,10 @@ namespace ICSharpCode.Core
/// <returns>The path of the executable, or null if the exe is not found.</returns>
public static string GetSdkPath(string exeName) {
string execPath;
if (!string.IsNullOrEmpty(WindowsSdk71InstallRoot)) {
execPath = Path.Combine(WindowsSdk71InstallRoot, "bin\\" + exeName);
if (File.Exists(execPath)) { return execPath; }
}
if (!string.IsNullOrEmpty(WindowsSdk70InstallRoot)) {
execPath = Path.Combine(WindowsSdk70InstallRoot, "bin\\" + exeName);
if (File.Exists(execPath)) { return execPath; }

Loading…
Cancel
Save