From 366e0dbfe32dd178b7e1fdb26f638f072aa2ccc4 Mon Sep 17 00:00:00 2001 From: Oren Novotny Date: Wed, 5 Jun 2019 09:28:55 -0400 Subject: [PATCH] Latest version of VS first --- ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs b/ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs index 5fbada99e..878423e4f 100644 --- a/ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs +++ b/ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs @@ -193,7 +193,8 @@ namespace ICSharpCode.Decompiler.Tests static string FindMSBuild() { - string vsPath = MSBuildLocator.QueryVisualStudioInstances(new VisualStudioInstanceQueryOptions { DiscoveryTypes = DiscoveryType.VisualStudioSetup }) + string vsPath = MSBuildLocator.QueryVisualStudioInstances(new VisualStudioInstanceQueryOptions { DiscoveryTypes = DiscoveryType.VisualStudioSetup }) + .OrderByDescending(i => i.Version) .FirstOrDefault() ?.MSBuildPath; if (vsPath == null)