Merge pull request #3033 from dotnet/pakrym/csproj-ref
Copy csproj reference assemblies to build output
This commit is contained in:
commit
c3aa0a5d5a
2 changed files with 12 additions and 5 deletions
|
@ -161,7 +161,7 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
|
||||||
var exports = exporter.GetAllExports().ToList();
|
var exports = exporter.GetAllExports().ToList();
|
||||||
WriteConfigurationFiles(exports, exports, includeDevConfig: true);
|
WriteConfigurationFiles(exports, exports, includeDevConfig: true);
|
||||||
|
|
||||||
var projectExports = exporter.GetDependencies(LibraryType.Project);
|
var projectExports = exporter.GetAllProjectTypeDependencies();
|
||||||
CopyAssemblies(projectExports);
|
CopyAssemblies(projectExports);
|
||||||
CopyAssets(projectExports);
|
CopyAssets(projectExports);
|
||||||
|
|
||||||
|
|
|
@ -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.IO;
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.DotNet.ProjectModel;
|
|
||||||
using Microsoft.DotNet.ProjectModel.Compilation;
|
using Microsoft.DotNet.ProjectModel.Compilation;
|
||||||
using Microsoft.DotNet.ProjectModel.Graph;
|
using Microsoft.DotNet.ProjectModel.Graph;
|
||||||
using Microsoft.Extensions.DependencyModel;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli.Compiler.Common
|
namespace Microsoft.DotNet.Cli.Compiler.Common
|
||||||
{
|
{
|
||||||
public static class LibraryExporterExtensions
|
public static class LibraryExporterExtensions
|
||||||
{
|
{
|
||||||
|
public static IEnumerable<LibraryExport> GetAllProjectTypeDependencies(this LibraryExporter exporter)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
exporter.GetDependencies(LibraryType.Project)
|
||||||
|
.Concat(exporter.GetDependencies(LibraryType.MSBuildProject));
|
||||||
|
}
|
||||||
|
|
||||||
public static void CopyTo(this IEnumerable<LibraryAsset> assets, string destinationPath)
|
public static void CopyTo(this IEnumerable<LibraryAsset> assets, string destinationPath)
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(destinationPath))
|
if (!Directory.Exists(destinationPath))
|
||||||
|
|
Loading…
Add table
Reference in a new issue