add --targetprofile:netcore if target framework is not desktop
This commit is contained in:
parent
d67a0cd9bb
commit
2bd7a978cf
1 changed files with 8 additions and 0 deletions
|
@ -12,6 +12,7 @@ using System.Text;
|
|||
using Microsoft.DotNet.Cli.Compiler.Common;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.ProjectModel;
|
||||
using NuGet.Frameworks;
|
||||
|
||||
namespace Microsoft.DotNet.Tools.Compiler.Fsc
|
||||
{
|
||||
|
@ -104,6 +105,13 @@ namespace Microsoft.DotNet.Tools.Compiler.Fsc
|
|||
allArgs.Add($"{outputName}");
|
||||
}
|
||||
|
||||
//set target framework
|
||||
var framework = new NuGetFramework(assemblyInfoOptions.TargetFramework);
|
||||
if (!framework.IsDesktop())
|
||||
{
|
||||
allArgs.Add("--targetprofile:netcore");
|
||||
}
|
||||
|
||||
foreach (var reference in references)
|
||||
{
|
||||
allArgs.Add("-r");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue