Overwrite hostpolicy file from nuget with local-built one

This commit is contained in:
Eric Mellino 2016-03-14 15:40:19 -07:00
parent 05ebf6f842
commit ee5d5ef6f1

View file

@ -76,7 +76,7 @@ namespace Microsoft.DotNet.Cli.Build
Path.Combine(SharedFrameworkNameAndVersionRoot, $"dotnet{Constants.ExeSuffix}"));
File.Copy(
Path.Combine(Dirs.Corehost, $"{Constants.DynamicLibPrefix}{HostPolicyBaseName}{Constants.DynamicLibSuffix}"),
Path.Combine(SharedFrameworkNameAndVersionRoot, $"{Constants.DynamicLibPrefix}{HostPolicyBaseName}{Constants.DynamicLibSuffix}"));
Path.Combine(SharedFrameworkNameAndVersionRoot, $"{Constants.DynamicLibPrefix}{HostPolicyBaseName}{Constants.DynamicLibSuffix}"), true);
if (File.Exists(Path.Combine(SharedFrameworkNameAndVersionRoot, "mscorlib.ni.dll")))
{
@ -93,6 +93,11 @@ namespace Microsoft.DotNet.Cli.Build
public static BuildTargetResult PublishSharedHost(BuildTargetContext c)
{
string SharedHostPublishRoot = Path.Combine(Dirs.Output, "obj", "sharedhost");
if (Directory.Exists(SharedHostPublishRoot))
{
Directory.Delete(SharedHostPublishRoot);
}
Directory.CreateDirectory(SharedHostPublishRoot);
// corehost will be renamed to dotnet at some point and then this can be removed.