diff --git a/KoreBuild-dotnet/build/KoreBuild.cmd b/KoreBuild-dotnet/build/KoreBuild.cmd index c68c34efef..9b97dc3660 100644 --- a/KoreBuild-dotnet/build/KoreBuild.cmd +++ b/KoreBuild-dotnet/build/KoreBuild.cmd @@ -18,6 +18,10 @@ IF NOT EXIST xunit.runner.console ( "%NUGET_PATH%" install xunit.runner.console -ExcludeVersion -Source https://api.nuget.org/v3/index.json -o %~dp0 ) +IF NOT EXIST xunit.core ( + "%NUGET_PATH%" install xunit.core -ExcludeVersion -Source https://api.nuget.org/v3/index.json -o %~dp0 +) + SET DOTNET_LOCAL_INSTALL_FOLDER=%LOCALAPPDATA%\Microsoft\dotnet\cli SET DOTNET_LOCAL_INSTALL_FOLDER_BIN=%DOTNET_LOCAL_INSTALL_FOLDER%\bin diff --git a/KoreBuild-dotnet/build/KoreBuild.sh b/KoreBuild-dotnet/build/KoreBuild.sh index ef5513d397..8fc68e3e28 100755 --- a/KoreBuild-dotnet/build/KoreBuild.sh +++ b/KoreBuild-dotnet/build/KoreBuild.sh @@ -43,6 +43,9 @@ fi if [ ! -d $thisDir/xunit.runner.console ]; then mono $nugetPath install xunit.runner.console -ExcludeVersion -o $thisDir -nocache -pre fi +if [ ! -d $thisDir/xunit.core ]; then + mono $nugetPath install xunit.core -ExcludeVersion -o $thisDir -nocache -pre +fi # Need to set this variable because by default the install script # requires sudo export DOTNET_INSTALL_DIR=~/.dotnet diff --git a/KoreBuild-dotnet/build/_xunit-test.shade b/KoreBuild-dotnet/build/_xunit-test.shade index eb966324ff..8123ef0740 100644 --- a/KoreBuild-dotnet/build/_xunit-test.shade +++ b/KoreBuild-dotnet/build/_xunit-test.shade @@ -39,7 +39,8 @@ projectFile='' configs.Keys.Where(k => k.StartsWith("dnx", StringComparison.OrdinalIgnoreCase)); var runnerFolder = Path.GetFullPath(Path.Combine(KoreBuildFolderPath, "build", "xunit.runner.console", "tools")); - + var xunitCoreFolder = Path.GetFullPath(Path.Combine(KoreBuildFolderPath, "build", "xunit.core", "build", "_desktop")); + foreach (var framework in targetFrameworks) { if (!framework.StartsWith("dnxcore")) @@ -53,6 +54,11 @@ projectFile='' var publishFolder = Path.Combine(projectFolder, ".testPublish", framework); DotnetPublish(projectFile, publishFolder, framework); Copy(runnerFolder, publishFolder, "*.*", true); + + // Copy xunit.execution.desktop. This is required in order to load the binding + // redirects for dlls. See this thread for more details: + // https://github.com/xunit/xunit/issues/732 + Copy(xunitCoreFolder, publishFolder, "*.*", true); var targetTestDll = projectName + ".dll";