diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index f7cf877dd8..b8e4bdf82d 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -109,8 +109,15 @@ static Tester() #else testRunnerBasePath = Path.Combine(TesterPath, "../../../../../ICSharpCode.Decompiler.TestRunner/bin/Release/net8.0"); #endif - packagesPropsFile = Path.Combine(TesterPath, "../../../../../packages.props"); - roslynLatestVersion = XDocument.Load(packagesPropsFile).XPathSelectElement("//RoslynVersion").Value; + // To parse: + packagesPropsFile = Path.Combine(TesterPath, "../../../../../Directory.Packages.props"); + roslynLatestVersion = ((IEnumerable)(XDocument + .Load(packagesPropsFile) + .XPathEvaluate("//Project//ItemGroup//PackageVersion[@Include='Microsoft.CodeAnalysis.CSharp']/@Version"))) + .OfType() + .Single() + .Value; + roslynToolset = new RoslynToolset(); vswhereToolset = new VsWhereToolset(); }