Fix deployers for non-windows platforms and coreclr

- Execute published clr applications on linux and mac with mono
- Update TFM for coreclr project to netstandardapp1.5
This commit is contained in:
= 2016-03-01 15:10:27 -08:00 committed by John Luo
parent 57371e5c9c
commit 947adbc8a8
2 changed files with 14 additions and 3 deletions

View File

@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Server.Testing
protected void PickRuntime()
{
TargetFrameworkName = DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "dnxcore50";
TargetFrameworkName = DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? "dnx451" : "netstandardapp1.5";
Logger.LogInformation($"Pick target framework {TargetFrameworkName}");
}

View File

@ -5,8 +5,9 @@ using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Server.Testing.Common;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.PlatformAbstractions;
namespace Microsoft.AspNetCore.Server.Testing
{
@ -54,7 +55,17 @@ namespace Microsoft.AspNetCore.Server.Testing
if (DeploymentParameters.PublishApplicationBeforeDeployment)
{
var executableExtension = DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr ? ".exe" : "";
executableName = Path.Combine(DeploymentParameters.PublishedApplicationRootPath, new DirectoryInfo(DeploymentParameters.ApplicationPath).Name + executableExtension);
var executable = Path.Combine(DeploymentParameters.PublishedApplicationRootPath, new DirectoryInfo(DeploymentParameters.ApplicationPath).Name + executableExtension);
if (DeploymentParameters.RuntimeFlavor == RuntimeFlavor.Clr && PlatformServices.Default.Runtime.OperatingSystemPlatform != Platform.Windows)
{
executableName = "mono";
executableArgs = executable;
}
else
{
executableName = executable;
}
}
else
{