From 65b0f97a2c03fa102c2de7799fd3af3196730d8a Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 28 Feb 2024 12:45:01 +0000 Subject: [PATCH] Try using MSBuildExtensionsPath --- MSBuildSandbox.Tests/Tests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MSBuildSandbox.Tests/Tests.cs b/MSBuildSandbox.Tests/Tests.cs index cc23481..012b798 100644 --- a/MSBuildSandbox.Tests/Tests.cs +++ b/MSBuildSandbox.Tests/Tests.cs @@ -50,6 +50,9 @@ public string GetMSbuildLocation () if (Environment.OSVersion.Platform == PlatformID.Win32NT) { return ToolLocationHelper.GetPathToBuildToolsFile("msbuild.exe", ToolLocationHelper.CurrentToolsVersion); } + var path = Environment.GetEnvironmentVariable ("MSBuildExtensionsPath"); + if (!string.IsNullOrEmpty (path)) + return path; return @"/usr/local/share/dotnet/sdk/8.0.100/"; }