Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3033 from dotnet/pakrym/csproj-ref
Browse files Browse the repository at this point in the history
Copy csproj reference assemblies to build output
  • Loading branch information
pakrym committed May 16, 2016
2 parents 864145a + 8831e93 commit c3aa0a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.Compiler.Common/Executable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private void WriteDepsFileAndCopyProjectDependencies(LibraryExporter exporter)
var exports = exporter.GetAllExports().ToList();
WriteConfigurationFiles(exports, exports, includeDevConfig: true);

var projectExports = exporter.GetDependencies(LibraryType.Project);
var projectExports = exporter.GetAllProjectTypeDependencies();
CopyAssemblies(projectExports);
CopyAssets(projectExports);

Expand Down
15 changes: 11 additions & 4 deletions src/Microsoft.DotNet.Compiler.Common/LibraryExporterExtensions.cs
Original file line number Diff line number Diff line change
@@ -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))
Expand Down

0 comments on commit c3aa0a5

Please sign in to comment.