Fix HostFXR in dotnet-dev package
This commit is contained in:
parent
f4a8df3a56
commit
638e4c7d00
1 changed files with 21 additions and 0 deletions
|
@ -28,6 +28,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
[Target(nameof(PackageTargets.CopyCLISDKLayout),
|
[Target(nameof(PackageTargets.CopyCLISDKLayout),
|
||||||
nameof(PackageTargets.CopySharedHostLayout),
|
nameof(PackageTargets.CopySharedHostLayout),
|
||||||
|
nameof(PackageTargets.CopyHostFxrLayout),
|
||||||
nameof(PackageTargets.CopySharedFxLayout),
|
nameof(PackageTargets.CopySharedFxLayout),
|
||||||
nameof(PackageTargets.CopyCombinedFrameworkSDKHostLayout),
|
nameof(PackageTargets.CopyCombinedFrameworkSDKHostLayout),
|
||||||
nameof(PackageTargets.CopyCombinedFrameworkSDKLayout))]
|
nameof(PackageTargets.CopyCombinedFrameworkSDKLayout))]
|
||||||
|
@ -103,6 +104,23 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Target]
|
||||||
|
public static BuildTargetResult CopyHostFxrLayout(BuildTargetContext c)
|
||||||
|
{
|
||||||
|
var hostFxrRoot = Path.Combine(Dirs.Output, "obj", "hostFxr");
|
||||||
|
if (Directory.Exists(hostFxrRoot))
|
||||||
|
{
|
||||||
|
Utils.DeleteDirectory(hostFxrRoot);
|
||||||
|
}
|
||||||
|
Directory.CreateDirectory(hostFxrRoot);
|
||||||
|
|
||||||
|
Utils.CopyDirectoryRecursively(Path.Combine(Dirs.Stage2, "host"), hostFxrRoot, true);
|
||||||
|
FixPermissions(hostFxrRoot);
|
||||||
|
|
||||||
|
c.BuildContext["HostFxrPublishRoot"] = hostFxrRoot;
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
public static BuildTargetResult CopySharedFxLayout(BuildTargetContext c)
|
public static BuildTargetResult CopySharedFxLayout(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
@ -138,6 +156,9 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
string sharedHostPublishRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
string sharedHostPublishRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
||||||
Utils.CopyDirectoryRecursively(sharedHostPublishRoot, combinedRoot);
|
Utils.CopyDirectoryRecursively(sharedHostPublishRoot, combinedRoot);
|
||||||
|
|
||||||
|
string hostFxrPublishRoot = c.BuildContext.Get<string>("HostFxrPublishRoot");
|
||||||
|
Utils.CopyDirectoryRecursively(hostFxrPublishRoot, combinedRoot);
|
||||||
|
|
||||||
c.BuildContext["CombinedFrameworkSDKHostRoot"] = combinedRoot;
|
c.BuildContext["CombinedFrameworkSDKHostRoot"] = combinedRoot;
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue