Fixed copying output assets to the publish directory

This commit is contained in:
David Fowler 2016-01-27 20:35:43 -08:00
parent d4a8fa24db
commit 6edac85dce
7 changed files with 128 additions and 101 deletions

View file

@ -32,16 +32,18 @@ namespace Microsoft.DotNet.Cli.Compiler.Common
}));
}
internal static IEnumerable<LibraryAsset> RuntimeAssets(this LibraryExport export)
internal static IEnumerable<string> RuntimeAssets(this LibraryExport export)
{
return export.RuntimeAssemblies.Union(export.NativeLibraries);
return export.RuntimeAssemblies.Union(export.NativeLibraries)
.Select(e => e.ResolvedPath)
.Union(export.RuntimeAssets);
}
internal static void CopyTo(this IEnumerable<LibraryAsset> assets, string destinationPath)
internal static void CopyTo(this IEnumerable<string> assets, string destinationPath)
{
foreach (var asset in assets)
{
File.Copy(asset.ResolvedPath, Path.Combine(destinationPath, Path.GetFileName(asset.ResolvedPath)),
File.Copy(asset, Path.Combine(destinationPath, Path.GetFileName(asset)),
overwrite: true);
}
}