From 5b6aa91f0d94630b9547e76ed71dd376a7dea7c3 Mon Sep 17 00:00:00 2001 From: Swaroop Sridhar Date: Wed, 19 Feb 2020 23:11:48 -0800 Subject: [PATCH] Update documentation about HostModel (#32583) Update the notes about HostModel library, to reflect the post-repo consolidation names. --- .../managed/Microsoft.NET.HostModel/Bundle/README.md | 12 ------------ .../Microsoft.NET.HostModel/ComHost/ComHost.cs | 2 +- .../managed/Microsoft.NET.HostModel/README.md | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 13 deletions(-) delete mode 100644 src/installer/managed/Microsoft.NET.HostModel/Bundle/README.md create mode 100644 src/installer/managed/Microsoft.NET.HostModel/README.md diff --git a/src/installer/managed/Microsoft.NET.HostModel/Bundle/README.md b/src/installer/managed/Microsoft.NET.HostModel/Bundle/README.md deleted file mode 100644 index a25b62d..0000000 --- a/src/installer/managed/Microsoft.NET.HostModel/Bundle/README.md +++ /dev/null @@ -1,12 +0,0 @@ -.NET Core Bundler -=================================== - -The Bundler is a tool that embeds an application and its dependencies into the AppHost executable. This tool is used to publish apps as a single-file, as described in this [design document](https://github.com/dotnet/designs/blob/master/accepted/single-file/design.md). - -### Why is the Bundler in core-setup repo? - -The bundler is an independent tool for merging several files into one. -The bundler code lives in the core-setup repo because: -* It is closely related to the AppHost code, which facilitates easy development, update, and testing. -* The `dotnet/cli` and `dotnet/sdk` repos were considered unsuitable because of repo ownership and maintainence concerns. -* It is not worth creating an managing an independent repo just for the tool. diff --git a/src/installer/managed/Microsoft.NET.HostModel/ComHost/ComHost.cs b/src/installer/managed/Microsoft.NET.HostModel/ComHost/ComHost.cs index aa59a49..bcb0d3a 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/ComHost/ComHost.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/ComHost/ComHost.cs @@ -15,7 +15,7 @@ namespace Microsoft.NET.HostModel.ComHost private const int ClsidmapResourceType = 1024; /// - /// Create an ComHost with an embedded CLSIDMap file to map CLSIDs to .NET Classes. + /// Create a ComHost with an embedded CLSIDMap file to map CLSIDs to .NET Classes. /// /// The path of Apphost template, which has the place holder /// The destination path for desired location to place, including the file name diff --git a/src/installer/managed/Microsoft.NET.HostModel/README.md b/src/installer/managed/Microsoft.NET.HostModel/README.md new file mode 100644 index 0000000..c96ebe7 --- /dev/null +++ b/src/installer/managed/Microsoft.NET.HostModel/README.md @@ -0,0 +1,19 @@ +Host Model +=================================== + +HostModel is a library used by the [SDK](https://github.com/dotnet/sdk) to perform certain transformations on host executables. The main services implemented in HostModel are: + +* AppHost rewriter: Embeds the App Name into the AppHost executable. On Windows, also copies resources from App.dll to the AppHost. +* ComHost rewriter: Creates a ComHost with an embedded CLSIDMap file to map CLSIDs to .NET Classes. + +* Single-file bundler: Embeds an application and its dependencies into the AppHost, to publish a single executable, as described [here](https://github.com/dotnet/designs/blob/master/accepted/single-file/design.md). + +The HostModel library is in the Runtime repo because: + +* The implementations of the host and HostModel are closely related, which facilitates easy development, update, and testing. +* Separating the HostModel implementation from SDK repo repo aligns with code ownership, and facilitates maintenance. + +The build targets/tasks that use the HostModel library are in the SDK repo because: + +* This facilitates the MSBuild tasks to be multi-targeted. +* It helps generate localized error messages, since SDK repo has the localization infrastructure. -- 2.7.4