Skip to content

Commit

Permalink
Add a README file for the bundler (dotnet/core-setup#5526)
Browse files Browse the repository at this point in the history
Add a README file for the bundler

Add a readme file that explains why the Bundler is in the core-setup repo, 
and why it is built as a command line tool.


Commit migrated from dotnet/core-setup@8a6ed35
  • Loading branch information
swaroop-sridhar authored Mar 22, 2019
1 parent d0c2cc0 commit 6c4cf14
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/installer/managed/Microsoft.DotNet.Build.Bundle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.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.

### Why is the Bundler a tool, not a managed library?

Users typically only interact with the bundler via dotnet CLI (`dotnet publish /p:PublishSingleFile=true`). The connection between the bundler tool and msbuild is facilitated by MsBuild artifacts in the SDK. The Bundler itself is an executable tool with a command-line interface because:

1. A library hosted in-proc by the MSBuild process needs to carefully address concerns such as target framework / multitargeting requirements, dependency collision with other tasks / libraries, etc.
2. It forces a crisp contract of inputs and outputs of the MSBuild task.
3. It can be run without spinning up a full build in "ad-hoc" scenarios.
4. It facilitates easy testing.

The [IL Linker](https://github.com/mono/linker) and [Crossgen compiler](https://github.com/dotnet/coreclr/tree/master/src/tools/crossgen) are similarly implemented as an independent command line tools.

0 comments on commit 6c4cf14

Please sign in to comment.