Permalink
Browse files

allow the users to choose .NET 4.7.1

  • Loading branch information...
adamsitnik committed Feb 22, 2018
1 parent e547f80 commit 28aa946a9a277b6c2b1166af0397134b02bedf2d
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/BenchmarkDotNet.Core/Toolchains/CsProj/CsProjClassicNetToolchain.cs
@@ -22,6 +22,7 @@ public class CsProjClassicNetToolchain : Toolchain
[PublicAPI] public static readonly IToolchain Net461 = new CsProjClassicNetToolchain("net461");
[PublicAPI] public static readonly IToolchain Net462 = new CsProjClassicNetToolchain("net462");
[PublicAPI] public static readonly IToolchain Net47 = new CsProjClassicNetToolchain("net47");
[PublicAPI] public static readonly IToolchain Net471 = new CsProjClassicNetToolchain("net471");
private static readonly IToolchain Default = Net46; // the lowest version we support
[PublicAPI]
@@ -97,6 +98,8 @@ private static IToolchain GetCurrentVersionBasedOnWindowsRegistry()
int releaseKey = Convert.ToInt32(ndpKey.GetValue("Release"));
// magic numbers come from https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx
if (releaseKey >= 461308 && Directory.Exists(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1"))
return Net471;
if (releaseKey >= 460798 && Directory.Exists(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7"))
return Net47;
if (releaseKey >= 394802 && Directory.Exists(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2"))

0 comments on commit 28aa946

Please sign in to comment.