Merge pull request #3033 from dotnet/pakrym/csproj-ref

Copy csproj reference assemblies to build output
This commit is contained in:
Pavel Krymets 2016-05-16 10:30:11 -07:00
commit c3aa0a5d5a
2 changed files with 12 additions and 5 deletions

View file

@ -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);

View file

@ -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<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)
{
if (!Directory.Exists(destinationPath))