Update documentation about HostModel (#32583)
authorSwaroop Sridhar <Swaroop.Sridhar@microsoft.com>
Thu, 20 Feb 2020 07:11:48 +0000 (23:11 -0800)
committerGitHub <noreply@github.com>
Thu, 20 Feb 2020 07:11:48 +0000 (23:11 -0800)
Update the notes about HostModel library, to reflect the post-repo consolidation names.

src/installer/managed/Microsoft.NET.HostModel/Bundle/README.md [deleted file]
src/installer/managed/Microsoft.NET.HostModel/ComHost/ComHost.cs
src/installer/managed/Microsoft.NET.HostModel/README.md [new file with mode: 0644]

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 (file)
index a25b62d..0000000
+++ /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. 
index aa59a49..bcb0d3a 100644 (file)
@@ -15,7 +15,7 @@ namespace Microsoft.NET.HostModel.ComHost
         private const int ClsidmapResourceType = 1024;
 
         /// <summary>
-        /// 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.
         /// </summary>
         /// <param name="comHostSourceFilePath">The path of Apphost template, which has the place holder</param>
         /// <param name="comHostDestinationFilePath">The destination path for desired location to place, including the file name</param>
diff --git a/src/installer/managed/Microsoft.NET.HostModel/README.md b/src/installer/managed/Microsoft.NET.HostModel/README.md
new file mode 100644 (file)
index 0000000..c96ebe7
--- /dev/null
@@ -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.