Skip to content

Commit

Permalink
Make tests work in net48 again
Browse files Browse the repository at this point in the history
  • Loading branch information
menees committed Oct 16, 2024
1 parent bc54156 commit 738bddf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions testEnvironments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "1",
"environments": [
// See https://aka.ms/remotetesting for more details
// about how to configure remote environments.
{
"name": "WSL Ubuntu",
"type": "wsl",
"wslDistribution": "Ubuntu"
}
//{
// "name": "Docker dotnet/sdk",
// "type": "docker",
// "dockerImage": "mcr.microsoft.com/dotnet/sdk"
//}
]
}
4 changes: 3 additions & 1 deletion tests/Menees.Remoting.Tests/ProcessManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

Expand All @@ -33,6 +34,7 @@ public ProcessManager(Type hostProgram)
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
ErrorDialog = false,
UseShellExecute = false,
};

if (string.Equals(Path.GetExtension(hostExeLocation), ".exe", StringComparison.OrdinalIgnoreCase))
Expand All @@ -41,7 +43,7 @@ public ProcessManager(Type hostProgram)
}
else
{
this.StartInfo.FileName = OperatingSystem.IsWindows()
this.StartInfo.FileName = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? Environment.ExpandEnvironmentVariables(@"%ProgramFiles%\dotnet\dotnet.exe")
: "dotnet";
this.arguments.Add(hostExeLocation);
Expand Down

0 comments on commit 738bddf

Please sign in to comment.