You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
@@ -68,23 +68,13 @@ namespace Mono.Cecil.Tests {
|
||||
|
||||
void LoadWindowsSdk (string registryVersion, string windowsKitsVersion, Action<string> registerAssembliesCallback)
|
||||
{
|
||||
#if NET_4_0
|
||||
using (var localMachine32Key = RegistryKey.OpenBaseKey (RegistryHive.LocalMachine, RegistryView.Registry32)) {
|
||||
using (var sdkKey = localMachine32Key.OpenSubKey (@"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v" + registryVersion)) {
|
||||
#else
|
||||
{
|
||||
// this will fail on 64-bit process as there's no way (other than pinoke) to read from 32-bit registry view
|
||||
using (var sdkKey = Registry.LocalMachine.OpenSubKey (@"SOFTWARE\Microsoft\Microsoft SDKs\Windows\" + registryVersion)) {
|
||||
#endif
|
||||
string installationFolder = null;
|
||||
if (sdkKey != null)
|
||||
installationFolder = (string)sdkKey.GetValue ("InstallationFolder");
|
||||
if (string.IsNullOrEmpty (installationFolder)) {
|
||||
#if NET_4_0
|
||||
var programFilesX86 = Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86);
|
||||
#else
|
||||
var programFilesX86 = Environment.GetEnvironmentVariable ("ProgramFiles(x86)");
|
||||
#endif
|
||||
installationFolder = Path.Combine (programFilesX86, @"Windows Kits\" + windowsKitsVersion);
|
||||
}
|
||||
registerAssembliesCallback (installationFolder);
|
||||
|
||||
Reference in New Issue
Block a user