diff --git a/src/Microsoft.DotNet.Compiler.Common/Executable.cs b/src/Microsoft.DotNet.Compiler.Common/Executable.cs index 69414a293..29a602a70 100644 --- a/src/Microsoft.DotNet.Compiler.Common/Executable.cs +++ b/src/Microsoft.DotNet.Compiler.Common/Executable.cs @@ -161,7 +161,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common var exports = exporter.GetAllExports().ToList(); WriteConfigurationFiles(exports, exports, includeDevConfig: true); - var projectExports = exporter.GetDependencies(LibraryType.Project); + var projectExports = exporter.GetAllProjectTypeDependencies(); CopyAssemblies(projectExports); CopyAssets(projectExports); diff --git a/src/Microsoft.DotNet.Compiler.Common/LibraryExporterExtensions.cs b/src/Microsoft.DotNet.Compiler.Common/LibraryExporterExtensions.cs index 52322101e..7e3440c02 100644 --- a/src/Microsoft.DotNet.Compiler.Common/LibraryExporterExtensions.cs +++ b/src/Microsoft.DotNet.Compiler.Common/LibraryExporterExtensions.cs @@ -1,16 +1,23 @@ -using System.Collections.Generic; +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; using System.IO; -using System; using System.Linq; -using Microsoft.DotNet.ProjectModel; using Microsoft.DotNet.ProjectModel.Compilation; using Microsoft.DotNet.ProjectModel.Graph; -using Microsoft.Extensions.DependencyModel; namespace Microsoft.DotNet.Cli.Compiler.Common { public static class LibraryExporterExtensions { + public static IEnumerable GetAllProjectTypeDependencies(this LibraryExporter exporter) + { + return + exporter.GetDependencies(LibraryType.Project) + .Concat(exporter.GetDependencies(LibraryType.MSBuildProject)); + } + public static void CopyTo(this IEnumerable assets, string destinationPath) { if (!Directory.Exists(destinationPath))