diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index 09fc3850daed..918932eb19b9 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -283,10 +283,10 @@ Copyright (c) .NET Foundation. All rights reserved. --> + Condition="'$(ComputeNETCoreBuildOutputFiles)' == 'true' and Exists('@(IntermediateAssembly)') and Exists('@(_NativeRestoredAppHostNETCore)')"> <_UseWindowsGraphicalUserInterface Condition="($(RuntimeIdentifier.StartsWith('win')) or $(DefaultAppHostRuntimeIdentifier.StartsWith('win'))) and '$(OutputType)'=='WinExe'">true @@ -294,8 +294,7 @@ Copyright (c) .NET Foundation. All rights reserved. AppHostDestinationPath="@(_NativeAppHostNETCore)" AppBinaryName="$(AssemblyName)$(TargetExt)" IntermediateAssembly="@(IntermediateAssembly->'%(FullPath)')" - WindowsGraphicalUserInterface="$(_UseWindowsGraphicalUserInterface)" - Condition="'@(_NativeRestoredAppHostNETCore)' != ''" /> + WindowsGraphicalUserInterface="$(_UseWindowsGraphicalUserInterface)" />