diff --git a/src/dotnet/commands/dotnet-build/CompileContext.cs b/src/dotnet/commands/dotnet-build/CompileContext.cs index 1d7c047f1..21fa11e06 100644 --- a/src/dotnet/commands/dotnet-build/CompileContext.cs +++ b/src/dotnet/commands/dotnet-build/CompileContext.cs @@ -462,7 +462,7 @@ namespace Microsoft.DotNet.Tools.Build AddDependencies(dependencies, compilerIO); var allOutputPath = new List(calculator.CompilationFiles.All()); - if (!string.IsNullOrEmpty(project.RuntimeIdentifier)) + if (project.ProjectFile.HasRuntimeOutput(buildConfiguration)) { allOutputPath.AddRange(calculator.RuntimeFiles.All()); }