use DNXCORE50 define to check if target framework is Desktop

Best is to use NuGetFramework.IsDesktop method, but i cannot parse the assemblyInfoOptions.TargetFramework as NuGetFramework
This commit is contained in:
Enrico Sada 2016-02-11 13:03:28 +01:00
parent a2a319c55a
commit 57ae360c23

View file

@ -108,8 +108,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Fsc
}
//set target framework
var framework = new NuGetFramework(assemblyInfoOptions.TargetFramework);
if (!framework.IsDesktop())
if (commonOptions.Defines.Contains("DNXCORE50"))
{
allArgs.Add("--targetprofile:netcore");
}