From 3898dd6d1ecd5b325dc90de0838e8fcfc7f23def Mon Sep 17 00:00:00 2001 From: Jb Evain Date: Wed, 6 Feb 2019 09:23:17 -0800 Subject: Remove NET_4_0 define; If needed we can now use the dotnet core provided one --- Test/Mono.Cecil.Tests/WindowsRuntimeAssemblyResolver.cs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'Test/Mono.Cecil.Tests') diff --git a/Test/Mono.Cecil.Tests/WindowsRuntimeAssemblyResolver.cs b/Test/Mono.Cecil.Tests/WindowsRuntimeAssemblyResolver.cs index fb39e33..6561629 100644 --- a/Test/Mono.Cecil.Tests/WindowsRuntimeAssemblyResolver.cs +++ b/Test/Mono.Cecil.Tests/WindowsRuntimeAssemblyResolver.cs @@ -68,23 +68,13 @@ namespace Mono.Cecil.Tests { void LoadWindowsSdk (string registryVersion, string windowsKitsVersion, Action 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); -- cgit v1.2.3