Enable .NET Framework F5 & VS TestExplorer support for libraries (#31873)
authorViktor Hofer <viktor.hofer@microsoft.com>
Thu, 6 Feb 2020 18:19:53 +0000 (19:19 +0100)
committerGitHub <noreply@github.com>
Thu, 6 Feb 2020 18:19:53 +0000 (19:19 +0100)
* Enable .NET Framework F5 & TestExplorer

Adding a launchSettings profile to enable .NET Framework F5 scenarios.
Also setting the DEVPATH variable for the -vs hook to use the locally
built .NET Framework runtime.

* Set DEVPATH env in F5

eng/build.ps1
eng/testing/launchSettings.json

index c3109d0..81c417a 100644 (file)
@@ -85,6 +85,7 @@ if ($vs) {
 
     # This tells .NET Core to use the same dotnet.exe that build scripts use
     $env:DOTNET_ROOT="$PSScriptRoot\..\artifacts\bin\testhost\netcoreapp5.0-Windows_NT-$configuration-$archTestHost";
+    $env:DEVPATH="$PSScriptRoot\..\artifacts\bin\testhost\net472-Windows_NT-$configuration-$archTestHost";
   }
 
   # This tells MSBuild to load the SDK from the directory of the bootstrapped SDK
index c215e10..62d099f 100644 (file)
@@ -5,6 +5,15 @@
             "executablePath": "$(TestHostRootPath)dotnet.exe",
             "commandLineArgs": "$(RunArguments) -parallel none",
             "workingDirectory": "$(RunWorkingDirectory)"
+        },
+        ".NET Framework xUnit Console": {
+            "commandName": "Executable",
+            "executablePath": "$(RunWorkingDirectory)$(RunCommand)",
+            "commandLineArgs": "$(RunArguments) -parallel none",
+            "workingDirectory": "$(RunWorkingDirectory)",
+            "environmentVariables": {
+                "DEVPATH": "$(TestHostRootPath)"
+            }
         }
     }
 }