diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9271b689e..3e0f963fa 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,4 +6,4 @@ See [Contributing](https://github.com/dotnet/corefx/blob/master/Documentation/pr
Developers
==========
-See the [Developer Guide](Documentation/project-docs/developer-guide.md) for details about developing in this repo.
\ No newline at end of file
+If you are looking to contribute to the verbs that ship with the SDK, please go to the [CLI Repo](https://github.com/dotnet/cli).
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index f0719c9ce..f17318773 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -43,24 +43,23 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj
-
-
-
+
+
+
-
diff --git a/Documentation/ProjectJsonToCSProj.md b/Documentation/ProjectJsonToCSProj.md
deleted file mode 100644
index 3b3e404e8..000000000
--- a/Documentation/ProjectJsonToCSProj.md
+++ /dev/null
@@ -1,63 +0,0 @@
-.NET CLI preview 3 is here, and with it comes the .csproj project file format and msbuild engine. The team has put a lot of focus on making the transition as seamless as possible, but as with any change of this magnitude there are some gotcha's to keep in mind. This issue explains how to use the .NET CLI during this transitional period.
-
-# Overview
-Starting with @coolcsh's great post [Changes to Project.json](https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/) the team has been hard at work moving the .NET command line story from project.json to msbuild. Our plan was fairly straightforward:
-- Create a preview3 fork of the CLI
-- Temporarily support both project.json and msbuild in the preview3 fork
- - This allowed the team to use the CLI to build the new CLI
- - msbuild support lit up through `3` verbs such as `build3`, `publish3`, `restore3`
-- Once the msbuild support matures enough to build working applications, remove project.json support
-
-In addition to lighting up the msbuild scenario, the team also provided a migration tool called `dotnet migrate` that converts project.json files to csproj files.
-
-# Where are we now?
-The team is feature complete to the plan above. The transition to msbuild is done and the migration tool is already part of the preview3 CLI. Of course there are still many issues to address before we can claim that we're ready to drop the `preview` suffix, but the core functionality is in place.
-
-# How do I...
-Until we are ready to call the `preview3+` CLI ready for prime-time we find ourselves in a world where it is interesting to work on csproj, project.json, or both. How can we make that work?
-
-## How do I keep working with project.json?
-Developers who are waiting for the new CLI to ship will continue using the `preview2` CLI. As long as they don't install any `preview3` or later bits on their machine they will be able to continue using Visual Studio 2015 preview tooling and maintain their existing developer experience.
-
-The `preview3` CLI does not offer any benefits for developers that want to keep using `project.json` for the time being.
-
-## How do I work with csproj only?
-Developers who want to try out the new csproj / msbuild CLI and don't have project.json-based code to worry about can just install the `preview3` tooling. Any build starting at `1.0.0-preview3-004056` is sufficient to get started. Once installed, you can open a command prompt and:
-- `dotnet new` to get a new csproj console application
-- `dotnet restore` to get required nuget packages
-- `dotnet build` to build the project
-- `dotnet run` to run the project
-
-## How do I work with project.json while trying out csproj?
-This scenario presents a few options. First, you can use the `dotnet migrate` tool to migrate your existing `project.json` assets to csproj. Alternatively, you can maintain both workflows side-by-side with some care, described below.
-
-### How do I migrate project.json to csproj?
-I'll start with a warning. Migration is fairly complex and `preview3` is the first preview of this capability. The tool will be better in future releases, and it will need your project.json files in order to redo the migration in the future. `dotnet migrate` moves your `project.json` assets into a `backup` folder whose structure matches the layout of your solution. If you intend to migrate with newer tooling in the future then keep this folder in source control so you can put the files back when needed.
-
-To migrate a project open a command prompt and go to the project's root directory. From here, type `dotnet migrate` and let the tool do its work. For most projects, that's it! There are some special cases where the tool will complain and ask for some help, however:
-- Projects are expected to have been updated to the `preview2` format for `project.json`. If you had noticed the previous CLI complaining about `deprecated` properties, these warnings will need to be cleaned up prior to migration.
-- Some advanced capabilities, particularly some script variables, do not have an equivalent in the csproj world. The migration tool will ask you to remove these before migration can complete.
-
-Once migration is done you can use the same verbs as before to build, run, publish, etc. your project.
-
-### How do I work with project.json and csproj on the same machine?
-This is an important scenario, as many folks will keep working with the existing tooling while experimenting with the preview3 implementations.
-
-To work with both project.json and csproj a developer will install two CLIs: one `preview2` for project.json and one `preview3` for csproj. There will only be one `dotnet` on the PATH, of course, so the CLI will need some help knowing which version to choose. This is accomplished with the help of the `global.json` file.
-
-When `preview2` shipped the Visual Studio new project templates included both a `project.json` file and a `global.json` file. The latter was fairly empty, including project locations and a `version` property. That `version` specified the `preview2` CLI that shipped with the tools.
-
-
-```
-{
- "projects": [ "src", "test" ],
- "sdk": {
- "version": "1.0.0-preview2-003121"
- }
-}
-```
-
-We included this file by default as a future-proofing tactic. When the CLI launches it looks for this file in the current directory, or the nearest parent directory, and tries to find a matching version of itself. If an exact match is found then it is used. Otherwise, `dotnet.exe` picks the latest installed CLI. When there is no exact match AND preview3 is installed then we get into trouble because preview3 cannot reason about project.json files.
-
-When working with `preview2` and `preview3` on the same machine we need to be sure that `preview2` projects have a global.json present and that the `version` property is set to an installed preview2 version. This will typically be `1.0.0-preview2-003121` or `1.0.0-preview2-003131`. You can check what is installed by looking in `%PROGRAM FILES%\dotnet\sdk` and checking the folder names.
-
diff --git a/Documentation/README.md b/Documentation/README.md
deleted file mode 100644
index 94edbb417..000000000
--- a/Documentation/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-Documents Index
-===============
-
-## Overview and general information
-
-- [Intro to .NET Core CLI](general/intro-to-cli.md)
-- [CLI UX Guidelines](general/cli-ux-guidelines.md)
-- [.NET Core native pre-requisities document](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md)
-- [Roadmap and OS support](https://github.com/dotnet/core/blob/master/roadmap.md)
-- [Comprehensive CLI documentation](https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/tools/)
-
-## Working with the CLI repo
-
-- [Developer Guide](project-docs/developer-guide.md)
-- [How to file issues](project-docs/issue-filing-guide.md)
-
-## Troubleshooting and issues reporting
-
-- [CLI Known Issues](https://github.com/dotnet/core/blob/master/cli/known-issues.md)
-- [Filing migration issues](migration-issues.md)
-
-## Specifications
-
-- [CLI installation scenarios](specs/cli-installation-scenarios.md)
-- [Corehost specification](specs/corehost.md)
-- [Runtime configuration file specification](specs/runtime-configuration-file.md)
-
diff --git a/Documentation/general/cli-ux-guidelines.md b/Documentation/general/cli-ux-guidelines.md
deleted file mode 100644
index 69b8c0325..000000000
--- a/Documentation/general/cli-ux-guidelines.md
+++ /dev/null
@@ -1,157 +0,0 @@
-.NET Core Command-Line Tools UX Guidelines
--------------------------------------------
-
-This document outlines the User Experience (UX) of the .NET Core command lline tools (CLI).These guideliens are intended for anyone that wants to add a new command to the CLI.
-
-The guidelines presented in this document have been adopted to provide a clear and concise
-command line syntax that is easy to learn, remember and work with, and that has an added benefit
-of being familiar to people who have used other command-line interfaces as well as existing
-Visual Studio users.
-
-## Naming the commands
-
-In the .NET Core CLI, commands should be **verbs**. This rule was adopted
-because most of the commands do *something*.
-
-Sub-commands are supported in the CLI, and they are usually nouns. A good
-example of this is the “dotnet add reference” command. If there is a need to add
-a subcommand, that subcommand should usually specialize what the parent command
-does.
-
-## Create/Read/Update/Delete (CRUD) commands
-New CRUD commands should be named according to the following logic:
-
-- Does the command work on data in the project (either properties or
- items)? If yes, then it should be added as a noun to the “dotnet
- add/list/remove/update”, e.g. “dotnet add foo”.
-
-- Does the command work on the solution (SLN) file? If yes, then it should be
- added as a verb to the “dotnet sln” command.
-
-- Does the command work on a completely new artifact (e.g. a new metadata file
- that is added in the future)? If yes, it should be created as a top level
- noun with all of the underlying operations defined as sub-commands.
-
-- If the command adds a new artifact to the project, it should become an item
- template that is dropped with “dotnet new” command.
-
-
-If none of the above applies, the proposal should clearly outline why none of
-the above applies and suggest an alternative naming that will be decided on
-during the process described above.
-
-If the command works on the project or solution, it must also accept an optional
-argument that specifies which project or solution to work on. The current
-convention is for that argument to follow the verb in the CRUD command. For
-example:
-
-> dotnet add \ reference \
-
-All the existing CRUD commands have this argument defined and it will be passed
-to the sub-command as part of the overall options. The sub-command is expected
-to consider this optional argument.
-
-## Options
-CLI follows the [GNU convention](https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html) for options’ format, which is based on the POSIX
-standard. The summary is:
-
-- Command can have both short and long options.
-
-- The short format starts with a single dash (“-“), and has **exactly** one
- letter. The letter is usually the start letter of the longer form of the
- option, e.g. “-o” for “--output” or any of its words. This provides a good
- mnemonic.
-
- - **Example:** “dotnet build -o path/to/where/to/put/output”
-
-- The long format starts with double dashes (“--“) and can have one or more
- words. Multiple words are separated by a single dash (“-“).
-
- - **Example:** “dotnet test --test-case-filter”
-
-- The double dashes (“--“) on their own mark the **argument separator**.
- Anything after this option is passed verbatim to whatever the command starts
- as a sub-process.
-
- - **Example:** “dotnet run -- --app-arg-1”
-
-- Windows-style forward slash options (e.g. “/p”) are supported **only for
- MSBuild parameters.**
-
-- PowerShell-style single dashes with a word (e.g. “-Filter”) are **not
- supported**.
-
-- Help options are predefined as “-h \| --help” and those should be used.
-
-There are common options in the CLI that are reserved for certain concepts. The
-table below outlines those common options. If a command needs to accept the same
-options, it should use these and it must not replace their semantics (e.g. use
-“--output” to mean something different or redefine what “-f” means for just that
-command).
-
-| Long option | Short option | Description |
-|------------------|--------------|--------------------------------------------------------------|
-| \--framework | \-f | Specifies which framework (target) to use in the invocation. |
-| \--output | \-o | Specifies where the output of the command should be placed. |
-| \--runtime | \-r | Specifies the runtime ID (RID) to use in the invocation. |
-| \--configuration | \-c | Specifies the configuration to use in the invocation. |
-| \--verbosity | \-v | Specifies the verbosity level of the command. |
-| \--help | \-h | Shows the help for the command. |
-
-One special area is interacting with MSBuild. If a command has the need to do
-that, there are two additional requirements with regards to options:
-
-1. The commands need to be able to take “/p” parameters in addition to whatever
- other properties they require.
-
-2. If the command invokes a predefined MSBuild target, it needs to block
- “/t:\” and “/target:\” options and throw an error that is
- pre-defined in the CLI.
-
-It is important to note that commands that invoke user-specified targets
-should not be submitted to the CLI, since the CLI comes with “dotnet msbuild”
-command that does precisely that.
-
-## Arguments
-Arguments can have any name that authors of the commands being added need. We do have predefined
-argument names for the SLN file and project file. They are defined in the CLI
-source code and should be used if the command has the need to use those two
-arguments.
-
-## Help messages
-Help messages are automatically generated based on the arguments, options and
-command name. No other work should be required here apart from setting up the
-above mentioned and their descriptions.
-
-## Output
-For commands that are invoking MSBuild, the output will be controlled by MSBuild
-itself.
-
-In case of a long running operation, the command needs to provide a feedback
-mechanism to the user to help the user reason about whether the command has
-crashed or is just waiting for I/O. The feedback mechanism guidelines are below:
-
-1. Feedback should not require fonts with special glyphs for display.
-2. Pure text is acceptable (e.g. `Running background process...`) as a feedback mechanism.
-3. Spinners that conform to rule \#1 above are also acceptable.
-
-
-### Verbosity
-If the command interacts with MSBuild, it is required that it can accept a
-“--verbosity \| -v” argument and pass it to MSBuild verbatim.
-
-If the command’s verbosity levels cannot fit naturally in [MSBuild’s verbosity levels](https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference) or the command does not interact with MSBuild but still has an option to set the verbosity, it
-is the job of the command to map them in the most appropriate way. This way, the
-verbosity levels will be uniform across all commands which brings consistency to
-the toolset.
-
-#### Example
-As an example, let us consider a “dotnet configure” command. It doesn’t interact
-with MSBuild. I wish to have verbosity on it, but it really has only two levels:
-quiet (just successes or errors) and verbose (every operation) that I've defined for the command. To satisfy the
-above-mentioned requirement, in my command I would define the “--verbosity \|
--v” option and would map the arguments in the following way:
-
-- “Quiet” gets mapped naturally to “quiet”
-
-- “Minimal”, “Normal” and “Diagnostic” get mapped into “verbose”
diff --git a/Documentation/general/intro-to-cli.md b/Documentation/general/intro-to-cli.md
deleted file mode 100644
index 0fca2016f..000000000
--- a/Documentation/general/intro-to-cli.md
+++ /dev/null
@@ -1,62 +0,0 @@
-Introduction to .NET Core CLI
-=============================
-
-The .NET Core CLI is a simple, extensible and standalone set of tools for building, managing and otherwise operating on .NET projects. It will or already includes commands such as compilation, NuGet package management and launching a debugger session. It is intended to be fully featured, enabling extensive library and app development functionality appropriate at the command-line. It should provide everything you'd need to develop an app in an SSH session! It is also intended to be a fundamental building block for building finished experiences in tools such as Visual Studio.
-
-Goals:
-
-- Language agnostic - embrace "common language runtime".
-- Target agnostic - multi-targets.
-- Simple extensibility and layering - "you had one job!"
-- Cross-platform - support and personality.
-- Semantic user interface over [MSBuild](https://github.com/Microsoft/msbuild).
-
-Experience
-==========
-
-The [.NET Core command-line tools](https://github.com/dotnet/cli) present the "dotnet" tool as the entry-point tool. It provides higher-level commands, often using multiple tools together to complete a task. It's a convenience wrapper over the other tools, which can also be used directly. "dotnet" isn't magical at all, but a very simple aggregator of other tools.
-
-You can get a sense of using the tools from the examples below.
-
-**dotnet restore**
-
-`dotnet restore` restores dependent package from a given NuGet feed (e.g. NuGet.org) for the project in scope.
-
-**dotnet run**
-
-`dotnet run` compiles and runs your app with one step.
-
-**dotnet build**
-
-`dotnet build` compiles your app or library as an IL binary.
-
-Design
-======
-
-There are a couple of moving pieces that you make up the general design of the .NET Core CLI:
-
-* The `dotnet` driver
-* Specific commands that are part of the package
-
-The `dotnet` driver is very simple and its primary role is to run commands and give users basic information about usage.
-
-The way the `dotnet` driver finds the command it is instructed to run using `dotnet {command}` is via a convention; any executable that is placed in the PATH and is named `dotnet-{command}` will be available to the driver. For example, when you install the CLI toolchain there will be an executable called `dotnet-build` in your PATH; when you run `dotnet build`, the driver will run the `dotnet-build` executable. All of the arguments following the command are passed to the command being invoked. So, in the invocation of `dotnet build --native`, the `--native` switch will be passed to `dotnet-build` executable that will do some action based on it (in this case, produce a single native binary).
-
-Adding a new command to the .NET Core CLI
-=========================================
-
-If you want to contribute to the actual .NET Core CLI by adding a new command that you think would be useful, please refer to the [developer guide](developer-guide.md) in this directory. It contains all of the guidance on both the process as well as the infrastructure that you need to adhere to when adding a new command to the CLI toolchain.
-
-After you familiarize yourself with the process of working with the source code in the repo, please consult the [CLI UX guidelines](cli-ux-guidelines.md) to get to know the user experience tenants the CLI has.
-
-Adding a new command locally
-============================
-If you wish to extend the CLI, you can read more about supported extensibility models in the [official extensibility document](https://docs.microsoft.com/en-us/dotnet/articles/core/tools/extensibility)/.
-
-Guidance on how to write a command
-==================================
-How you write a given command depends largely on whether you are trying to add it to the CLI project or want to add the command locally, that is on your machine or server.
-
-For the former case, the [developer guide](developer-guide.md) has all of the details that you will need to get going.
-
-If you are adding a command on your own machine(s), then there is really no special model to keep in mind. However, since your users will be using the local commands through the `dotnet` driver, we strongly suggest to keep to the principles outlined in the [CLI UX guidelines](cli-ux-guidelines.md) to have an unified user experience for your users.
diff --git a/Documentation/general/tab-completion.md b/Documentation/general/tab-completion.md
deleted file mode 100644
index bf6fefaa3..000000000
--- a/Documentation/general/tab-completion.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# .NET CLI Tab Completion
-
-In version 2.0 of the .NET Core CLI, we have added support for providing suggestions when you press `tab`. While it's not yet enabled by default, you can try it out today by installing a [preview build](https://github.com/dotnet/cli#installers-and-binaries) from the master branch or by building from source.
-
-Here are some examples of what it provides:
-
-Input | becomes | because
-:------------------------------------|:----------------------------------------------------------------------------|:--------------------------------
-`dotnet a⇥` | `dotnet add` | `add` is the first subcommand, alphabetically.
-`dotnet add p⇥` | `dotnet add --help` | it matches substrings and `--help` comes first alphabetically.
-`dotnet add p⇥⇥` | `dotnet add package` | pressing tab a second time brings up the next suggestion.
-`dotnet add package Microsoft⇥` | `dotnet add package Microsoft.ApplicationInsights.Web` | results are returned alphabetically.
-`dotnet remove reference ⇥` | `dotnet remove reference ..\..\src\OmniSharp.DotNet\OmniSharp.DotNet.csproj` | it is project file aware.
-
-## How to enable it
-
-Tab completion is currently supported in three shells: PowerShell, bash, and zsh. These scripts assume that `dotnet` v2.0 is on your path. You can verify that you have the correct version of `dotnet` on your path by trying out the new `complete` command directly:
-
-```
-[04/26/2017 11:38:20] C:\
-> dotnet complete "dotnet add p"
-```
-
-If you just installed `dotnet` you may see the first-run output:
-
-```
-Welcome to .NET Core!
----------------------
-Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
-
-Telemetry
---------------
-The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community.
-You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
-You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
-
-Configuring...
--------------------
-A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
-Decompressing 100% 4936 ms
-Expanding 100% 17195 ms
-```
-
-You should see the following ouput (perhaps coming at the end of the first-run output). This indicates that `dotnet` is resolving to a v2.0 installation that supports completion.
-
-```
---help
-package
-```
-
-### PowerShell
-
-To enable tab completion in PowerShell, edit your PowerShell profile:
-
-```
-notepad $PROFILE
-```
-
-Add the contents of [register-completions.ps1](https://github.com/dotnet/cli/blob/master/scripts/register-completions.ps1) to this file and save.
-
-### bash
-
-To enable tab completion in bash, edit your `.bashrc` file to add the contents of [register-completions.bash](https://github.com/dotnet/cli/blob/master/scripts/register-completions.bash).
-
-### zsh
-
-To enable tab completion in zsh, edit your `.zshrc` file to add the contents of [register-completions.zsh](https://github.com/dotnet/cli/blob/master/scripts/register-completions.zsh).
-
-## How it works
-
-Each of these scripts provides a hook for completions for its respective shell. The logic that determines which suggestions to provide is in the CLI itself, configured using [our new parser](https://github.com/dotnet/CliCommandLineParser). You can see a code example [here](https://github.com/dotnet/cli/blob/master/src/dotnet/commands/dotnet-add/dotnet-add-package/AddPackageParser.cs#L23).
diff --git a/Documentation/manpages/sdk/dotnet-build.1 b/Documentation/manpages/sdk/dotnet-build.1
deleted file mode 100644
index 1cbb21fb7..000000000
--- a/Documentation/manpages/sdk/dotnet-build.1
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "DOTNET\-BUILD" "1" "April 2016" "" ""
-.SS NAME
-.PP
-dotnet\-build \-\- Builds a project and all of its dependencies
-.SS SYNOPSIS
-.PP
-\f[C]dotnet\ build\ [\-\-output]\ \ \ \ \ \ \ [\-\-build\-base\-path]\ [\-\-framework]\ \ \ \ \ \ \ [\-\-configuration]\ \ [\-\-runtime]\ [\-\-version\-suffix]\ \ \ \ \ [\-\-build\-profile]\ \ [\-\-no\-incremental]\ [\-\-no\-dependencies]\ \ \ \ \ []\f[]
-.SS DESCRIPTION
-.PP
-The \f[C]dotnet\ build\f[] command builds multiple source file from a
-source project and its dependencies into a binary.
-The binary will be in Intermediate Language (IL) by default and will
-have a DLL extension.
-\f[C]dotnet\ build\f[] will also drop a \f[C]\\*.deps\f[] file which
-outlines what the host needs to run the application.
-.PP
-Building requires the existence of a lock file, which means that you
-have to run \f[C]dotnet\ restore\f[] (dotnet-restore.md) prior to
-building your code.
-.PP
-Before any compilation begins, the build verb analyzes the project and
-its dependencies for incremental safety checks.
-If all checks pass, then build proceeds with incremental compilation of
-the project and its dependencies; otherwise, it falls back to
-non\-incremental compilation.
-Via a profile flag, users can choose to receive additional information
-on how they can improve their build times.
-.PP
-All projects in the dependency graph that need compilation must pass the
-following safety checks in order for the compilation process to be
-incremental: \- not use pre/post compile scripts \- not load compilation
-tools from PATH (for example, resgen, compilers) \- use only known
-compilers (csc, vbc, fsc)
-.PP
-In order to build an executable application, you need a special
-configuration section in your project.json file:
-.IP
-.nf
-\f[C]
-{\
-\ \ \ \ "compilerOptions":\ {
-\ \ \ \ \ \ "emitEntryPoint":\ true
-\ \ \ \ }
-}
-\f[]
-.fi
-.SS OPTIONS
-.PP
-\f[C]\-o\f[], \f[C]\-\-output\f[] [DIR]
-.PP
-Directory in which to place the built binaries.
-.PP
-\f[C]\-b\f[], \f[C]\-\-build\-base\-path\f[] [DIR]
-.PP
-Directory in which to place temporary outputs.
-.PP
-\f[C]\-f\f[], \f[C]\-\-framework\f[] [FRAMEWORK]
-.PP
-Compiles for a specific framework.
-The framework needs to be defined in the project.json file.
-.PP
-\f[C]\-c\f[], \f[C]\-\-configuration\f[] [Debug|Release]
-.PP
-Defines a configuration under which to build.
-If omitted, it defaults to Debug.
-.PP
-\f[C]\-r\f[], \f[C]\-\-runtime\f[] [RUNTIME_IDENTIFIER]
-.PP
-Target runtime to build for.
-.PP
-\-\-version\-suffix [VERSION_SUFFIX]
-.PP
-Defines what \f[C]*\f[] should be replaced with in the version field in
-the project.json file.
-The format follows NuGet\[aq]s version guidelines.
-.PP
-\f[C]\-\-build\-profile\f[]
-.PP
-Prints out the incremental safety checks that users need to address in
-order for incremental compilation to be automatically turned on.
-.PP
-\f[C]\-\-no\-incremental\f[]
-.PP
-Marks the build as unsafe for incremental build.
-This turns off incremental compilation and forces a clean rebuild of the
-project dependency graph.
-.PP
-\f[C]\-\-no\-dependencies\f[]
-.PP
-Ignores project\-to\-project references and only builds the root project
-specified to build.
-.SH AUTHORS
-Microsoft Corporation dotnetclifeedback\@microsoft.com.
diff --git a/Documentation/manpages/sdk/dotnet-compile-native.1 b/Documentation/manpages/sdk/dotnet-compile-native.1
deleted file mode 100644
index 17b4fed31..000000000
--- a/Documentation/manpages/sdk/dotnet-compile-native.1
+++ /dev/null
@@ -1,125 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "dotnet-native" "1" "January 2016" "" ""
-.SH NAME
-.PP
-dotnet\-compile\-native \-\- Compiles IL binaries to native binaries.
-.SH SYNOPSIS
-.PP
-dotnet compile [\-\-appdepsdk] [\-\-configuration] [\-\-ilcargs]
-[\-\-linklib] [\-\-logpath] [\-\-mode] [\-\-out] [\-\-reference]
-[\-\-temp\-out] [\-\-verbose]
-.SH DESCRIPTION
-.PP
-The \f[C]compile\-native\f[] command compiles IL assemblies to native
-machine code.
-It is used by \f[C]dotnet\-compile\ \-\-native\f[].
-.PP
-The output is a native exe that conforms to the architecture of the
-underlying operating system (i.e.
-running on 64\-bit OS will produce a native 64\-bit exe).
-This can be overriden via the \-\-arch switch and specifying the wanted
-architecture.
-The executable has a default extension of "" on Linux and OS X and
-".exe" on Windows.
-The source must include a `static void Main(string[] args) entry point
-and specify compilationOptions.emitEntryPoint in the project.json.
-.PP
-Output files are written to the child \f[C]bin\f[] folder, which will be
-created if it doesn\[aq]t exist.
-Files will be overwritten as needed.
-.SH OPTIONS
-.PP
-\f[C]\-\-appdepsdk\ \f[]
-.IP
-.nf
-\f[C]
-Path\ to\ custom\ AppDepSDK
-\f[]
-.fi
-.PP
-\f[C]\-c,\ \-\-configuration\ [debug|release]\f[]
-.IP
-.nf
-\f[C]
-Build\ configuration.\ Defaults\ to\ `debug`.
-\f[]
-.fi
-.PP
-\f[C]\-\-ilcargs\ \f[]
-.IP
-.nf
-\f[C]
-Custom\ arguments\ for\ the\ IL\ Compiler.
-\f[]
-.fi
-.PP
-\f[C]\-\-ilcpath\ \f[]
-.IP
-.nf
-\f[C]
-Path\ to\ a\ custom\ ilc.exe
-\f[]
-.fi
-.PP
-\f[C]\-\-linklib\ \f[]
-.IP
-.nf
-\f[C]
-Path\ to\ static\ lib\ to\ link
-\f[]
-.fi
-.PP
-\f[C]\-\-logpath\ \f[]
-.IP
-.nf
-\f[C]
-Enables\ logging\ and\ writes\ native\ compilation\ logs\ to\ the\ given\ path.
-\f[]
-.fi
-.PP
-\f[C]\-m,\ \-\-mode\ [cpp|ryujit|custom]\f[]
-.IP
-.nf
-\f[C]
-Code\ generation\ mode.\ Defaults\ to\ ryujit.
-\f[]
-.fi
-.PP
-\f[C]\-o,\ \-\-out\ directoryname\f[]
-.IP
-.nf
-\f[C]
-Output\ directory\ for\ the\ native\ executable.
-\f[]
-.fi
-.PP
-\f[C]\-r,\ \-\-reference\f[]
-.IP
-.nf
-\f[C]
-Path\ to\ a\ managed\ dll\ reference\ for\ the\ app.
-\f[]
-.fi
-.PP
-\f[C]\-t,\ \-\-temp\-out\f[]
-.IP
-.nf
-\f[C]
-Specifies\ temporary\ directory\ for\ intermediate\ files.
-\f[]
-.fi
-.PP
-\f[C]\-v,\ \-\-verbose\f[]
-.IP
-.nf
-\f[C]
-Prints\ verbose\ logging\ information,\ to\ follow\ the\ flow\ of\ execution\ of\ the\ command.
-\f[]
-.fi
-.SH SEE ALSO
-.PP
-dotnet\-compile(1), dotnet(1), dotnet\-restore(1)
-.SH AUTHORS
-Zlatko Knezevic zlakne\@microsoft.com.
diff --git a/Documentation/manpages/sdk/dotnet-compile.1 b/Documentation/manpages/sdk/dotnet-compile.1
deleted file mode 100644
index de2963110..000000000
--- a/Documentation/manpages/sdk/dotnet-compile.1
+++ /dev/null
@@ -1,157 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "dotnet-compiler" "1" "January 2016" "" ""
-.SH NAME
-.PP
-dotnet\-compile \-\- Compiles source files for a single project to a
-binary format and saves to a target file.
-.SH SYNOPSIS
-.PP
-dotnet compile [\-\-native] [\-\-output] [\-\-temp\-output]
-[\-\-framework] [\-\-configuration] [\-\-output] [\-\-arch] [\-\-cpp]
-[\-ilc\-args] [\-\-verbose]
-.SH DESCRIPTION
-.PP
-The compile command compiles source files from a single project to a
-binary file, either intermediate language (IL) byte code or native
-machine code, depending on the options provided.
-The default option is compilation to IL byte code, but may change in the
-future.
-Users who want to benefit from incremental builds and who want to
-compile both the project and its dependencies should use the
-dotnet\-build(1) command.
-.PP
-The result of compilation is by default an executable file that can be
-ran.
-Output files, are written to the child \f[C]bin\f[] folder, which will
-be created if it doesn\[aq]t exist.
-Files will be overwritten as needed.
-The temporary files that are created during compilation are placed in
-the child \f[C]obj\f[] folder.
-.PP
-The executables also require a special configuration section in
-project.json:
-.IP
-.nf
-\f[C]
-{\
-\ \ \ \ "compilationOptions":\ {
-\ \ \ \ \ \ "emitEntryPoint":\ true
-\ \ \ \ }
-}
-\f[]
-.fi
-.PP
-The default native [\-\-native] output is a native exe that conforms to
-the architecture of the underlying operating system (i.e.
-running on 64\-bit OS will produce a native 64\-bit exe).
-This can be overriden via the \-\-arch switch and specifying the wanted
-architecture.
-The executable has a default extension of "" on Linux and OS X and
-".exe" on Windows.
-The source must include a static void main entry point, or it is an
-error, unless otherwise specified in the project.json.
-The dynamic library [dylib] output option has the default extension of
-".so" on Linux/UNIX, ".dynlib" on OS X and ".dll" on Windows.
-The static library [staticlib] option has the default extension of ".a"
-on Linux, UNIX and OS X and ".lib" on Windows.
-.PP
-This command relies on the following artifacts: source files,
-project.json project file and the "lock" file (project.lock.json).
-Prior to invoking dotnet\-compile, dotnet\-restore(1) should be run to
-restore any dependencies that are needed for the application.
-.SH OPTIONS
-.PP
-\f[C]\-n,\ \-\-native\f[]
-.IP
-.nf
-\f[C]
-Compiles\ source\ to\ native\ machine\ code,\ for\ the\ local\ machine.\ The\ default\ is\ a\ native\ executable.\ The\ default\ executable\ extension\ is\ no\ extension\ and\ ".exe"\ on\ Windows.
-\f[]
-.fi
-.PP
-\f[C]\-t,\ \-\-temp\-output\ \f[]
-.IP
-.nf
-\f[C]
-Path\ where\ to\ drop\ the\ temporary\ binaries\ that\ are\ produced\ during\ compile.\ By\ default,\ the\ temporary\ binaries\ are\ dropped\ in\ the\ `obj`\ directory\ in\ the\ directory\ where\ `project.json`\ files\ lives,\ that\ is,\ where\ the\ application\ lives.\ \
-\f[]
-.fi
-.PP
-\f[C]\-f,\ \-\-framework\ \f[]
-.IP
-.nf
-\f[C]
-Compile\ the\ application\ for\ the\ specified\ framework.\ If\ the\ framework\ is\ not\ specified,\ one\ specified\ in\ `project.json`\ will\ be\ used.\
-\f[]
-.fi
-.PP
-\f[C]\-c,\ \-\-configuration\ \f[]
-.IP
-.nf
-\f[C]
-Compile\ the\ application\ under\ the\ specified\ configuration.\ If\ not\ specified,\ the\ configuration\ will\ default\ to\ "Debug".\ \
-\f[]
-.fi
-.PP
-\f[C]\-o,\ \-\-output\ filename\f[]
-.IP
-.nf
-\f[C]
-Specifies\ the\ filename\ to\ be\ used.\ By\ default,\ the\ resulting\ filename\ will\ be\ the\ same\ as\ the\ project\ name\ specified\ in\ `project.json`,\ if\ one\ exists,\ or\ the\ directory\ in\ which\ the\ source\ files\ reside.\
-\f[]
-.fi
-.PP
-\f[C]\-\-no\-project\-dependencies\f[]
-.IP
-.nf
-\f[C]
-Skips\ building\ cross\-project\ references.\ The\ effect\ of\ this\ is\ that\ only\ the\ current\ project\ will\ be\ built.\
-\f[]
-.fi
-.PP
-\f[C]\-a,\ \-\-arch\f[]
-.IP
-.nf
-\f[C]
-The\ architecture\ for\ which\ to\ compile.\ x64\ only\ currently\ supported.
-\f[]
-.fi
-.PP
-\f[C]\-\-ilc\-args\ \f[]
-.IP
-.nf
-\f[C]
-Specified\ parameters\ are\ passed\ through\ to\ ILC\ and\ are\ used\ by\ the\ engine\ when\ doing\ native\ compilation.\
-\f[]
-.fi
-.PP
-\f[C]\-\-cpp\f[]
-.IP
-.nf
-\f[C]
-Specify\ the\ C++\ code\ generator\ to\ do\ native\ compilation\ of\ code\ instead\ of\ the\ default\ RyuJIT.\ \ \ \ \ \ \
-\f[]
-.fi
-.PP
-\f[C]\-v,\ \-\-verbose\f[]
-.IP
-.nf
-\f[C]
-Prints\ verbose\ logging\ information,\ to\ follow\ the\ flow\ of\ execution\ of\ the\ command.
-\f[]
-.fi
-.PP
-\f[C]\-h,\ \-\-help\f[]
-.IP
-.nf
-\f[C]
-Show\ short\ help.\
-\f[]
-.fi
-.SH SEE ALSO
-.PP
-dotnet\-restore(1), dotnet\-publish(1), dotnet(1)
-.SH AUTHORS
-Zlatko Knezevic zlakne\@microsoft.com.
diff --git a/Documentation/manpages/sdk/dotnet-new.1 b/Documentation/manpages/sdk/dotnet-new.1
deleted file mode 100644
index 5dfdbd490..000000000
--- a/Documentation/manpages/sdk/dotnet-new.1
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "DOTNET\-NEW" "1" "June 2016" "" ""
-.SS NAME
-.PP
-dotnet\-new \-\- Create a new sample .NET Core project
-.SS SYNOPSIS
-.PP
-dotnet new [\-\-type] [\-\-lang]
-.SS DESCRIPTION
-.PP
-The \f[C]dotnet\ new\f[] command provides a convenient way to initialize
-a valid .NET Core project and sample source code to try out the Command
-Line Interface (CLI) toolset.
-.PP
-This command is invoked in the context of a directory.
-When invoked, the command will result in two main artifacts being
-dropped to the directory:
-.IP "1." 3
-A \f[C]Program.cs\f[] (or \f[C]Program.fs\f[]) file that contains a
-sample "Hello World" program.
-.IP "2." 3
-A valid \f[C]project.json\f[] file.
-.PP
-After this, the project is ready to be compiled and/or edited further.
-.SS Options
-.PP
-\f[C]\-l\f[], \f[C]\-\-lang\ [C#|F#]\f[]
-.PP
-Language of the project.
-Defaults to \f[C]C#\f[].
-\f[C]csharp\f[] (\f[C]fsharp\f[]) or \f[C]cs\f[] (\f[C]fs\f[]) are also
-valid options.
-.PP
-\f[C]\-t\f[], \f[C]\-\-type\f[]
-.PP
-Type of the project.
-Valid values for C# are:
-.IP \[bu] 2
-\f[C]console\f[]
-.IP \[bu] 2
-\f[C]web\f[]
-.IP \[bu] 2
-\f[C]lib\f[]
-.IP \[bu] 2
-\f[C]xunittest\f[]
-.PP
-Valid values for F# are:
-.IP \[bu] 2
-\f[C]console\f[]
-.SS EXAMPLES
-.PP
-\f[C]dotnet\ new\f[]
-.IP
-.nf
-\f[C]
-Drops\ a\ sample\ C##\ project\ in\ the\ current\ directory.
-\f[]
-.fi
-.PP
-\f[C]dotnet\ new\ \-\-lang\ f##\f[]
-.IP
-.nf
-\f[C]
-Drops\ a\ sample\ F##\ project\ in\ the\ current\ directory.
-\f[]
-.fi
-.PP
-\f[C]dotnet\ new\ \-\-lang\ c##\f[]
-.IP
-.nf
-\f[C]
-Drops\ a\ sample\ C##\ project\ in\ the\ current\ directory.
-\f[]
-.fi
-.SH SEE ALSO
-.PP
-dotnet\-run(1)
-.SH AUTHORS
-Microsoft Corporation dotnetclifeedback\@microsoft.com.
diff --git a/Documentation/manpages/sdk/dotnet-pack.1 b/Documentation/manpages/sdk/dotnet-pack.1
deleted file mode 100644
index 6cb751efd..000000000
--- a/Documentation/manpages/sdk/dotnet-pack.1
+++ /dev/null
@@ -1,91 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "DOTNET\-PACK" "1" "June 2016" "" ""
-.SS NAME
-.PP
-\f[C]dotnet\-pack\f[] \- Packs the code into a NuGet package
-.SS SYNOPSIS
-.PP
-\f[C]dotnet\ pack\ [\-\-output]\ \ \ \ \ \ \ [\-\-no\-build]\ [\-\-build\-base\-path]\ \ \ \ \ \ \ [\-\-configuration]\ \ [\-\-version\-suffix]\ \ \ \ \ []\f[]
-.SS DESCRIPTION
-.PP
-The \f[C]dotnet\ pack\f[] command builds the project and creates NuGet
-packages.
-The result of this operation is two packages with the \f[C]nupkg\f[]
-extension.
-One package contains the code and the other contains the debug symbols.
-.PP
-NuGet dependencies of the project being packed are added to the nuspec
-file, so they are able to be resolved when the package is installed.
-Project\-to\-project references are not packaged inside the project by
-default.
-If you wish to do this, you need to reference the required project in
-your dependencies node with a \f[C]type\f[] set to "build" like in the
-following example:
-.IP
-.nf
-\f[C]
-{
-\ \ \ \ "version":\ "1.0.0\-*",
-\ \ \ \ "dependencies":\ {
-\ \ \ \ \ \ \ \ "ProjectA":\ {
-\ \ \ \ \ \ \ \ \ \ \ \ "target":\ "project",
-\ \ \ \ \ \ \ \ \ \ \ \ "type":\ "build"
-\ \ \ \ \ \ \ \ }
-\ \ \ \ }
-}
-\f[]
-.fi
-.PP
-\f[C]dotnet\ pack\f[] by default first builds the project.
-If you wish to avoid this, pass the \f[C]\-\-no\-build\f[] option.
-This can be useful in Continuous Integration (CI) build scenarios in
-which you know the code was just previously built, for example.
-.SS OPTIONS
-.PP
-\f[C][project]\f[]
-.PP
-The project to pack.
-It can be either a path to a \f[C]project.json\f[] file or to a
-directory.
-If omitted, it will default to the current directory.
-.PP
-\f[C]\-o\f[], \f[C]\-\-output\f[] [DIR]
-.PP
-Places the built packages in the directory specified.
-.PP
-\f[C]\-\-no\-build\f[]
-.PP
-Skips the building phase of the packing process.
-.PP
-\f[C]\-\-build\-base\-path\f[]
-.PP
-Places the temporary build artifacts in the specified directory.
-By default, they go to the obj directory in the current directory.
-.PP
-\f[C]\-c\f[], \f[C]\-\-configuration\ [Debug|Release]\f[]
-.PP
-Configuration to use when building the project.
-If not specified, will default to "Debug".
-.SS EXAMPLES
-.PP
-\f[C]dotnet\ pack\f[]
-.PP
-Packs the current project.
-.PP
-\f[C]dotnet\ pack\ ~/projects/app1/project.json\f[]
-.PP
-Packs the app1 project.
-.PP
-\f[C]dotnet\ pack\ \-\-output\ nupkgs\f[]
-.PP
-Packs the current application and place the resulting packages into the
-specified folder.
-.PP
-\f[C]dotnet\ pack\ \-\-no\-build\ \-\-output\ nupkgs\f[]
-.PP
-Packs the current project into the specified folder and skips the build
-step.
-.SH AUTHORS
-Microsoft Corporation dotnetclifeedback\@microsoft.com.
diff --git a/Documentation/manpages/sdk/dotnet-publish.1 b/Documentation/manpages/sdk/dotnet-publish.1
deleted file mode 100644
index 40393ec2a..000000000
--- a/Documentation/manpages/sdk/dotnet-publish.1
+++ /dev/null
@@ -1,107 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "DOTNET\-PUBLISH" "1" "June 2016" "" ""
-.SS NAME
-.PP
-\f[C]dotnet\-publish\f[] \- Packs the application and all of its
-dependencies into a folder getting it ready for publishing
-.SS SYNOPSIS
-.PP
-\f[C]dotnet\ publish\ [\-\-framework]\ \ \ \ \ \ \ [\-\-runtime]\ [\-\-build\-base\-path]\ [\-\-output]\ \ \ \ \ \ \ [\-\-version\-suffix]\ [\-\-configuration]\ \ \ \ \ \ \ []\f[]
-.SS DESCRIPTION
-.PP
-\f[C]dotnet\ publish\f[] compiles the application, reads through its
-dependencies specified in the \f[C]project.json\f[] file and publishes
-the resulting set of files to a directory.
-.PP
-Depending on the type of portable app, the resulting directory will
-contain the following:
-.IP "1." 3
-\f[B]Portable application\f[] \- application\[aq]s intermediate language
-(IL) code and all of application\[aq]s managed dependencies.
-.RS 4
-.IP \[bu] 2
-\f[B]Portable application with native dependencies\f[] \- same as above
-with a sub\-directory for the supported platform of each native
-dependency.
-.RE
-.IP "2." 3
-\f[B]Self\-contained application\f[] \- same as above plus the entire
-runtime for the targeted platform.
-.PP
-The above types are covered in more details in the types of portable
-applications (../../app-types.md) topic.
-.SS OPTIONS
-.PP
-\f[C][project]\f[]
-.PP
-\f[C]dotnet\ publish\f[] needs access to the \f[C]project.json\f[] file
-to work.
-If it is not specified on invocation via [project],
-\f[C]project.json\f[] in the current directory will be the default.
-.PD 0
-.P
-.PD
-If no \f[C]project.json\f[] can be found, \f[C]dotnet\ publish\f[] will
-throw an error.
-.PP
-\f[C]\-f\f[], \f[C]\-\-framework\f[] [FID]
-.PP
-Publishes the application for a given framework identifier (FID).
-If not specified, FID is read from \f[C]project.json\f[].
-In no valid framework is found, the command will throw an error.
-If multiple valid frameworks are found, the command will publish for all
-valid frameworks.
-.PP
-\f[C]\-r\f[], \f[C]\-\-runtime\f[] [RID]
-.PP
-Publishes the application for a given runtime.
-.PP
-\f[C]\-b\f[], \f[C]\-\-build\-base\-path\f[] [DIR]
-.PP
-Directory in which to place temporary outputs.
-.PP
-\f[C]\-o\f[], \f[C]\-\-output\f[]
-.PP
-Specify the path where to place the directory.
-If not specified, it will default to
-\f[I]\&./bin/[configuration]/[framework]/\f[] for portable applications
-or \f[I]\&./bin/[configuration]/[framework]/[runtime]\f[] for
-self\-contained applications.
-.PP
-\-\-version\-suffix [VERSION_SUFFIX]
-.PP
-Defines what \f[C]*\f[] should be replaced with in the version field in
-the project.json file.
-.PP
-\f[C]\-c\f[], \f[C]\-\-configuration\ [Debug|Release]\f[]
-.PP
-Configuration to use when publishing.
-The default value is Debug.
-.SS EXAMPLES
-.PP
-\f[C]dotnet\ publish\f[]
-.PP
-Publishes an application using the framework found in
-\f[C]project.json\f[].
-If \f[C]project.json\f[] contains \f[C]runtimes\f[] node, publish for
-the RID of the current platform.
-.PP
-\f[C]dotnet\ publish\ ~/projects/app1/project.json\f[]
-.PP
-Publishes the application using the specified \f[C]project.json\f[].
-.PP
-\f[C]dotnet\ publish\ \-\-framework\ netcoreapp1.0\f[]
-.PP
-Publishes the current application using the \f[C]netcoreapp1.0\f[]
-framework.
-.PP
-\f[C]dotnet\ publish\ \-\-framework\ netcoreapp1.0\ \-\-runtime\ osx.10.11\-x64\f[]
-.PP
-Publishes the current application using the \f[C]netcoreapp1.0\f[]
-framework and runtime for \f[C]OS\ X\ 10.10\f[].
-This RID has to exist in the \f[C]project.json\f[] \f[C]runtimes\f[]
-node.
-.SH AUTHORS
-Microsoft Corporation dotnetclifeedback\@microsoft.com.
diff --git a/Documentation/manpages/sdk/dotnet-restore.1 b/Documentation/manpages/sdk/dotnet-restore.1
deleted file mode 100644
index 0befbf747..000000000
--- a/Documentation/manpages/sdk/dotnet-restore.1
+++ /dev/null
@@ -1,97 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "DOTNET\-RESTORE" "1" "June 2016" "" ""
-.SS NAME
-.PP
-\f[C]dotnet\-restore\f[] \- Restores the dependencies and tools of a
-project
-.SS SYNOPSIS
-.PP
-\f[C]dotnet\ restore\ [\-\-source]\ \ \ \ \ \ \ [\-\-packages]\ [\-\-disable\-parallel]\ \ \ \ \ \ \ [\-\-fallbacksource]\ [\-\-configfile]\ [\-\-verbosity]\ \ \ \ \ []\f[]
-.SS DESCRIPTION
-.PP
-The \f[C]dotnet\ restore\f[] command uses NuGet to restore dependencies
-as well as project\-specific tools that are specified in the
-project.json file.
-By default, the restoration of dependencies and tools are done in
-parallel.
-.PP
-In order to restore the dependencies, NuGet needs the feeds where the
-packages are located.
-Feeds are usually provided via the NuGet.config configuration file; a
-default one is present when the CLI tools are installed.
-You can specify more feeds by creating your own NuGet.config file in the
-project directory.
-Feeds can also be specified per invocation on the command line.
-.PP
-For dependencies, you can specify where the restored packages are placed
-during the restore operation using the \f[C]\-\-packages\f[] argument.
-If not specified, the default NuGet package cache is used.
-It is found in the \f[C]\&.nuget/packages\f[] directory in the
-user\[aq]s home directory on all operating systems (for example,
-\f[C]/home/user1\f[] on Linux or \f[C]C:\\Users\\user1\f[] on Windows).
-.PP
-For project\-specific tooling, \f[C]dotnet\ restore\f[] first restores
-the package in which the tool is packed, and then proceeds to restore
-the tool\[aq]s dependencies as specified in its project.json.
-.SS OPTIONS
-.PP
-\f[C][root]\f[]
-.PP
-A list of projects or project folders to restore.
-The list can contain either a path to a \f[C]project.json\f[] file, or a
-path to \f[C]global.json\f[] file or folder.
-The restore operation runs recursively for all subdirectories and
-restores for each given project.json file it finds.
-.PP
-\f[C]\-s\f[], \f[C]\-\-source\f[] [SOURCE]
-.PP
-Specifies a source to use during the restore operation.
-This overrides all of the sources specified in the NuGet.config file(s).
-.PP
-\f[C]\-\-packages\f[] [DIR]
-.PP
-Specifies the directory to place the restored packages in.
-.PP
-\f[C]\-\-disable\-parallel\f[]
-.PP
-Disables restoring multiple projects in parallel.
-.PP
-\f[C]\-f\f[], \f[C]\-\-fallbacksource\f[] [FEED]
-.PP
-Specifies a fallback source that will be used in the restore operation
-if all other sources fail.
-All valid feed formats are allowed.
-.PP
-\f[C]\-\-configfile\f[] [FILE]
-.PP
-Configuration file (NuGet.config) to use for the restore operation.
-.PP
-\f[C]\-\-verbosity\f[] [LEVEL]
-.PP
-The verbosity of logging to use.
-Allowed values: Debug, Verbose, Information, Minimal, Warning, or Error.
-.SS EXAMPLES
-.PP
-\f[C]dotnet\ restore\f[]
-.PP
-Restores dependencies and tools for the project in the current
-directory.
-.PP
-\f[C]dotnet\ restore\ ~/projects/app1/project.json\f[]
-.PP
-Restores dependencies and tools for the \f[C]app1\f[] project found in
-the given path.
-.PP
-\f[C]dotnet\ restore\ \-\-f\ c:\\packages\\mypackages\f[]
-.PP
-Restores the dependencies and tools for the project in the current
-directory using the file path provided as the fallback source.
-.PP
-\f[C]dotnet\ restore\ \-\-verbosity\ Error\f[]
-.PP
-Restores dependencies and tools for the project in the current directory
-and shows only errors in the output.
-.SH AUTHORS
-Microsoft Corporation dotnetclifeedback\@microsoft.com.
diff --git a/Documentation/manpages/sdk/dotnet-run.1 b/Documentation/manpages/sdk/dotnet-run.1
deleted file mode 100644
index 3dd7d1feb..000000000
--- a/Documentation/manpages/sdk/dotnet-run.1
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "DOTNET\-RUN" "1" "June 2016" "" ""
-.SS NAME
-.PP
-dotnet\-run \-\- Runs source code \[aq]in\-place\[aq] without any
-explicit compile or launch commands.
-.SS SYNOPSIS
-.PP
-\f[C]dotnet\ run\ [\-\-framework]\ [\-\-configuration]\ \ \ \ \ [\-\-project]\ [\-\-help]\ [\-\-]\f[]
-.SS DESCRIPTION
-.PP
-The \f[C]dotnet\ run\f[] command provides a convenient option to run
-your application from the source code with one command.
-It compiles source code, generates an output program and then runs that
-program.
-This command is useful for fast iterative development and can also be
-used to run a source\-distributed program (for example, a website).
-.PP
-This command relies on \f[C]dotnet\ build\f[] (dotnet-build.md) to build
-source inputs to a .NET assembly, before launching the program.
-The requirements for this command and the handling of source inputs are
-all inherited from the build command.
-The documentation for the build command provides more information on
-those requirements.
-.PP
-Output files are written to the child \f[C]bin\f[] folder, which will be
-created if it doesn\[aq]t exist.
-Files will be overwritten as needed.
-Temporary files are written to the child \f[C]obj\f[] folder.
-.PP
-In case of a project with multiple specified frameworks,
-\f[C]dotnet\ run\f[] will first select the .NET Core frameworks.
-If those do not exist, it will error out.
-To specify other frameworks, use the \f[C]\-\-framework\f[] argument.
-.PP
-The \f[C]dotnet\ run\f[] command must be used in the context of
-projects, not built assemblies.
-If you\[aq]re trying to execute a DLL instead, you should use
-\f[C]dotnet\f[] (dotnet.md) without any command like in the following
-example:
-.PP
-\f[C]dotnet\ myapp.dll\f[]
-.PP
-For more information about the \f[C]dotnet\f[] driver, see the \&.NET
-Core Command Line Tools (CLI) (overview.md) topic.
-.SS OPTIONS
-.PP
-\f[C]\-\-\f[]
-.PP
-Delimits arguments to \f[C]dotnet\ run\f[] from arguments for the
-application being run.
-All arguments after this one will be passed to the application being
-run.
-.PP
-\f[C]\-f\f[], \f[C]\-\-framework\f[] [FID]
-.PP
-Runs the application for a given framework identifier (FID).
-.PP
-\f[C]\-c\f[], \f[C]\-\-configuration\ [Debug|Release]\f[]
-.PP
-Configuration to use when publishing.
-The default value is "Debug".
-.PP
-\f[C]\-p\f[], \f[C]\-\-project\ [PATH]\f[]
-.PP
-Specifies which project to run.
-It can be a path to a project.json file or to a directory containing a
-project.json file.
-It defaults to current directory if not specified.
-.SS EXAMPLES
-.PP
-\f[C]dotnet\ run\f[]
-.PP
-Runs the project in the current directory.
-.PP
-\f[C]dotnet\ run\ \-\-project\ /projects/proj1/project.json\f[]
-.PP
-Runs the project specified.
-.PP
-\f[C]dotnet\ run\ \-\-configuration\ Release\ \-\-\ \-\-help\f[]
-.PP
-Runs the project in the current directory.
-The \f[C]\-\-help\f[] argument above is passed to the application being
-run, since the \f[C]\-\-\f[] argument was used.
-.SH AUTHORS
-Microsoft Corporation dotnetclifeedback\@microsoft.com.
diff --git a/Documentation/manpages/sdk/dotnet-test.1 b/Documentation/manpages/sdk/dotnet-test.1
deleted file mode 100644
index 84a2cf23f..000000000
--- a/Documentation/manpages/sdk/dotnet-test.1
+++ /dev/null
@@ -1,170 +0,0 @@
-.\" Automatically generated by Pandoc 1.15.1
-.\"
-.hy
-.TH "DOTNET\-TEST" "1" "April 2016" "" ""
-.SH Dotnet Test, Adapters and Test Runners
-.PP
-This document covers the interactions between dotnet test, a potential
-adapter (like VS) and test runners (like
-xunit (https://github.com/dotnet/coreclr.xunit)).
-.PP
-It describes the communication protocol for these agents, the parameters
-that the runner needs to support and the modes on which dotnet test and
-the runner work.
-.SS Running modes
-.PP
-Dotnet test supports two running modes:
-.IP "1." 3
-Console: In console mode, dotnet test simply executes fully whatever
-command gets passed to it and outputs the results.
-Anytime you invoke dotnet test without passing \-\-port, it will run in
-console mode, which in turn will cause the runner to run in console
-mode.
-.IP "2." 3
-Design time: Anytime you pass a port to dotnet test, we will run in
-design time.
-That means that dotnet test will connect to that port using TCP and will
-then exchange a established set of messages with whatever else is
-connected to that port.
-When this happens, the runner also receives a port (a new one, mind you)
-that dotnet test will use to communicate with it.
-The reason why the runner also uses TCP to communicate with dotnet test
-is because in design mode, it is not sufficient to just output results
-to the console.
-We need to send the adapter structure messages containing the results of
-the test execution.
-.SS Communication protocol in design time.
-.IP "1." 3
-Because during design time, dotnet test connects to a port when it
-starts up, the adapter needs to be listening on that port otherwise
-dotnet test will fail.
-We did it like this so that the adapter could reserve all the ports it
-needs by binding and listening to them before dotnet test ran and tried
-to get ports for the runner.
-.IP "2." 3
-Once dotnet test starts, it sends a TestSession.Connected message to the
-adapter indicating that it is ready to receive messages.
-.IP "3." 3
-It is possible to send an optional version
-check (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Messages/ProtocolVersionMessage.cs)
-message with the adapter version of the protocol in it.
-Dotnet test will send back the version of the protocol that it supports.
-.PP
-All messages have the format described here:
-Message.cs (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Messages/Message.cs).
-The payload formats for each message is described in links to the
-classes used to de/serialize the information in the description of the
-protocol.
-.SS Test Execution
-.PP
-[IMAGE: alt
-tag (../../../../Documentation/images/DotnetTestExecuteTests.png)]
-.IP "1." 3
-After the optional version check, the adapter sends a
-TestExecution.GetTestRunnerProcessStartInfo, with the
-tests (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Messages/RunTestsMessage.cs)
-it wants to execute inside of it.
-Dotnet test sends back a FileName and Arguments inside a
-TestStartInfo (https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-test/TestStartInfo.cs)
-payload that the adapter can use to start the runner.
-In the past, we would send the list of tests to run as part of that
-argument, but we were actually going over the command line size limit
-for some test projects.
-.IP "2." 3
-As part of the arguments, we send a port that the runner should connect
-to and for executing tests, a \-\-wait\-command flag, that indicates
-that the runner should connect to the port and wait for commands,
-instead of going ahead and executing the tests.
-.IP "3." 3
-At this point, the adapter can launch the runner (and attach to it for
-debugging if it chooses to).
-.IP "4." 3
-Once the runner starts, it sends dotnet test a TestRunner.WaitCommand
-message that indicates it is ready to receive commands, at which point
-dotnet test sends a TestRunner.Execute with the list of
-tests (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Messages/RunTestsMessage.cs)
-to run.
-This bypasses the command line size limit described above.
-.IP "5." 3
-The runner then sends dotnet test (and it passes forward to the adapter)
-a TestExecution.TestStarted for each tests as they start with the
-test (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Test.cs)
-information inside of it.
-.IP "6." 3
-The runner also sends dotnet test (and it forwards to the adapter) a
-TestExecution.TestResult for each test with the individual
-result (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/TestResult.cs)
-of the test.
-.IP "7." 3
-After all tests finish, the runner sends a TestRunner.Completed message
-to dotnet test, which dotnet test sends as TestExecution.Completed to
-the adapter.
-.IP "8." 3
-Once the adapter is done, it sends dotnet test a TestSession.Terminate
-which will cause dotnet test to shutdown.
-.SS Test discovery
-.PP
-[IMAGE: alt
-tag (../../../..//Documentation/images/DotnetTestDiscoverTests.png)]
-.IP "1." 3
-After the optional version check, the adapter sends a
-TestDiscovery.Start message.
-Because in this case, the adapter does not need to attach to the
-process, dotnet test will start the runner itself.
-Also, since there is no long list of arguments to be passed to the
-runner, no \-\-wait\-command flag is needed to be passed to the runner.
-dotnet test only passes a \-\-list argument to the runner, which means
-the runner should not run the tests, just list them.
-.IP "2." 3
-The runner then sends dotnet test (and it passes forward to the adapter)
-a TestDiscovery.TestFound for each
-test (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.Testing.Abstractions/Test.cs)
-found.
-.IP "3." 3
-After all tests are discovered, the runner sends a TestRunner.Completed
-message to dotnet test, which dotnet test sends as
-TestDiscovery.Completed to the adapter.
-.IP "4." 3
-Once the adapter is done, it sends dotnet test a TestSession.Terminate
-which will cause dotnet test to shutdown.
-.SS Dotnet test parameters
-.PP
-Any parameters not accepted by dotnet test will be forwarded to the
-runner.
-This is the list of parameters supported by dotnet test from its own
-help print out:
-.PP
-Usage: dotnet test [arguments] [options]
-.PP
-Arguments: The project to test, defaults to the current directory.
-Can be a path to a project.json or a project directory.
-.PP
-Options: \-?|\-h|\-\-help Show help information \-\-parentProcessId Used
-by IDEs to specify their process ID.
-Test will exit if the parent process does.
-\-\-port Used by IDEs to specify a port number to listen for a
-connection.
-\-c|\-\-configuration Configuration under which to build \-o|\-\-output
-Directory in which to find the binaries to be run
-\-b|\-\-build\-base\-path Directory in which to find temporary outputs
-\-f|\-\-framework Looks for test binaries for a specific framework
-\-r|\-\-runtime Look for test binaries for a for the specified runtime
-\-\-no\-build Do not build project before testing
-.SS Minimum parameters that the runner needs to support
-.IP \[bu] 2
-AssemblyUnderTest: Path to the dll that contains the tests to be run.
-.IP \[bu] 2
-\-\-port: Used by dotnet test to specify a port number that the runner
-should connect to.
-.IP \[bu] 2
-\-\-list: Indicates that the tests should only be listed and not
-executed.
-.IP \[bu] 2
-\-\-designtime: Indicates that the runner is running in design time, for
-instance, inside an adapter.
-.IP \[bu] 2
-\-\-wait\-command: Indicates that the runner should wait to receive
-commands through the TCP channel instead of running tests right away.
-We use this to get around the command line size limit.
-.SH AUTHORS
-Microsoft Corporation dotnetclifeedback\@microsoft.com.
diff --git a/Documentation/migration-issues.md b/Documentation/migration-issues.md
deleted file mode 100644
index 331f6c480..000000000
--- a/Documentation/migration-issues.md
+++ /dev/null
@@ -1,17 +0,0 @@
-## Getting help on migration issues
-You're using the new .NET Core tools that are MSBuild-based. You took your project.json project and ran `dotnet migrate` or migrated from Visual Studio 2017...and you maybe ran into problems.
-
-The best way to get help is to [file an issue](https://github.com/dotnet/cli/issues/new) on this repo and we will investigate and provide help and/or fixes as part of new CLI builds. Please make sure to read the instructions below and to **add the [MIGRATION] prefix to the issue title**.
-
-### Filing an migration issue
-CLI is a very high-traffic repository in terms of issues. In order to be able to respond fast to migration issues, we need the issue to be formatted in a certain way:
-
-* Add `[MIGRATION]:` prefix to the title of the issue.
-* Make sure that we can see your project.json
- * If you have a GH repo or this is an OSS project, share the URL to the repo.
- * Otherwise attach or paste the project.json contents into the issue.
- * Add all of the errors that any operation like `dotnet restore`, `dotnet build` or others reported. This will help us speedily triage where the potential problem will be.
-* Add output of `dotnet --info` to the issue so we know what build you are running.
-* Mention @blackdwarf and @livarcocc in the issue body.
-
-From there on, we will start investigating the issue and respond.
diff --git a/Documentation/project-docs/developer-guide.md b/Documentation/project-docs/developer-guide.md
deleted file mode 100644
index 0391adefa..000000000
--- a/Documentation/project-docs/developer-guide.md
+++ /dev/null
@@ -1,74 +0,0 @@
-Developer Guide
-===============
-
-## Prerequisites
-
-In order to build .NET Command Line Interface, you need the following installed on you machine.
-
-### For Windows
-
-1. git (available from http://www.git-scm.com/) on the PATH.
-
-### For Linux
-
-1. git (available from http://www.git-scm.com/) on the PATH.
-
-### For OS X
-
-1. Xcode
-2. git (available from http://www.git-scm.com/) on the PATH.
-3. Install OpenSSL (a .NET Core requirement)
- - brew update
- - brew install openssl
- - mkdir -p /usr/local/lib
- - ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
- - ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
-
-## Building/Running
-
-1. Run `build.cmd` or `build.sh` from the root depending on your OS. If you don't want to execute tests, run `build.cmd /t:Compile` or `./build.sh /t:Compile`.
- - To build the CLI in macOS Sierra, you need to set the DOTNET_RUNTIME_ID environment variable by running `export DOTNET_RUNTIME_ID=osx.10.11-x64`.
-2. Use `artifacts/{RID}/stage2/dotnet` to try out the `dotnet` command. You can also add `artifacts/{os}-{arch}/stage2` to the PATH if you want to use the build output when invoking `dotnet` from the current console.
-
-## A simple test
-Using the `dotnet` built in the previous step:
-
-1. `cd {new directory}`
-2. `dotnet new`
-3. `dotnet restore`
-4. `dotnet run`
-
-## Running tests
-
-1. To run all tests invoke `build.cmd` or `build.sh` which will build the product and run the tests.
-2. To run a specific test, cd into that test's directory and execute `dotnet test`. If using this approach, make sure to add `artifacts/{RID}/stage2` to your `PATH` and set the `NUGET_PACKAGES` environment variable to point to the repo's `.nuget/packages` directory.
-
-## Adding a Command
-
-The dotnet CLI supports several models for adding new commands:
-
-1. In the CLI itself via `dotnet.dll`
-2. Through a `tool` NuGet package
-3. Through MSBuild tasks & targets in a NuGet package
-4. Via the user's `PATH`
-
-### Commands in dotnet.dll
-Developers are generally encouraged to avoid adding commands to `dotnet.dll` or the CLI installer directly. This is appropriate for very general commands such as restore, build, publish, test, and clean, but is generally too broad of a distribution mechanism for new commands. Please create an issue and engage the team if you feel there is a missing core command that you would like to add.
-
-### Tools NuGet packages
-Many existing extensions, including those for ASP.NET Web applications, extend the CLI using Tools NuGet packages. For an example of a working packaged command look at `TestAssets/TestPackages/dotnet-hello/v1/`.
-
-### MSBuild tasks & targets
-NuGet allows adding tasks and targets to a project through a NuGet package. This mechanism, in fact, is how all .NET Core projects pull in the .NET SDK. Extending the CLI through this model has several advantages:
-
-1. Targets have access to the MSBuild Project Context, allowing them to reason about the files and properties being used to build a particular project.
-2. Targets are not CLI-specific, making them easy to share across command-line and IDE environments
-
-Commands added as targets can be invoked once the target project adds a reference to the containing NuGet package and restores.
-Targets are invoked by calling `dotnet msbuild /t:{TargetName}`
-
-### Commands on the PATH
-The dotnet CLI considers any executable on the path named `dotnet-{commandName}` to be a command it can call out to.
-
-## Things to Know
-- Any added commands are usually invoked through `dotnet {command}`. As a result of this, stdout and stderr are redirected through the driver (`dotnet`) and buffered by line. As a result of this, child commands should use Console.WriteLine in any cases where they expect output to be written immediately. Any uses of Console.Write should be followed by Console.WriteLine to ensure the output is written.
diff --git a/Documentation/project-docs/issue-filing-guide.md b/Documentation/project-docs/issue-filing-guide.md
deleted file mode 100644
index d91132709..000000000
--- a/Documentation/project-docs/issue-filing-guide.md
+++ /dev/null
@@ -1,45 +0,0 @@
-Filing issues for .NET Core CLI
-===============================
-
-As you may notice based on our issues page, the CLI repo is what is known as a
-"high-profile" and "high-volume" repo; we
-get a lot of issues. This, in turn, may mean that some issues get
-lost in the noise and/or are not reacted on with the needed speed.
-
-In order to help with the above situation, we need to have a certain way to file
-issues so that the core team of maintainers can react as fast as
-possible and can triage effectively.
-
-The below steps are something that we believe is not a huge increase in process,
-but would help us react much faster to any issues that are filed.
-
-1. Check if the [known issues](https://github.com/dotnet/core/blob/master/cli/known-issues.md) cover the issue you are running
-into. We are collecting issues that are known and that have workarounds, so it
-could be that you can get unblocked pretty easily.
-
-4. /cc the person that the issue should be assigned to (or @blackdwarf) so that person
-would get notified. In this way the correct person can immediately jump on the
-issue and triage it.
-
-5. For bugs, please be as concrete as possible on what is working, what
-is not working. Things like operating system, the version of the tools, the
-version of the installer and when you installed all help us determine the
-potential problem and allows us to easily reproduce the problem at hand.
-
-6. For enhancements please be as concrete as possible on what is the addition
-you would like to see, what scenario it covers and especially why the current
-tools cannot satisfy that scenario.
-
-Thanks and happy filing! :)
-
-## Providing the repro for bugs
-For bugs, what we need more than anything is a good repro of the defective
-behavior. We would like to go towards the "clone, run, repro" model. In short:
-
-1. If you find a bug, package up a repro in a git repo somewhere (GitHub is
-usually a good place :)).
-2. Inside the issue, specify what needs to be done (steps) to get an accurate
-repro of the bug. Ideally, this should be "here is how to build, these are the
-commands you run from the dotnet tools".
-3. We use the above to get the repro, investigate and fix!
-
diff --git a/Documentation/specs/canonical.md b/Documentation/specs/canonical.md
deleted file mode 100644
index 8c331cc9f..000000000
--- a/Documentation/specs/canonical.md
+++ /dev/null
@@ -1,445 +0,0 @@
-Canonical scenarios
-===================
-
-# Contents
-
-* [Overview](#overview)
-* [Acquisition](#acquisition)
-* Scenarios
- * [Starting a new console application](#starting-a-new-console-application)
- * [Starting a new class library](#starting-a-new-class-library)
- * [Adding 3rd party dependencies to the projects](#adding-3rd-party-dependencies-to-the-projects)
- * [Running unit tests](#running-unit-tests)
- * [Publishing a shared runtime console application](#publishing-a-shared-runtime-console-application)
- * [Publishing a self-contained console application for all platforms](#publishing-a-self-contained-console-application-for-all-platforms)
- * [Packaging a class library](#packaging-a-class-library)
- * [Installing `dotnet` extensions as tools](#installing-dotnet-extensions-as-tools)
-
-# Overview
-
-This document outlines the End-to-End canonical scenarios for the CLI tooling. The scenarios outline the planned steps that the developer needs to do to work with her applications.
-
-Each scenario is organized around a narrative, which provides an explanation on what the developers are trying to do, steps that are needed for the user to achieve the needed narrative. Steps are organized as commands that the developer would need to execute on the command line to achieve the result.
-
-These scenarios are focused on console applications and libraries.
-
-# Acquisition
-All of the scenarios below assume that the CLI tools have been acquired in some way. The acquisition of the CLI tools is explained in detail in a [separate specification](cli-install-experience.md). This document only contains a very short summary of that document.
-
-There are two main ways to acquire the CLI toolset:
-1. Using targeted platform's native installers - this approach is used by developers who want to get stable bits on their development machines and don't mind the system-wide installation and need for elevated privileges.
-2. Using a local install (a zip/tarball) - this approach is used by developers who want to enable their build servers to use CLI toolset or who want to have multiple, side-by-side installs.
-
-The bits that are gotten are same modulo potential differences in stability of the bits, however, the smoothness of the experience is not. With native installers the installers themselves do as much as possible to set up a working environment (installing dependencies where possible, setting needed environment variables etc.). Local installs require all of the work to be done by developers after dropping bits on the machine.
-
-The below scenarios must work regardless of the way used to acquire the tools.
-
-
-
-# Starting a new console application
-
-## Narrative
-The developer would like to kick the tires on .NET Core by writing a console application. She would like to use the new .NET Core CLI tooling to help her get started, manage dependencies and quickly test out the console application by running it from source. She would then like to try building the code and running it using the shared host that is installed with the CLI toolset.
-
-## Steps
-1. Create a C# console application via `dotnet new` command
-
-```
-/myapp> dotnet new myapp
-
-```
-2. Edit the C# code
-
-```
- namespace myapp
- {
- public static class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello, World!");
- }
- }
- }
-```
-
-3. Restore packages
- ```
- /myapp> dotnet restore
-
- [messages about restore progress]
-
- Writing lock file /myapp/project.lock.json
-
- /myapp>
- ```
-
-4. Run from source for a quick test
-
-```
-/myapp> dotnet run
-
-Hello World!
-
-/myapp>
-```
-
-5. Build a binary that can be executed by the shared host
-
-```
-/myapp> dotnet build
-
-[information about the build]
-
- Creating build output:
- /myapp/bin/Debug/netstandardapp1.5/myapp.dll
- /myapp/bin/Debug/netstandardapp1.5/myapp.deps
- /myapp/bin/Debug/netstandardapp1.5/[All dependencies' IL assemblies].dll
-
-/myapp>
-```
-
-6. Run the built version using the shared host in the installed toolset
-
-```
-/myapp> dotnet run /myapp/bin/Debug/netstandardapp1.5/myapp.dll
-Hello World!
-```
-
-
-# Starting a new class library
-
-## Narrative
-Once started, the developer wants to also include a class library in order to have a place to share common code. She wants to use the CLI toolset to bootstrap this effort as well.
-
-## Steps
-
-1. Create a new class library using `dotnet new`
-
-```
-/> dotnet new mylib --type lib
-
-Creating a "mylib" class library in "mylib"
-
-/mylib>
-```
-
-2. Restore the dependencies
-
- ```
- /mylib> dotnet restore
-
- [messages about restore progress]
-
- Writing lock file /mylib/project.lock.json
-
- /mylib>
- ```
-
-
-3. Edit the `MyLib.cs` file
-
-```
- namespace mylib
- {
- public class mylib
- {
- public void Method1()
- {
- }
- }
- }
-```
-
-4. Build the code
-
-```
-/mylib> dotnet build
-
-[information about the build]
-
- Creating build output:
- /mylib/bin/Debug/netstandardapp1.5/mylib.dll
- /mylib/bin/Debug/netstandardapp1.5/mylib.deps
- /mylib/bin/Debug/netstandardapp1.5/[All dependencies' IL assemblies].dll
-
-/mylib>
-
-```
-
-# Adding 3rd party dependencies to the projects
-
-## Narrative
-Working towards a complete application, the developer realizes she needs to add good JSON parsing support. Searching across the internet, she finds JSON.NET to be the most recommended choice. She now uses the CLI tooling to install a dependency off of NuGet.
-
->**NOTE:** the shape of the commands used in this scenario is still being discussed.
-
-## Steps
-
-1. Install the package
-
-```
-/myapp> dotnet pkg install Newtonsoft.Json --version 8.0.2
-
-[lots of messages about getting JSON.NET]
-
-Writing lock file /tests/project.lock.json
-
-/myapp>
-```
-
-2. Change the code to use the new dependency
-
-```
- using Newtonsoft.Json;
- namespace myapp
- {
- public static class Program
- {
- public static void Main(string[] args)
- {
- var thing = JsonConvert.DeserializeObject("{ 'item': 1 }");
- Console.WriteLine("Hello, World!");
- Console.WriteLine(thing.item);
- }
- }
- }
-```
-
-3. Run code from source
-
-```
-/myapp> dotnet run
-Hello, World!
-1
-/myapp>
-```
-
-# Running unit tests
-
-## Narrative
-Writing tests is important, and our developer knows that. She is now writing out the shared logic in her class library and she wants to make sure that she has test coverage. Investigating the manuals, she realizes that the CLI toolset comes with support for xUnit tests including the test runner.
-
-## Steps
-
-1. Create a new xunit test project using `dotnet new`
-
-```
-/> dotnet new tests --type xunit
-Created "tests" xunit test project in "tests".
-
-/tests>
-```
-2. Restore the runner and dependencies
-
- ```
- /tests> dotnet restore
-
- [messages about restore progress]
-
- Writing lock file /tests/project.lock.json
-
- [messages about tool dependencies restore]
-
- /tests>
- ```
-
-3. Add a test to the test class
-```
-using System;
-using Xunit;
-
-namespace tests
-{
- public class Tests
- {
- [Fact]
- public void AssertTrue() {
- Assert.True(true);
- }
- }
-}
-```
-
-3. Run tests using `dotnet test`
-
-```
-/tests> dotnet test
-
-[information about discovery of tests]
-
-=== TEST EXECUTION SUMMARY ===
- test Total: 1, Errors: 0, Failed: 0, Skipped: 0, Time: 0.323s
-
-/tests>
-```
-
-# Publishing a shared runtime console application
-
-## Narrative
-Coding away on the application has proven worthwhile and our developer wants to share her progress with another developer on her team. She wants to give just the application and its dependencies. Luckily, another developer can easily install the .NET Core SDK and get a shared host, which would be enough to run the application. The CLI toolset allows our developer to publish just the application's code (in IL) and dependencies.
-
-## Steps
-
-1. Publish the application
-```
- /myapp> dotnet publish --output /pubapp
-
- [Lots of messages about publishing stuff]
-
- Creating publish output:
- /pubapp/myapp/myapp.dll
- /pubapp/myapp/myapp.deps
- /pubapp/myapp/[All dependencies' IL assemblies].dll
-
- /myapp>
- ```
-
-2. Run the project publish output:
- ```
- /myapp> cd /pubapp/myapp
- /pubapp/myapp> dotnet ./myapp.dll
- Hello, World!
-
- /published/myapp>
- ```
-3. The published application can be transferred over to a machine that has the .NET Core shared host installed and it is possible for it to be ran.
-
-# Publishing a self-contained console application for all platforms
-
-## Narrative
-After getting feedback from her colleague developer, our developer decides to test on another machine. However, this machine doesn't have the shared host installed and she cannot get it installed. Luckily, she realizes that .NET Core has support for self-contained applications
-
-**NOTE**: some of the behaviours in this scenario are still being discussed with the relevant stakeholders.
-
-## Steps
-
-1. Modify the project file to enable it to be published as a standalone, platform-specific application (one that doesn't require `dotnet` on the target machine to run) for the desired platforms by adding the `"runtimes"` section:
- ```
- {
- "imports": {
- "Microsoft.ProjectType.ConsoleApplication": "1.0.0"
- },
- "runtimes": {
- "linux-x64": { },
- "win7-x64": { }
- }
- }
- ```
-
-2. Restore the project's dependencies again to ensure the platform-specific dependencies for the specified runtimes are acquired:
- ```
- /myapp> dotnet restore
-
- [lots of messages about restoring stuff]
-
- Writing lock file /myapp/project.lock.json
-
- /myapp>
- ```
-
-
-
-3. Publish the project again. In this case, the publish will publish for each runtime in the `project.json` file
- ```
- /myapp> dotnet publish --output /published/myapp
-
- [Lots of messages about publishing stuff]
-
- Creating publish output for (linux-x64):
- /published/myapp-linux-x64/myapp
- /published/myapp-linux-x64/myapp.dll
- /published/myapp-linux-x64/myapp.deps
- /published/myapp-linux-x64/[All dependencies' IL & platform-specific assemblies, inc. stdlib]
-
- Creating publish output for (win7-x64):
- /published/myapp-win7-x64/myapp
- /published/myapp-win7-x64/myapp.dll
- /published/myapp-win7-x64/myapp.deps
- /published/myapp-win7-x64/[All dependencies' IL & platform-specific assemblies, inc. stdlib]
-
- /myapp>
-
- ```
-
-4. Any of the outputs above can be xcopied to the platform in question and it will work without having to have the shared host installed.
-
-5. Publish the project for a specific platform (win7-x64):
-
-```
- /myapp> dotnet publish --output /win7/myapp --runtime win7-x64
-
- [Lots of messages about publishing stuff]
-
- Creating publish output for (win7-x64):
- /published/myapp-win7-x64/myapp
- /published/myapp-win7-x64/myapp.dll
- /published/myapp-win7-x64/myapp.deps
- /published/myapp-win7-x64/[All dependencies' IL & platform-specific assemblies, inc. stdlib]
-
- /myapp>
- ```
-
-# Packaging a class library
-
-## Narrative
-The developer wants to take the library she built and package it up as a NuGet package in order to share it with the rest of the ecosystem. Again, she would like to use the CLI toolset to achieve this. Since she wants to be sure that all her code is in a pristine condition, she will also build it one more time, run tests and then package it.
-
-## Steps
-1. Build the code to make sure no build errors have crept in
-
-```
-/mylib> dotnet build
-
-[information about the build]
-
- Creating build output:
- /myapp/bin/Debug/netstandardapp1.5/myapp.dll
- /myapp/bin/Debug/netstandardapp1.5/myapp.deps
- /myapp/bin/Debug/netstandardapp1.5/[All dependencies' IL assemblies].dll
-
-/mylib>
-
-```
-
-2. Switch to the test project and run unit tests
-
-```console
-[switch to the directory containing unit tests]
-/mytests> dotnet test
-
-[info about tests flies around]
-
-=== TEST EXECUTION SUMMARY ===
- test Total: 50, Errors: 0, Failed: 0, Skipped: 0, Time: 5.323s
-
-/mytests>
-
-```
-
-3. Package the library
-
-```console
-[switch to the library directory]
-
-/mylib> dotnet pack
-
-[information about build is shown]
-
-Producing nuget package "mylib.1.0.0" for mylib
-mylib -> /mylib/bin/Debug/mylib.1.0.0.nupkg
-Producing nuget package "mylib.1.0.0.symbols" for mylib
-mylib -> /mylib/bin/Debug/mylib.1.0.0.symbols.nupkg
-
-/mylib>
-```
-
-# Installing `dotnet` extensions as tools
-
-## Narrative
-As our developer is going further with her usage of the CLI tools, she figures out that there is an easy way to extend the CLI tools on her machine by adding project-level tools to her `project.json`. She uses the CLI to work with the tools and she is able to extend the default toolset to further fit her needs.
-
-## Steps
->**TODO:** at this point, this needs more work to figure out how it will surface; it is listed here so it is not forgotten.
-
-
diff --git a/Documentation/specs/cli-installation-scenarios.md b/Documentation/specs/cli-installation-scenarios.md
deleted file mode 100644
index 16182c234..000000000
--- a/Documentation/specs/cli-installation-scenarios.md
+++ /dev/null
@@ -1,468 +0,0 @@
-Obtaining .NET CLI
-==================
-
-## Contents
-* [Overview](#overview)
-* [General principles](#general-principles)
-* [Components that can be installed](#components-that-can-be-installed)
-* [Installation process](#installation-process)
-* [Removal process](#removal-process)
-* [Upgrading the CLI](#upgrading-the-cli)
-* [Layout on disk](#layout-on-disk)
-* [Native dependencies](#native-dependencies)
-* [Channels](#channels)
-* [Funnels and discovery mechanisms for CLI bits](#funnels-and-discovery-mechanisms-for-cli-bits)
- * [Getting Started page](#getting-started-page)
- * [Repo landing page](#repo-landing-page)
-* [Acquisition modes](#acquisition-modes)
- * [Native installers](#native-installers)
- * [Installation script](#installation-script)
- * [Complete manual installation](#complete-manual-installation)
- * [Docker](#docker)
- * [NuGet Packages](#nuget-packages)
-* [Acquiring through other products](#acquiring-through-other-products)
- * [IDEs and editors](#ides-and-editors)
-
-
-## Overview
-This document/spec outlines the CLI install experience. This covers the technologies being used for install, the principles that are driving the installation experience, the ways users are coming to the installs and what each of the installs contains, in terms of stability and similar.
-
-## General principles
-
-- Upgrades using the native installers Just Work(tm)
-- All user facing materials point to the getting started page
-- Defaults are stable bits; users need extra effort to install Future builds
-- Only HTTPS links are allowed in any online property
-- Provide native installers for each supported platform
-- Provide automation-ready installers for each target platform
-
-## Components that can be installed
-Overall, there are two significant installable components:
-
-1. The .NET Core SDK
-2. Shared runtime redistributable
-
-The .NET Core SDK contains the following items:
-
-1. A given version of the CLI toolset - "SDK"
-2. A given version of the shared runtime - "redist" - this will be consumed by both end-customers and CLI toolset
-3. A given version of the shared host - "muxer" - shared component that is in charge of running the applications and the CLI commands - it should be treated as an implementation detail
-
-## Installation process
-Each of the components listed in the previous section will have an installer/package. The dependencies of the installers between themseslves are given in the table below.
-
-| Installer | Depends on |
-|----------- |------------ |
-| SDK | redist |
-| redist | muxer |
-| muxer | - |
-
-The installation process will depend on the platform and the way of the install. For those installers that don't have automatic dependency resolution (Windows installer, OS X PKG) the installers will chain the installers of the components they depend on. DEB, RPM and similar will declare proper dependencies and the package manager will do the Right Thing(tm) by default.
-
-From the table, we can see that if you install the SDK using `apt-get` for instance, you will get also a redist and a muxer. They will be separate packages, but will be declared as dependencies (similar for `yum`). Similar for the redist package.
-
-The muxer is slightly a special case. Though there will be an installer, as mentioned in the previous section, it is an implementation detail. That means that acquiring the muxer should be done through either the SDK or the shared runtime installers. The only situation where this rule would not be true is if there was a major servicing event (e.g. a security update); in that case, the users would use the installer for the muxer directly, as we would rev its version accordingly.
-
-The script installers are slightly different as they operate on zips/tarballs. The zip/tarball for the SDK will contain the entire set of things needed to be put on the disk.
-
-## Removal process
-Removing the bits from the machine **must** follow the order outlined above in installation. If the SDK is installed, it needs to be removed first and then the Redist and only then the muxer. Similar for the Redist.
-
-## Upgrading the CLI
-The semantics of installing the CLI will be side-by-side by default. This means that each new version will get installed besides any existing versions on disk. The [layout section](#layout-on-disk) covers how that will look like on disk.
-
-Since this is the case, there is no special "upgrade". When the user needs a new version, the user just installs the new version using any of the installers specified in this document. The installer will just drop a new version at the predefined location.
-
-This, however, does have one specific constraint: **newer versions must be installed in the same location the previous version was in**. This constraint is due to the fact that the "muxer" uses convention to figure out how to find the actual driver that the user reuqested.
-
-## Layout on disk
-```
-/ (%PATH%)
- dotnet ("muxer", has platform dependant file extension)
- hostfxr (implementation detail for "muxer", platform dependant file extension)
- sdk/
- / (i.e. "1.0.0-rc2-002543")
- ... (binaries like: dotnet.dll, csc.dll)
- /
- ... (binaries)
- ...
- shared/ ("redist" or "shared framework")
- / (currently only "Microsoft.NETCore.App")
- / (i.e. "1.0.0-rc2-3002543")
- ... (binaries like: coreclr.dll, mscorlib.ni.dll, System.*.dll, dotnet-hostimpl.dll, dotnet, netcoreapp.deps.json)
- /
- ... (binaries)
-```
-
-## Native dependencies
-.NET Core CLI is built on top of CoreFX and CoreCLR and as such its' dependencies set is defined by the platform that those two combine. Whether or not those dependencies will be installed depends on the installer being used. The table below lists out the installers and whether or not they bring in dependencies.
-
-| Installer | Dependencies Y/N |
-|------------ |----------------------------------- |
-| EXE | Y (chains them in) |
-| PKG | N (need to be manually installed*) |
-| apt-get | Y |
-| rpm | Y |
-
-`*` PKG cannot specify and automatically install native dependencies
-
-A list of dependencies can be found on [dependency list](TBD).
-
-## Channels
-Channels represent a way for users who are getting the CLI to reason about the stability and quality of the bits they are getting. This is one more way for the user to be fully aware of the state the bits that are being installed are in and to set proper expectations on first use.
-
-| Channel | Description |
-|------------------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| LTS | Latest long-term supported release. |
-| Current | Most current release - typically 'preview' releases. |
-
-
-## Funnels and discovery mechanisms for CLI bits
-There are multiple ways that we will funnel users towards the installers for the CLI:
-
-1. [Getting Started Page](https://aka.ms/dotnetcoregs)
-2. [Repo landing page](../../README.md)
-3. Package repositories for platforms (`apt-get`, `brew` etc.)
-4. IDEs and editors that integrate with CLI (e.g. Visual Studio, VS Code, Sublime etc.)
-
-Out of the above, the first two funnels are under the control of the CLI team so we will go into slightly more details. The rest of the funnels will use a prescribed way to get to the bits and will have guidance on what bits to use.
-
-### Getting Started page
-The page can be found on https://aka.ms/dotnetcoregs. This is the main curated first-run funnel for the dotnet CLI. The intent of the page is to help users test out the CLI quickly and become familiar with what the platform offers. This should be the most stable and curated experience we can offer.
-
-The Getting Started page should only point users to curated install experiences that can contain only stable or LKG bits.
-
-The below table shows other pertinent information for installs on the "Getting started" page.
-
-| Property | Description |
-|----------------------- |--------------------------------------------------------------- |
-| Debian feed | Development |
-| Brew repo/tap | Brew binary repo (https://github.com/Homebrew/homebrew-binary) |
-| CentOS feed | TBD |
-
-
-### Repo landing page
-The repo landing page can be found on: [Repo landing page](../../README.md). Download links on the landing page should be decreased in importance. First thing for "you want to get started" section should link to the getting started page on the marketing site. The Repo Landing Page should be used primarily by contributors to the CLI. There should be a separate page that has instructions on how to install both the latest stable as well as latest development with proper warnings around it. The separate page is to really avoid the situation from people accidentally installing unstable bits (since search engines can drop them in the repo first).
-
-The source branches and other items are actually branch specific for the repo landing page. As the user switches branches, the links and badges on the page will change to reflect the builds from that branch.
-
-## Acquisition modes
-There are multiple acquisition modes that the CLI will have:
-
-1. Native installers
-2. Install scripts
-3. NuGet packages (for use in other people's commands/code)
-4. Docker
-
-Let's dig into some details.
-
-### Native installers
-These installation experiences are the primary way new users are getting the bits. The primary way to get information about this mode of installation is the [Getting Started page](#getting-started-page). The native installers are considered to be stable by default; this does not imply lack of bugs, but it does imply predictable behavior. They are generated from the stable branches and are never used to get the Future bits.
-
-There are three main components that will be installed
-
-The native installers are:
-
-| Platform | Installer | Status | Package name |
-|--------------------- |------------------ |---------- |-------------------- |
-| Windows | Bundle installer | Done | dotnet-{version}; |
-| Ubuntu 14.04/Debian | apt-get feed | Done | dotnet; dotnet-dbg |
-| OS X | PKG | Done | dotnet |
-| OS X | Homebrew | Not done | dotnet |
-| CentOS/RH | RPM | Not done | dotnet |
-
-
-
-### Installation script
-This approach is a shell one-liner that downloads an installation script and runs it. The installation script will download the latest zip/tarball (depending on the script used) and will unpack it to a given location. After that, the script will print out what needs to be set for the entire CLI to work (env variables, $PATH modification etc.).
-
-This install covers the following main scenario:
-
-* Local installation on a dev machine
-* Acquiring tools on a CI build server
-
-
-The features the script needs to support/have are:
-* Support for specifying the channel
-* Support for specifying the version
-* Support for specifying the installation location
-* Automatically add the install to $PATH unless --no-path/-NoPath is present
-
-It is recommended to use the stable version that is hosted on [.NET Core main website](https://dot.net). The direct path to the scripts are:
-
-* https://dot.net/v1/dotnet-install.sh (bash, UNIX)
-* https://dot.net/v1/dotnet-install.ps1 (powershell, Windows)
-
-
-#### Installation script features
-The following arguments are needed for the installation script:
-
-| dotnet-install.sh arg (Linux, OSX) | dotnet-install.ps1 arg (Windows) | Defaults | Description |
-|------------------------------------|----------------------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| --channel | -Channel | "LTS" | Which channel (i.e. "LTS", "Current", "1.0", "2.0", etc) to install from. |
-| --version | -Version | Latest | Which version of CLI to install; you need to specify the version as 3-part version (i.e. 1.0.0-13232). The 'version' parameter supersedes the 'channel' parameter. |
-| --install-dir | -InstallDir | .dotnet | Path to where to install the CLI bundle. The directory is created if it doesn't exist. On Linux/OSX this directory is created in the user home directory (`$HOME`). On Windows, this directory is created in `%LocalAppData%`. |
-| --no-path | -NoPath | false | Do not export the installdir to the path for the current session. This makes CLI tools available immediately after install. |
-| --shared-runtime | -SharedRuntime | false | Install just the shared runtime bits, not the entire SDK. |
-| --architecture | -Architecture | Current OS (``) | Architecture to install. The possible values are ``, `x64` and `x86`. |
-| --dry-run | -DryRun | false | If set, it will not perform the installation but will show, on standard output, what the invocation of the script will do with the options selected. |
-| --verbose | -Verbose | false | Display diagnostic information. |
-| N/A | -ProxyAddress | "" | If set, the installer will use the specified proxy server for all of its invocations. |
-
-> Note: Powershell arg naming convention is supported on Windows and non-Windows platforms. Non-Windows platforms do additionally support convention specific to their platform.
-
-##### Install the 1.1.0 of the shared runtime
-
-Windows:
-```
-./dotnet-install.ps1 -SharedRuntime -Version 1.1.0
-```
-
-macOS/Linux:
-```
-./dotnet-install.sh --shared-runtime --version 1.1.0
-```
-
-##### Install the latest supported CLI
-
-Windows:
-```
-./dotnet-install.ps1 -Channel LTS
-```
-OSX/Linux:
-```
-./dotnet-install.sh --channel LTS
-```
-
-##### Install the latest CLI to specified location
-
-Windows:
-```
-./dotnet-install.ps1 -Channel Current -InstallDir C:\cli
-```
-OSX/Linux:
-```
-./dotnet-install.sh --channel Current --install-dir ~/cli
-```
-
-##### Install the latest CLI in the 2.0 channel
-
-Windows:
-```
-./dotnet-install.ps1 -Channel 2.0
-```
-OSX/Linux:
-```
-./dotnet-install.sh --channel 2.0
-```
-
-### Docker
-[Docker](https://docs.docker.com/) has become a pretty good way to use developer tools, from trying them out in an interactive image use to using it for deployment. We have Docker images on DockerHub already.
-
-Docker images should always be updated as we make new releases. We should have Docker images of stable releases, built from the release branches.
-
-### NuGet packages
-NuGet packages of the CLI bits that make sense are published to relevant feeds. The developer who wishes to use these needs to specify a version. The actual "installation" here is restoring the package as a dependency for a certain project (i.e. `ProjectServer` or similar).
-
-## Acquiring through other products
-
-### IDEs and editors
-Anything that goes into the higher-level tools should always use a stable build of CLI coming frol release branches as required.
-
-If there exist any mechanism that notifies users of updates of the CLI, it should ideally point users to the Getting Started page to acquire the installers, or, if that is deemed too heavy-handed, it should point people to the last stable release. If there is a need of the URL to be "baked in" to the higher-level tool, that URL should be an aka.ms URL because it needs to be stable on that end.
-
-Cross-platform IDEs/editors will work in similar way as above. The notification should also point people to the Getting Started page. The reason is simple: it is the one page where users can pick and choose their installation experience.
-
-### Visual Studio
-Visual Studio will not be shipping CLI in-box. However, it will use CLI when installed. The install will be tied into other installs like WET and similar. The URL that is baked in VS should be an aka.ms URL or other stable URL/location.
-
-# Detecting dotnet/cli installation
-
-## Windows
-
-### Requirements for CLI SDK and shared framework installer
-- Support side by side installation and can be compatible with older versions of themselves
-- Supports removing of any side by side version
-- Prerelease versions are compatible only with the same prerelease versions
-
-#### Scenarios
-- Installing the product produces registry value informing about full version of the product which is being installed
-- Installing the product produces registry values informing about compatible versions of the products
-- Removing the product removes the registry keys if none of the versions of the product is supporting the given version. Specifically at least one registry key with full version should be removed.
-- Installing older version of the product is possible
-
-#### Registry keys and values
-- Full version refers to NuGet semantic version which contains the build number
-- Version refers to NuGet semantic version which does *not* contain build number
-
-Registry key should be created under following path:
-```
-HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\\\[REG_DWORD]=1
-```
-
-`=(x86|x64)`
-`=(sdk|sharedfx)`
-
-Example output (installing CLI SDK x86 with version 1.0.3-123456):
-
-```
-HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0=1
-HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1=1
-HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2=1
-HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3=1
-HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-123456=1
-```
-
-Note: 1.0.3 has two entries
-
-Explanation:
-CLI SDK version 1.0.3-123456 is compatible with any build of 1.0.3, 1.0.2, 1.0.1 and 1.0.0. If another installer is trying to find if there exists CLI SDK which supports specific version of installer they can check for presence of the value 1 under the registry path.
-
-### Requirements for shared host installer
-- Supports only in-place updated and is assumed to be always compatible with older versions of itself
-
-#### Scenarios
-- Installing the product produces one registry value containing the latest version
-- Installing older version on top of the other is not possible
-- Removing removes the product completely with its registry keys, regardless of any previous installations
-
-Registry key should be created under following path:
-```
-HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\\[REG_SZ]sharedhost=
-```
-
-##### Example
-```
-HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\x64\[REG_SZ]sharedhost=1.0.0-rc2-123456
-```
-
-### Other Examples
-
-Operations:
-`NOP` - key already existed, do nothing with it
-`ADD` - add
-`DEL` - delete
-`RF+` - not adding because key already exist (installer will increse ref count on GUID related to this value)
-`RF-` - not deleting because something else is compatible with this (decrease ref count)
-
-#### Scenario 1
-
-Installing 1.0.3-123456 (RTM) to a clean machine
-
-Note: Installer is compatible with all previous versions and all their RCs.
-
-```
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-123456=1
-```
-
-Installing 1.0.4-234567 (RTM) on top of that
-
-```
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc1=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1-rc1=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1-rc2=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2-rc1=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2-rc2=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-rc1=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-rc2=1
-RF+ HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-123456=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4-234567=1
-```
-
-Removing 1.0.3-123456
-
-```
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc1=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1-rc1=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1-rc2=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2-rc1=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2-rc2=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.2=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-rc1=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-rc2=1
-RF- HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3=1
-DEL HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-123456=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4-rc1=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4-rc2=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4-234567=1
-```
-
-#### Scenario 2
-
-Installing 1.0.0-123456 (RTM) to a clean machine
-
-```
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-123456=1
-```
-
-Installing 1.1.0-567890 (RTM) which is incompatible since 1.0.2
-
-Note: User is unable to run apps targeting 1.0.1 or 1.0.2 until compatible version is installed.
-
-```
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc1=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-123456=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-rc1=1 (first back-incompatible version)
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.3=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.4=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.1.0-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.1.0-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.1.0=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.1.0-567890=1
-```
-
-#### Scenario 3
-
-Installing 1.0.0-rc2-123456 to a clean machine
-
-Note: User is unable to run apps targeting 1.0.0 until RTM is installed.
-
-```
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2-123456=1
-```
-
-Installing 1.0.1-rc1-234567
-
-Note: User is still unable to run apps targeting 1.0.0 until any 1.0.0+ RTM is installed.
-
-```
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc1=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2=1
-NOP HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.0-rc2-123456=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1-rc1=1
-ADD HKLM\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x86\sdk\[REG_DWORD]1.0.1-rc1-123456=1
-```
diff --git a/Documentation/specs/corehost.md b/Documentation/specs/corehost.md
deleted file mode 100644
index 88ed8e40b..000000000
--- a/Documentation/specs/corehost.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# corehost runtime/assembly resolution
-
-The shared host locates assemblies and native libraries using a combination of: Servicing Index, Files in the application folder (aka "app-local") and files from package caches.
-
-## Definitions and Formats
-
-### Terms/Notes
-
-* The term "Library" (Title Case) is used throughout this document to refer to a NuGet Package. We use this term because it is used in the code to represent multiple things: Packages, Projects and Framework Assemblies are all types of "Library".
-* All of the assembly resolution here refers to setting up the default assembly load context for the runtime. Further dynamic loads (plugins, etc.) can still have custom resolution logic provided by using an `AssemblyLoadContext` in the managed code. Essentially, we are setting up the necessary assemblies to launch the `Program.Main` (and all the assemblies that are statically-referenced by that).
-
-### Servicing Index
-
-The servicing index is loaded when the `DOTNET_SERVICING` environment variable is non-empty. When this variable is non-empty, it points to a directory that will be the **Servicing Root**. There may be platform-specific default locations, to be determined later.
-
-An index file is located at the path defined by `$DOTNET_SERVICING/servicing_index.txt`. In this file are a series of lines of one of the following formats:
-
-```
-# Lines starting with a '#' and blank lines are ignored.
-
-# Identifies an asset from a NuGet Package that has been serviced.
-package|[Package ID]|[Package Version]|[Original Asset Relative Path]=[New Asset Path, relative to Servicing Root]
-package|System.Threading.Thread|1.2.3.4|lib/dotnet5.4/System.Threading.Thread.dll=patches/abc123/System.Threading.Thread.dll
-
-# TBD: Host/Runtime servicing entries.
-```
-
-Paths in this file are **always** specified using `/`, even on Windows. They must be converted to platform-specific directory separators.
-
-This index is loaded when needed during the Resolution Process (see below).
-
-### Runtime Configuration File
-
-The runtime configuration file is used to determine settings to apply to the runtime during initialization and for building the TPA and Native Library Search Path lists. See the [spec for the runtime configuration file](runtime-configuration-file.md) for more information.
-
-### Files in the application folder
-
-Any file with the suffix `.dll` in the same folder as the managed application being loaded (the "Application Base") will be considered a viable assembly during the resolution process. The host **assumes** that the assembly's short name is the same as the file name with the `.dll` suffix removed (yes, this is not technically required by the CLR, but we assume it for use with this host).
-
-### Files from package caches
-
-Only assemblies listed in the dependencies file can be resolved from a package cache. To resolve those assemblies, two environment variables are used:
-
-* `DOTNET_PACKAGES` - The primary package cache. If not set, defaults to `$HOME/.nuget/packages` on Unix or `%LOCALAPPDATA%\NuGet\Packages` (TBD) on Windows. **NOTE**: Currently the host uses different folders as we are still coordinating with NuGet to get the directories right (there are compatability considerations). Currently we always use `$HOME/.dnx/packages`(Unix)/`%USERPROFILE%\.dnx\packages`(Win).
-* `DOTNET_PACKAGES_CACHE` - The secondary cache. This is used by shared hosts (such as Azure) to provide a cache of pre-downloaded common packages on a faster disk. If not set, it is not used.
-
-Given the Package ID, Package Version, Package Hash and Asset Relative Path provided in the runtime configuration file, **and the assembly is not serviced** (see the full resolution algorithm below) resolution proceeds as follows (Unix-style paths will be used for convenience but these variables and paths all apply to Windows as well):
-
-1. If `DOTNET_PACKAGES_CACHE` is non-empty, read the file `$DOTNET_PACKAGES_CACHE/[Package ID]/[Package Version]/[Package Id].[Package Version].nupkg.sha512` if present. If the file is present and the content matches the `[Package Hash]` value from the dependencies file. Use that location as the Package Root and go to 3
-2. Using `DOTNET_PACKAGES`, or it's default value, use `$DOTNET_PACKAGES/[Package ID]/[Package Version]` as the Package Root
-3. Concatenate the Package Root and the Asset Relative Path. This is the path to the asset (managed assembly or native library).
-
-## Assembly Resolution
-
-During host start-up, the host identifies if a runtime configuration file is present and loads it. It also scans the files located in the Application Base and determines the assembly name for each (using the file name). It builds a set of assembly names to be loaded by the union of the assembly names listed in runtime configuration file and the assemblies located in the Application Base.
-
-A runtime configuration file is **not** required to successfully launch an application, but without it, all the dependent assemblies must be located within the same folder as the application. Also, since servicing is performed on the basis of packages, an application without a runtime configuration file file cannot use the servicing index to override the location of assemblies.
-
-The host looks for the `.deps` file in the Application Base with the file name `[AssemblyName].deps`. The path to the deps file can be overridden by specifying `--depsfile:{path to deps file}` as the first parameter to the application.
-
-Given the set of assembly names, the host performs the following resolution. In some steps, the Package ID/Version/Relative Path data is required. This is only available if the assembly was listed in the deps file. If the assembly comes from the app-local folder, these resolution steps are skipped.
-
-1. If there is an entry in the servicing index for the Package ID/Version/Relative Path associated with the assembly, the Servicing Root is concatenated with the New Asset Path from the index and used as the Assembly Path. This occurs **even if the assembly is also located app-local**, as long as it is also in the runtime configuration file.
-2. If there is a file in the Application Base with the file name `[AssemblyName].dll`, `[AssemblyName].ni.dll`, `[AssemblyName].exe`, or `[AssemblyName].ni.exe` (in that order), it its full path is used as the Assembly Path
-3. The Assembly Path is resolved out of the Package Caches using the algorithm above (in 'Files from package caches').
-
-A similar process is used to produce a list of Native Library Paths. Native libraries are listed in the runtime configuration file (under the `native` asset section) and searched in the same way as managed assemblies (Servicing, then app-local, then package caches). The main exception is that the app-local file extensions vary by platform (`.dll` on Windows, `.so` on Linux, `.dylib` on Mac OS X)
-
-Once a the list of assemblies and native libraries is produced, the host will check for duplicates. If both an `.ni.dll`/`.ni.exe` image and a `.dll`/`.exe` assembly are found for an assembly, the native image will be preferred and the IL-only assembly will be removed. The presence of two different paths for the same assembly name will be considered an error. The managed assemblies are provided in the Trusted Platform Assemblies (TPA) list for the CoreCLR during startup. The folder paths for each native library are deduplicated and provided in the Native Search Paths list for the CoreCLR during startup.
-
-**NOTE**: The CLR may add support for providing a similar structure as the TPA list for native libraries (i.e. a flat list of full file paths).
-
-### Satellite Assemblies
-
-Satellite Assemblies (assemblies containing only embedded resources used in place of the resources provided by an assembly) are detected by path convention in the host. The convention will be to look at the last two segments of the path (the file name and the immediate parent directory name). If the parent directory matches an [IETF Language Tag](https://en.wikipedia.org/wiki/IETF_language_tag) (or more specifically, a value usable in the Culture field for a CLR Assembly Name), then the assembly is considered culture-specific (for the culture specified in that folder name). Upon determining this, the host will place the culture-neutral assemblies on the TPA list and provide the directories containing the assemblies as Platform Resource Roots to the CLR to allow it to locate the assemblies.
-
-## Runtime Resolution
-
-Runtime resolution is controlled by these environment variables:
-
-* `DOTNET_RUNTIME_SERVICING` -> Global override for runtime
-* `DOTNET_PACKAGES_CACHE` -> Secondary cache
-* `DOTNET_PACKAGES` -> Package restore location
-
-The runtime is located by searching the following paths in order, where `APP_BASE` refers to the directory containing the managed application assembly and `LIBCORECLR` refers to the platform-specific name for the CoreCLR library (`libcoreclr.so` on Unix, `libcoreclr.dylib` on Mac OS X, `coreclr.dll` on Windows). The first path that matches is used as the path to load the CoreCLR from.
-
-* `$DOTNET_RUNTIME_SERVICING/runtime/coreclr/LIBCORECLR`
-* `$DOTNET_PACKAGES_CACHE///runtimes//native/LICORECLR`
-* `APP_BASE/LIBCORECLR`
-* `$DOTNET_PACKAGES///runtimes//native/LIBCORECLR`
-* On Unix:
- * `/usr/local/share/dotnet/runtime/coreclr/LIBCORECLR` [1]
- * `/usr/share/dotnet/runtime/coreclr/LIBCORECLR`
-* On Windows:
- * `%LocalAppData%\dotnet\runtime\coreclr\LIBCORECLR`
- * `%ProgramFiles%\dotnet\runtime\coreclr\LIBCORECLR` [2]
-
-Notes:
-
-1. The Unix paths should be this way but are reversed in the actual code. Generally `/usr/local` is considered to have higher precedence than `/usr`
-2. Not yet implemented.
diff --git a/Documentation/specs/runtime-configuration-file.md b/Documentation/specs/runtime-configuration-file.md
deleted file mode 100644
index fbf6e2c4c..000000000
--- a/Documentation/specs/runtime-configuration-file.md
+++ /dev/null
@@ -1,391 +0,0 @@
-# Runtime Configuration Files
-
-The runtime configuration files store the dependencies of an application (formerly stored in the `.deps` file). They also include runtime configuration options, such as the Garbage Collector mode. Optionally they can also include data for runtime compilation (compilation settings used to compile the original application, and reference assemblies used by the application).
-
-**Note:** This document doesn't provide full explanations as to why individual items are needed in this file. That is covered in the [`corehost` spec](corehost.md) and via the `Microsoft.Extensions.DependencyModel` assembly.
-
-## What produces the files and where are they?
-
-There are two runtime configuration files for a particular application. Given a project named `MyApp`, the compilation process produces the following files (on Windows, other platforms are similar):
-
-* `MyApp.dll` - The managed assembly for `MyApp`, including an ECMA-compliant entry point token.
-* `MyApp.exe` - A copy of the `corehost.exe` executable.
-* `MyApp.runtimeconfig.json` - An **optional** configuration file containing runtime configuration settings.
-* `MyApp.deps.json` - A list of dependencies, as well as compilation context data and compilation dependencies. Not technically required, but required to use the servicing or package cache/shared package install features.
-
-The `MyApp.runtimeconfig.json` is designed to be user-editable (in the case of an app consumer wanting to change various CLR runtime options for an app, much like the `MyApp.exe.config` XML file works in .NET 4.x today). However, the `MyApp.deps.json` file is designed to be processed by automated tools and should not be user-edited. Having the files as separate makes this clearer. We could use a different format for the deps file, but if we're already integrating a JSON parser into the host, it seems most appropriate to re-use that here. Also, there are diagnostic benefits to being able to read the `.deps.json` file in a simple text editor.
-
-**IMPORTANT**: Portable Applications, i.e. those published without a specific RID, have some adjustments to this spec which is covered at the end.
-
-## File format
-
-The files are both JSON files stored in UTF-8 encoding. Below are sample files. Note that not all sections are required and some will be opt-in only (see below for more details). The `.runtimeconfig.json` file is completely optional, and in the `.deps.json` file, only the `runtimeTarget`, `targets` and `libraries` sections are required (and within the `targets` section, only the runtime-specific target is required).
-
-### [appname].runtimeconfig.json
-```json
-{
- "runtimeOptions": {
-
- "configProperties": {
- "System.GC.Server": true,
- "System.GC.Concurrent": true,
- "System.Threading.ThreadPool.MinThreads": 4,
- "System.Threading.ThreadPool.MaxThreads": 8
- },
-
- "framework": {
- "name": "Microsoft.DotNetCore",
- "version": "1.0.1"
- },
-
- "applyPatches": false
- }
-}
-```
-
-### [appname].deps.json
-```json
-{
- "runtimeTarget": ".NETStandardApp,Version=v1.5/osx.10.10-x64",
- "compilationOptions": {
- "defines": [ "DEBUG" ]
- },
- "targets": {
- ".NETStandardApp,Version=v1.5": {
- "MyApp/1.0": {
- "type": "project",
- "dependencies": {
- "AspNet.Mvc": "1.0.0"
- }
- },
- "System.Foo/1.0.0": {
- "type": "package",
- },
- "System.Banana/1.0.0": {
- "type": "package",
- "dependencies": {
- "System.Foo": "1.0.0"
- },
- "compile": {
- "ref/dotnet5.4/System.Banana.dll": { }
- }
- }
- },
- ".NETStandardApp,Version=v1.5/osx.10.10-x64": {
- "MyApp/1.0": {
- "type": "project",
- "dependencies": {
- "AspNet.Mvc": "1.0.0"
- }
- },
- "System.Foo/1.0.0": {
- "type": "package",
- "runtime": {
- "lib/dnxcore50/System.Foo.dll": { }
- }
- },
- "System.Banana/1.0.0": {
- "type": "package",
- "dependencies": {
- "System.Foo": "1.0.0"
- },
- "runtime": {
- "lib/dnxcore50/System.Banana.dll": { }
- },
- "resources": {
- "lib/dnxcore50/fr-FR/System.Banana.resources.dll": { "locale": "fr-FR" }
- },
- "native": {
- "runtimes/osx.10.10-x64/native/libbananahelper.dylib": { }
- }
- }
- }
- },
- "libraries": {
- "MyApp/1.0": {
- "type": "project"
- },
- "System.Foo/1.0": {
- "type": "package",
- "serviceable": true,
- "sha512": "[base64 string]"
- },
- "System.Banana/1.0": {
- "type": "package",
- "sha512": "[base64 string]"
- }
- }
-}
-```
-
-## Sections
-
-### `runtimeOptions` Section (`.runtimeconfig.json`)
-
-This section is copied verbatim from an identical section in the input `project.json` file (with the exception of the `target` parameter which is generated by the compilation process). The `runtimeConfig` section specifies parameters to be provided to the runtime during initialization. Known parameters include:
-* `configProperties` - Indicates configuration properties to configure the runtime and the framework
- * Examples:
- * Full list of [configuration properties](https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/clr-configuration-knobs.md) for CoreCLR.
- * `System.GC.Server` (old: `gcServer`) - Boolean indicating if the server GC should be used (Default: `true`).
- * `System.GC.Concurrent` (old: `gcConcurrent`) - Boolean indicating if background garbage collection should be used.
-* `framework` - Indicates the `name`, `version`, and other properties of the shared framework to use when activating the application. The presence of this section indicates that the application is a portable app designed to use a shared redistributable framework.
-* `applyPatches` - When `false`, the framework version is strictly obeyed by the host. When `applyPatches` is unspecified or specified as `true`, the framework from either the same or a higher version that differs only in the `SemVer` patch field will be used.
- * For example, if `version=1.0.1` and `applyPatches` is `true`, the host would load the shared framework from `1.0.{n}`, where `n >= 1`, but will not load from `1.1.0`, even if present. When `applyPatches` is `false`, the shared framework will be loaded from `1.0.1` strictly.
- * **Note:** This does not apply to `SemVer`'s `prerelease` versions, but only for `production` releases.
- * **Note:** This section will not be used for standalone applications that do not rely upon a shared framework.
-
-* Others _TBD_
-
-These settings are read by `corehost` to determine how to initialize the runtime. All versions of `corehost` **must ignore** settings in this section that they do not understand (thus allowing new settings to be added in later versions).
-
-### `compilationOptions` Section (`.deps.json`)
-
-This section is copied by storing the merged `compilationOptions` from the input `project.json`. The `project.json` can define three sets of compilation options: Global, Per-Configuration, and Per-Framework. However, the `[appname].runtimeconfig.json` is specific to a configuration and framework so there is only one merged section here.
-
-The exact settings found here are specific to the compiler that produced the original application binary. Some example settings include: `defines`, `languageVersion` (C#/VB), `allowUnsafe` (C#), etc.
-
-As an example, here is a possible `project.json` file:
-
-```json
-{
- "compilationOptions": {
- "allowUnsafe": true
- },
- "frameworks": {
- "net451": {
- "compilationOptions": {
- "defines": [ "DESKTOP_CLR" ]
- }
- },
- "dnxcore50": {
- "compilationOptions": {
- "defines": [ "CORE_CLR" ]
- }
- }
- },
- "configurations": {
- "Debug": {
- "compilationOptions": {
- "defines": [ "DEBUG_MODE" ]
- }
- }
- }
-}
-```
-
-When this project is built for `dnxcore50` in the `Debug` configuration, the outputted `MyApp.deps.json` file will have the following `compilationOptions` section:
-
-```json
-{
- "compilationOptions": {
- "allowUnsafe": true,
- "defines": [ "CORE_CLR", "DEBUG_MODE" ]
- }
-}
-```
-
-### `runtimeTarget` Section (`.deps.json`)
-
-This property contains the name of the target from `targets` that should be used by the runtime. This is present to simplify `corehost` so that it does not have to parse or understand target names and the meaning thereof.
-
-### `targets` Section (`.deps.json`)
-
-This section contains subsetted data from the input `project.lock.json`.
-
-Each property under `targets` describes a "target", which is a collection of libraries required by the application when run or compiled in a certain framework and platform context. A target **must** specify a Framework name, and **may** specify a Runtime Identifier. Targets without Runtime Identifiers represent the dependencies and assets used for compiling the application for a particular framework. Targets with Runtime Identifiers represent the dependencies and assets used for running the application under a particular framework and on the platform defined by the Runtime Identifier. In the example above, the `.NETStandardApp,Version=v1.5` target lists the dependencies and assets used to compile the application for `dnxcore50`, and the `.NETStandardApp,Version=v1.5/osx.10.10-x64` target lists the dependencies and assets used to run the application on `dnxcore50` on a 64-bit Mac OS X 10.10 machine.
-
-There will always be two targets in the `[appname].runtimeconfig.json` file: A compilation target, and a runtime target. The compilation target will be named with the framework name used for the compilation (`.NETStandardApp,Version=v1.5` in the example above). The runtime target will be named with the framework name and runtime identifier used to execute the application (`.NETStandardApp,Version=v1.5/osx.10.10-x64` in the example above). However, the runtime target will also be identified by name in the `runtimeOptions` section, so that `corehost` need not parse and understand target names.
-
-The content of each target property in the JSON is a JSON object. Each property of that JSON object represents a single dependency required by the application when compiled for/run on that target. The name of the property contains the ID and Version of the dependency in the form `[Id]/[Version]`. The content of the property is another JSON object containing metadata about the dependency.
-
-The `type` property of a dependency object defines what kind of entity satisfied the dependency. Possible values include `project` and `package` (further comments on dependency types below).
-
-**Open Question:** `type` is also present in the `libraries` section. We don't really need it in both. It's in both now because the lock file does that and we want the formats to be similar. Should we remove it?
-
-The `dependencies` property of a dependency object defines the ID and Version of direct dependencies of this node. It is a JSON object where the property names are the ID of the dependency and the content of each property is the Version of the dependency.
-
-The `runtime` property of a dependency object lists the relative paths to Managed Assemblies required to be available at runtime in order to satisfy this dependency. The paths are relative to the location of the Dependency (see below for further details on locating a dependency).
-
-The `resources` property of a dependency object lists the relative paths and locales of Managed Satellite Assemblies which provide resources for other languages. Each item contains a `locale` property specifying the [IETF Language Tag](https://en.wikipedia.org/wiki/IETF_language_tag) for the satellite assembly (or more specifically, a value usable in the Culture field for a CLR Assembly Name).
-
-The `native` property of a dependency object lists the relative paths to Native Libraries required to be available at runtime in order to satisfy this dependency. The paths are relative to the location of the Dependency (see below for further details on locating a dependency).
-
-In compilation targets, the `runtime`, `resources` and `native` properties of a dependency are omitted, because they are not relevant to compilation. Similarly, in runtime targets, the `compile` property is omitted, because it is not relevant to runtime.
-
-Only dependencies with a `type` value of `package` should be considered by `corehost`. There may be other items, used for other purposes (for example, Projects, Reference Assemblies, etc.
-
-### `libraries` Section (`.deps.json`)
-
-This section contains a union of all the dependencies found in the various targets, and contains common metadata for them. Specifically, it contains the `type`, as well as a boolean indicating if the library can be serviced (`serviceable`, only for `package`-typed libraries) and a SHA-512 hash of the package file (`sha512`, only for `package`-typed libraries.
-
-## How the file is used
-
-The file is read by two different components:
-
-* `corehost` uses it to determine what to place on the TPA and Native Library Search Path lists, as well as what runtime settings to apply (GC type, etc.). See [the `corehost` spec](corehost.md).
-* `Microsoft.Extensions.DependencyModel` uses it to allow a running managed application to query various data about it's dependencies. For example:
- * To find all dependencies that depend on a particular package (used by ASP.NET MVC and other plugin-based systems to identify assemblies that should be searched for possible plugin implementations)
- * To determine the reference assemblies used by the application when it was compiled in order to allow runtime compilation to use the same reference assemblies (used by ASP.NET Razor to compile views)
- * To determine the compilation settings used by the application in order to allow runtime compilation to use the same settings (also used by ASP.NET Razor views).
-
-## Opt-In Compilation Data
-
-Some of the sections in the `.deps.json` file contain data used for runtime compilation. This data is not provided in the file by default. Instead, a project.json setting `preserveCompilationContext` must be set to true in order to ensure this data is added. Without this setting, the `compilationOptions` will not be present in the file, and the `targets` section will contain only the runtime target. For example, if the `preserveCompilationContext` setting was not present in the `project.json` that generated the above example, the `.deps.json` file would only contain the following content:
-
-```json
-{
- "runtimeTarget": {
- "name": ".NETStandardApp,Version=v1.5/osx.10.10-x64",
- "portable": false
- },
- "targets": {
- ".NETStandardApp,Version=v1.5/osx.10.10-x64": {
- "MyApp/1.0": {
- "dependencies": {
- "AspNet.Mvc": "1.0.0"
- }
- },
- "System.Foo/1.0.0": {
- "runtime": {
- "lib/dnxcore50/System.Foo.dll": { }
- }
- },
- "System.Banana/1.0.0": {
- "dependencies": {
- "System.Foo": "1.0.0"
- },
- "runtime": {
- "lib/dnxcore50/System.Banana.dll": { }
- },
- "resources": {
- "lib/dnxcore50/fr-FR/System.Banana.resources.dll": { "locale": "fr-FR" }
- },
- "native": {
- "runtimes/osx.10.10-x64/native/libbananahelper.dylib": { }
- }
- }
- }
- },
- "libraries": {
- "MyApp/1.0": {
- "type": "project"
- },
- "System.Foo/1.0": {
- "type": "package",
- "serviceable": true,
- "sha512": "[base64 string]"
- },
- "System.Banana/1.0": {
- "type": "package",
- "sha512": "[base64 string]"
- }
- }
-}
-```
-
-## Portable Deployment Model
-
-An application can be deployed in a "portable" deployment model. In this case, the RID-specific assets of packages are published within a folder structure that preserves the RID metadata. However, `corehost` does not use this folder structure, rather it reads data from the `.deps.json` file. Also, during deployment, the `.exe` file (`corehost` renamed) is not deployed.
-
-In the portable deployment model, the `*.runtimeConfig.json` file will contain the `runtimeOptions.framework` section:
-
-```json
-{
- "runtimeOptions": {
- "framework": {
- "name": "NETCore.App",
- "version": "1.0.1"
- }
- }
-}
-```
-
-This data is used to locate the shared framework folder. The exact mechanics of which version are selected are defined elsewhere, but in general, it locates the shared runtime in the `shared` folder located beside it by using the relative path `shared/[runtimeOptions.framework.name]/[runtimeOptions.framework.version]`. Once it has applied any version roll-forward logic and come to a final path to the shared framework, it locates the `[runtimeOptions.framework.name].deps.json` file within that folder and loads it **first**.
-
-Next, the deps file from the application is loaded and merged into this deps file (this is conceptual, the host implementation doesn't necessary have to directly merge the data ;)). Data from the app-local deps file trumps data from the shared framework.
-
-The shared framework's deps file will also contain a `runtimes` section defining the fallback logic for all RIDs known to that shared framework. For example, a shared framework deps file installed into a Ubuntu machine may look something like the following:
-
-```json
-{
- "runtimeTarget": {
- "name": ".NETStandardApp,Version=v1.5",
- "portable": false
- },
- "targets": {
- ".NETStandardApp,Version=v1.5": {
- "System.Runtime/4.0.0": {
- "runtime": "lib/netstandard1.5/System.Runtime.dll"
- },
- "... other libraries ...": {}
- }
- },
- "libraries": {
- "System.Runtime/4.0.0": {
- "type": "package",
- "serviceable": true,
- "sha512": "[base64 string]"
- },
- "... other libraries ...": {}
- },
- "runtimes": {
- "ubuntu.15.04-x64": [ "ubuntu.14.10-x64", "ubuntu.14.04-x64", "debian.8-x64", "linux-x64", "linux", "unix", "any", "base" ],
- "ubuntu.14.10-x64": [ "ubuntu.14.04-x64", "debian.8-x64", "linux-x64", "linux", "unix", "any", "base" ],
- "ubuntu.14.04-x64": [ "debian.8-x64", "linux-x64", "linux", "unix", "any", "base" ]
- }
-}
-```
-
-The host will have a RID embedded in it during compilation (for example, `win10-x64` for Windows 64-bit). It will look up the corresponding entry in the `runtimes` section to identify what the fallback list is for `win10-x64`. The fallbacks are identified from most-specific to least-specific. In the case of `win10-x64` and the example above, the fallback list is: `"win10-x64", "win10", "win81-x64", "win81", "win8-x64", "win8", "win7-x64", "win7", "win-x64", "win", "any", "base"` (note that an exact match on the RID itself is the first preference, followed by the first item in the fallback list, then the next item, and so on).
-
-In the app-local deps file for a `portable` application, the package entries may have an additional `runtimeTargets` section detailing RID-specific assets. The `corehost` application should use this data, along with the current RID and the RID fallback data defined in the `runtimes` section of the shared framework deps file to select one **and only one** RID value out of each package individually. The most specific RID present within the package should always be selected.
-
-Consider `corehost` built for `ubuntu.14.04-x64` and the following snippet from an app-local deps file (some sections removed for brevity).
-
-```json
-{
- "targets": {
- ".NETStandardApp,Version=v1.5": {
- "System.Data.SqlClient/4.0.0": {
- "compile": {
- "ref/netstandard1.5/System.Data.SqlClient.dll": {}
- },
- "runtimeTargets": {
- "runtimes/unix/lib/netstandard1.5/System.Data.SqlClient.dll": {
- "assetType": "runtime",
- "rid": "unix"
- },
- "runtimes/win7-x64/lib/netstandard1.5/System.Data.SqlClient.dll": {
- "assetType": "runtime",
- "rid": "win7-x64"
- },
- "runtimes/win7-x86/lib/netstandard1.5/System.Data.SqlClient.dll": {
- "assetType": "runtime",
- "rid": "win7-x86"
- },
- "runtimes/win7-x64/native/sni.dll": {
- "assetType": "native",
- "rid": "win7-x64"
- },
- "runtimes/win7-x86/native/sni.dll": {
- "assetType": "native",
- "rid": "win7-x86"
- }
- }
- }
- }
- }
-}
-```
-
-When setting up the TPA and native library lists, it will do the following for the `System.Data.SqlClient` entry in the example above:
-
-1. Add all entries from the root `runtime` and `native` sections (not present in the example). (Note: This is essentially the current behavior for the existing deps file format)
-2. Add all appropriate entries from the `runtimeTargets` section, based on the `rid` property of each item:
- 1. Attempt to locate any item for the RID `ubuntu.14.04-x64`. If any asset is matched, take **only** the items matching that RID exactly and add them to the appropriate lists based on the `assetType` value (`runtime` for managed code, `native` for native code)
- 2. Reattempt the previous step using the first RID in the list provided by the list in the `runtimes."ubuntu.14.04-x64"` section of the shared framework deps file. If any asset is matched, take **only** the items matching that RID exactly and add them to the appropriate lists
- 3. Continue to reattempt the previous search for each RID in the list, from left to right until a match is found or the list is exhausted. Exhausting the list without finding an asset, when a `runtimeTargets` section is present is **not** an error, it simply indicates that there is no need for a runtime-specific asset for that package.
-
-Note one important aspect about asset resolution: The resolution scope is **per-package**, **not per-application**, **nor per-asset**. For each individual package, the most appropriate RID is selected, and **all** assets taken from that package must match the selected RID exactly. For example, if a package provides both a `linux-x64` and a `unix` RID (in the `ubuntu.14.04-x64` example above), **only** the `linux-x64` asset would be selected for that package. However, if a different package provides only a `unix` RID, then the asset from the `unix` RID would be selected.
-
-The path to a runtime-specific asset is resolved in the same way as a normal asset (first check Servicing, then Package Cache, App-Local, Global Packages Location, etc.) with **one exception**. When searching app-local, rather than just looking for the simple file name in the app-local directory, a runtime-specific asset is expected to be located in a subdirectory matching the relative path information for that asset in the lock file. So the `native` `sni.dll` asset for `win7-x64` in the `System.Data.SqlClient` example above would be located at `APPROOT/runtimes/win7-x64/native/sni.dll`, rather than the normal app-local path of `APPROOT/sni.dll`.
diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE
deleted file mode 100644
index 673155920..000000000
--- a/ISSUE_TEMPLATE
+++ /dev/null
@@ -1,17 +0,0 @@
-## Steps to reproduce
-
-
-## Expected behavior
-
-
-## Actual behavior
-
-
-## Environment data
-`dotnet --info` output:
-
-
-
-
-
-
diff --git a/NuGet.master.config b/NuGet.master.config
deleted file mode 100644
index b004e5cc7..000000000
--- a/NuGet.master.config
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/.noautobuild b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj
deleted file mode 100644
index 6b6514fb3..000000000
--- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
- netcoreapp2.0;net451
- Exe
- $(AssetTargetFallback);portable-net45+win8;dnxcore50
- win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/Program.cs b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj
deleted file mode 100644
index 287b089bb..000000000
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- net46
- AppWithRedirectsAndConfig
- Exe
- win7-x64;win7-x86
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/app.config b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/app.config
deleted file mode 100644
index 25aeea673..000000000
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/app.config
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj
deleted file mode 100644
index 8e5fc172e..000000000
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- net46
- AppWithRedirectsNoConfig
- Exe
- win7-x64;win7-x86
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/src/Program.cs b/TestAssets/DesktopTestProjects/BindingRedirectSample/src/Program.cs
deleted file mode 100644
index 57ecd14fc..000000000
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/src/Program.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Reflection;
-
-namespace BindingRedirects
-{
- public class Program
- {
- private const string ExpectedNewtonSoftVersion = "8.0.0.0";
-
- public static int Main(string[] args)
- {
- return VerifyJsonLoad();
- }
-
- private static int VerifyJsonLoad()
- {
- WriteLine("=======Verifying Redirected Newtonsoft.Json assembly load=======");
-
- int result = 0;
-
- try
- {
- var jsonAsm = typeof(Newtonsoft.Json.JsonConvert).Assembly;
- var version = jsonAsm.GetName().Version.ToString();
- if (version != ExpectedNewtonSoftVersion)
- {
- WriteLine($"Failure - Newtonsoft.Json: ExpectedVersion - {ExpectedNewtonSoftVersion}, ActualVersion - {version}");
- result = -1;
- }
- }
- catch (Exception ex)
- {
- WriteLine($"Failed to load type 'Newtonsoft.Json.JsonConvert'");
- throw ex;
- }
-
- return result;
- }
-
- private static void WriteLine(string str)
- {
- var currentAssembly = Assembly.GetExecutingAssembly().GetName().Name;
- Console.WriteLine($"{currentAssembly}: {str}");
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/DesktopAppWithNativeDep/.noautobuild b/TestAssets/DesktopTestProjects/DesktopAppWithNativeDep/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/DesktopAppWithNativeDep/Program.cs b/TestAssets/DesktopTestProjects/DesktopAppWithNativeDep/Program.cs
deleted file mode 100644
index 71b9980f3..000000000
--- a/TestAssets/DesktopTestProjects/DesktopAppWithNativeDep/Program.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace DesktopAppWithNativeDep
-{
- public static class Program
- {
- public static void Main(string[] args)
- {
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/DesktopAppWithNativeDep/project.json b/TestAssets/DesktopTestProjects/DesktopAppWithNativeDep/project.json
deleted file mode 100644
index 30113b6e3..000000000
--- a/TestAssets/DesktopTestProjects/DesktopAppWithNativeDep/project.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "version": "1.0.0-*",
- "dependencies": {
- "PackageWithFakeNativeDep": "1.0.0-*",
- "Microsoft.NETCore.Platforms": "1.0.1"
- },
- "buildOptions": {
- "emitEntryPoint": true
- },
- "frameworks": {
- "net451": {}
- }
-}
diff --git a/TestAssets/DesktopTestProjects/DesktopAppWithRuntimes/.noautobuild b/TestAssets/DesktopTestProjects/DesktopAppWithRuntimes/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/DesktopAppWithRuntimes/Program.cs b/TestAssets/DesktopTestProjects/DesktopAppWithRuntimes/Program.cs
deleted file mode 100644
index 758142805..000000000
--- a/TestAssets/DesktopTestProjects/DesktopAppWithRuntimes/Program.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace DesktopAppWithRuntimes
-{
- public static class Program
- {
- public static void Main(string[] args)
- {
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/DesktopAppWithRuntimes/project.json b/TestAssets/DesktopTestProjects/DesktopAppWithRuntimes/project.json
deleted file mode 100644
index aca443945..000000000
--- a/TestAssets/DesktopTestProjects/DesktopAppWithRuntimes/project.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "version": "1.0.0-*",
- "dependencies": {
- "Microsoft.NETCore.Windows.ApiSets": "1.0.1-rc3-24206-00"
- },
- "buildOptions": {
- "emitEntryPoint": true
- },
- "frameworks": {
- "net451": {}
- },
- "runtimes": {
- "win7-x64": {}
- }
-}
diff --git a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktop/.noautobuild b/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktop/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktop/project.json b/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktop/project.json
deleted file mode 100644
index 5bd1f2723..000000000
--- a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktop/project.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "version": "1.0.0-*",
- "dependencies": {
- "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20113",
- "Microsoft.AspNetCore.Hosting": "1.0.0-rc2-20113",
- "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20254",
- "Microsoft.NETCore.Platforms": "1.0.1"
- },
- "buildOptions": {
- "emitEntryPoint": true,
- "compile": {
- "include": [
- "../src/*.cs"
- ]
- }
- },
- "frameworks": {
- "net451": {}
- }
-}
diff --git a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopForce32/.noautobuild b/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopForce32/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopForce32/project.json b/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopForce32/project.json
deleted file mode 100644
index 93adffa3d..000000000
--- a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopForce32/project.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "version": "1.0.0-*",
- "dependencies": {
- "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20113",
- "Microsoft.AspNetCore.Hosting": "1.0.0-rc2-20113",
- "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20254",
- "Microsoft.NETCore.Platforms": "1.0.1"
- },
- "buildOptions": {
- "platform": "anycpu32bitpreferred",
- "emitEntryPoint": true,
- "compile": {
- "include": [
- "../src/*.cs"
- ]
- }
- },
- "frameworks": {
- "net451": {}
- }
-}
diff --git a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopWithRuntimes/.noautobuild b/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopWithRuntimes/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopWithRuntimes/project.json b/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopWithRuntimes/project.json
deleted file mode 100644
index 700f1e2f7..000000000
--- a/TestAssets/DesktopTestProjects/DesktopKestrelSample/KestrelDesktopWithRuntimes/project.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "version": "1.0.0-*",
- "dependencies": {
- "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-20113",
- "Microsoft.AspNetCore.Hosting": "1.0.0-rc2-20113",
- "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-20254",
- "Microsoft.NETCore.Platforms": "1.0.1"
- },
- "buildOptions": {
- "emitEntryPoint": true,
- "compile": {
- "include": [
- "../src/*.cs"
- ]
- }
- },
- "frameworks": {
- "net451": {}
- },
- "runtimes": {
- "win7-x86": {},
- "win7-x64": {},
- "osx.10.11-x64": {}
- }
-}
diff --git a/TestAssets/DesktopTestProjects/DesktopKestrelSample/src/Startup.cs b/TestAssets/DesktopTestProjects/DesktopKestrelSample/src/Startup.cs
deleted file mode 100644
index c54634573..000000000
--- a/TestAssets/DesktopTestProjects/DesktopKestrelSample/src/Startup.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.IO;
-using System.Security.Cryptography.X509Certificates;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Server.Kestrel;
-using Microsoft.AspNetCore.Server.Kestrel.Filter;
-using Microsoft.Extensions.Logging;
-
-namespace SampleApp
-{
- public class Startup
- {
- private static string Args { get; set; }
- private static CancellationTokenSource ServerCancellationTokenSource { get; set; }
-
- public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
- {
- var ksi = app.ServerFeatures.Get();
- ksi.NoDelay = true;
-
- loggerFactory.AddConsole(LogLevel.Error);
-
- app.UseKestrelConnectionLogging();
-
- app.Run(async context =>
- {
- Console.WriteLine("{0} {1}{2}{3}",
- context.Request.Method,
- context.Request.PathBase,
- context.Request.Path,
- context.Request.QueryString);
- Console.WriteLine($"Method: {context.Request.Method}");
- Console.WriteLine($"PathBase: {context.Request.PathBase}");
- Console.WriteLine($"Path: {context.Request.Path}");
- Console.WriteLine($"QueryString: {context.Request.QueryString}");
-
- var connectionFeature = context.Connection;
- Console.WriteLine($"Peer: {connectionFeature.RemoteIpAddress?.ToString()} {connectionFeature.RemotePort}");
- Console.WriteLine($"Sock: {connectionFeature.LocalIpAddress?.ToString()} {connectionFeature.LocalPort}");
-
- var content = $"Hello world!{Environment.NewLine}Received '{Args}' from command line.";
- context.Response.ContentLength = content.Length;
- context.Response.ContentType = "text/plain";
- await context.Response.WriteAsync(content);
- });
- }
-
- public static int Main(string[] args)
- {
- if (args.Length == 0)
- {
- Console.WriteLine("KestrelHelloWorld ");
- return 1;
- }
-
- var url = new Uri(args[0]);
- Args = string.Join(" ", args);
-
- var host = new WebHostBuilder()
- .UseServer("Microsoft.AspNetCore.Server.Kestrel")
- .UseUrls(url.ToString())
- .UseStartup()
- .Build();
-
- ServerCancellationTokenSource = new CancellationTokenSource();
-
- // shutdown server after 20s.
- var shutdownTask = Task.Run(async () =>
- {
- await Task.Delay(20000);
- ServerCancellationTokenSource.Cancel();
- });
-
- host.Run(ServerCancellationTokenSource.Token);
- shutdownTask.Wait();
-
- return 0;
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/.noautobuild b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj
deleted file mode 100644
index bad19bf93..000000000
--- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
- netstandard1.6;net451
- Library
- $(AssetTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.0
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Program.cs b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/TestLibrary/Helper.cs b/TestAssets/DesktopTestProjects/MultiTFMXunitProject/TestLibrary/Helper.cs
deleted file mode 100644
index 67b32cfdb..000000000
--- a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/TestLibrary/Helper.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace TestLibrary
-{
- public static class Helper
- {
- ///
- /// Gets the message from the helper. This comment is here to help test XML documentation file generation, please do not remove it.
- ///
- /// A message
- public static string GetMessage()
- {
- return "This string came from the test library!";
- }
-
- public static void SayHi()
- {
- Console.WriteLine("Hello there!");
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/TestLibrary/TestLibrary.csproj b/TestAssets/DesktopTestProjects/MultiTFMXunitProject/TestLibrary/TestLibrary.csproj
deleted file mode 100644
index 9f5c4f4ab..000000000
--- a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/TestLibrary/TestLibrary.csproj
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- netstandard2.0
-
-
-
diff --git a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/UnitTest1.cs b/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/UnitTest1.cs
deleted file mode 100644
index f86168c43..000000000
--- a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/UnitTest1.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using TestLibrary;
-using Xunit;
-
-namespace TestNamespace
-{
- public class VSTestXunitTests
- {
- [Fact]
- public void VSTestXunitPassTest()
- {
- Assert.Equal("This string came from the test library!", Helper.GetMessage());
- }
-
- [Fact]
- public void VSTestXunitFailTest()
- {
- Assert.Equal(2, 2);
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/XUnitProject.csproj b/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/XUnitProject.csproj
deleted file mode 100644
index 2ae7ce025..000000000
--- a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/XUnitProject.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- net461;netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectA/.noautobuild b/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectA/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectA/Program.cs b/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectA/Program.cs
deleted file mode 100644
index 1d1f78b84..000000000
--- a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectA/Program.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Diagnostics;
-using TestLibrary;
-
-namespace TestApp
-{
- public class Program
- {
- public static int Main(string[] args)
- {
- Console.WriteLine("This string came from ProjectA");
- Console.WriteLine($"{ProjectD.GetMessage()}");
- return 0;
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectA/project.json b/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectA/project.json
deleted file mode 100644
index 1fb29b170..000000000
--- a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectA/project.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true,
- "preserveCompilationContext": true
- },
- "dependencies": {
- "ProjectB": {
- "target": "project",
- "version": "1.0.0-*"
- }
- },
- "frameworks": {
- "netcoreapp1.1": {
- "dependencies": {
- "Microsoft.NETCore.App": "1.1.0"
- }
- },
- "net451": {}
- },
- "runtimes": {
- "win7-x64": {},
- "win7-x86": {},
- "osx.10.10-x64": {},
- "osx.10.11-x64": {},
- "ubuntu.14.04-x64": {},
- "ubuntu.16.04-x64": {},
- "centos.7-x64": {},
- "rhel.7.2-x64": {},
- "debian.8-x64": {},
- "fedora.23-x64": {},
- "opensuse.13.2-x64": {}
- }
-}
diff --git a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectB/.noautobuild b/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectB/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectB/Helper.cs b/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectB/Helper.cs
deleted file mode 100644
index 5a986d891..000000000
--- a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectB/Helper.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace TestLibrary
-{
- public static class ProjectB
- {
- public static string GetMessage()
- {
- return "This string came from ProjectB";
- }
- }
-}
diff --git a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectB/project.json b/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectB/project.json
deleted file mode 100644
index 0e9d0db62..000000000
--- a/TestAssets/DesktopTestProjects/TestAppWithFrameworkAssemblies/ProjectB/project.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "nowarn": [
- "CS1591"
- ],
- "xmlDoc": true,
- "additionalArguments": [
- "-highentropyva+"
- ]
- },
- "dependencies": {
- "NETStandard.Library": "1.6.0"
- },
- "frameworks": {
- "netstandard1.5": {},
- "net451": {
- "frameworkAssemblies": {
- "System.ComponentModel.DataAnnotations": ""
- }
- }
- }
-}
diff --git a/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.fragment.lock.json b/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.fragment.lock.json
deleted file mode 100644
index d803c7d2c..000000000
--- a/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.fragment.lock.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "version": 2,
- "exports": {
- "ClassLibrary2/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.6",
- "compile": {
- "bin/Debug/ClassLibrary2.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary2.dll": {}
- }
- },
- "ClassLibrary3/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.6",
- "compile": {
- "bin/Debug/ClassLibrary3.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary3.dll": {}
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.json b/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.json
deleted file mode 100644
index 34284fa19..000000000
--- a/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "frameworks": {
- "net46": {
- "dependencies": {
- "ClassLibrary1": {
- "target": "project"
- },
- "ClassLibrary2": {
- "target": "project"
- },
- "ClassLibrary3": {
- "target": "project"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.lock.json b/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.lock.json
deleted file mode 100644
index 244c3771b..000000000
--- a/TestAssets/LockFiles/ExportFiles/invalid_missing-exports/project.lock.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "locked": false,
- "version": 2,
- "targets": {
- ".NETFramework,Version=v4.6": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- },
- ".NETFramework,Version=v4.6/win7-x64": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- },
- ".NETFramework,Version=v4.6/win7-x86": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- }
- },
- "libraries": {
- "ClassLibrary1/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary1/ClassLibrary1.csproj"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary2/ClassLibrary2.csproj"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary3/ClassLibrary3.csproj"
- }
- },
- "projectFileDependencyGroups": {
- "": [],
- ".NETFramework,Version=v4.6": [
- "ClassLibrary1",
- "ClassLibrary2",
- "ClassLibrary3"
- ]
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.fragment.lock.json b/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.fragment.lock.json
deleted file mode 100644
index 7b6738e49..000000000
--- a/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.fragment.lock.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "version": 3,
- "exports": {
- "ClassLibrary1/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.5.2",
- "compile": {
- "bin/Debug/ClassLibrary1.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary1.dll": {}
- }
- },
- "ClassLibrary2/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.6",
- "compile": {
- "bin/Debug/ClassLibrary2.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary2.dll": {}
- }
- },
- "ClassLibrary3/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.6",
- "compile": {
- "bin/Debug/ClassLibrary3.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary3.dll": {}
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.json b/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.json
deleted file mode 100644
index 34284fa19..000000000
--- a/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "frameworks": {
- "net46": {
- "dependencies": {
- "ClassLibrary1": {
- "target": "project"
- },
- "ClassLibrary2": {
- "target": "project"
- },
- "ClassLibrary3": {
- "target": "project"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.lock.json b/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.lock.json
deleted file mode 100644
index 244c3771b..000000000
--- a/TestAssets/LockFiles/ExportFiles/invalid_missmatching-versions/project.lock.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "locked": false,
- "version": 2,
- "targets": {
- ".NETFramework,Version=v4.6": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- },
- ".NETFramework,Version=v4.6/win7-x64": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- },
- ".NETFramework,Version=v4.6/win7-x86": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- }
- },
- "libraries": {
- "ClassLibrary1/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary1/ClassLibrary1.csproj"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary2/ClassLibrary2.csproj"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary3/ClassLibrary3.csproj"
- }
- },
- "projectFileDependencyGroups": {
- "": [],
- ".NETFramework,Version=v4.6": [
- "ClassLibrary1",
- "ClassLibrary2",
- "ClassLibrary3"
- ]
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/invalid_nofragment/project.json b/TestAssets/LockFiles/ExportFiles/invalid_nofragment/project.json
deleted file mode 100644
index 34284fa19..000000000
--- a/TestAssets/LockFiles/ExportFiles/invalid_nofragment/project.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "frameworks": {
- "net46": {
- "dependencies": {
- "ClassLibrary1": {
- "target": "project"
- },
- "ClassLibrary2": {
- "target": "project"
- },
- "ClassLibrary3": {
- "target": "project"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/invalid_nofragment/project.lock.json b/TestAssets/LockFiles/ExportFiles/invalid_nofragment/project.lock.json
deleted file mode 100644
index 244c3771b..000000000
--- a/TestAssets/LockFiles/ExportFiles/invalid_nofragment/project.lock.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "locked": false,
- "version": 2,
- "targets": {
- ".NETFramework,Version=v4.6": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- },
- ".NETFramework,Version=v4.6/win7-x64": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- },
- ".NETFramework,Version=v4.6/win7-x86": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- }
- },
- "libraries": {
- "ClassLibrary1/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary1/ClassLibrary1.csproj"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary2/ClassLibrary2.csproj"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary3/ClassLibrary3.csproj"
- }
- },
- "projectFileDependencyGroups": {
- "": [],
- ".NETFramework,Version=v4.6": [
- "ClassLibrary1",
- "ClassLibrary2",
- "ClassLibrary3"
- ]
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/valid/project.fragment.lock.json b/TestAssets/LockFiles/ExportFiles/valid/project.fragment.lock.json
deleted file mode 100644
index 415fc75d8..000000000
--- a/TestAssets/LockFiles/ExportFiles/valid/project.fragment.lock.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "version": 2,
- "exports": {
- "ClassLibrary1/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.5.2",
- "compile": {
- "bin/Debug/ClassLibrary1.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary1.dll": {}
- }
- },
- "ClassLibrary2/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.6",
- "compile": {
- "bin/Debug/ClassLibrary2.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary2.dll": {}
- }
- },
- "ClassLibrary3/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.6",
- "compile": {
- "bin/Debug/ClassLibrary3.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary3.dll": {}
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/valid/project.json b/TestAssets/LockFiles/ExportFiles/valid/project.json
deleted file mode 100644
index 34284fa19..000000000
--- a/TestAssets/LockFiles/ExportFiles/valid/project.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "frameworks": {
- "net46": {
- "dependencies": {
- "ClassLibrary1": {
- "target": "project"
- },
- "ClassLibrary2": {
- "target": "project"
- },
- "ClassLibrary3": {
- "target": "project"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/valid/project.lock.json b/TestAssets/LockFiles/ExportFiles/valid/project.lock.json
deleted file mode 100644
index 099c3246c..000000000
--- a/TestAssets/LockFiles/ExportFiles/valid/project.lock.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "locked": false,
- "version": 2,
- "targets": {
- ".NETFramework,Version=v4.6": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- },
- ".NETFramework,Version=v4.6/win7-x64": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- },
- ".NETFramework,Version=v4.6/win7-x86": {
- "ClassLibrary1/1.0.0": {
- "type": "project"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project"
- }
- }
- },
- "libraries": {
- "ClassLibrary1/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary1/ClassLibrary1.csproj"
- },
- "ClassLibrary2/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary2/ClassLibrary2.csproj"
- },
- "ClassLibrary3/1.0.0": {
- "type": "project",
- "msbuildProject": "../../ClassLibrary3/ClassLibrary3.csproj"
- }
- },
- "projectFileDependencyGroups": {
- "": [],
- ".NETFramework,Version=v4.6": [
- "ClassLibrary1",
- "ClassLibrary2",
- "ClassLibrary3"
- ]
- },
- "packageFolders": {
- "/foo/packages": {},
- "/foo/packages2": {}
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.fragment.lock.json b/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.fragment.lock.json
deleted file mode 100644
index 415fc75d8..000000000
--- a/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.fragment.lock.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "version": 2,
- "exports": {
- "ClassLibrary1/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.5.2",
- "compile": {
- "bin/Debug/ClassLibrary1.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary1.dll": {}
- }
- },
- "ClassLibrary2/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.6",
- "compile": {
- "bin/Debug/ClassLibrary2.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary2.dll": {}
- }
- },
- "ClassLibrary3/1.0.0": {
- "type": "project",
- "framework": ".NETFramework,Version=v4.6",
- "compile": {
- "bin/Debug/ClassLibrary3.dll": {}
- },
- "runtime": {
- "bin/Debug/ClassLibrary3.dll": {}
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.json b/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.json
deleted file mode 100644
index beec156b7..000000000
--- a/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "frameworks": {
- "net46": {}
- }
-}
\ No newline at end of file
diff --git a/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.lock.json b/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.lock.json
deleted file mode 100644
index e7b45e57d..000000000
--- a/TestAssets/LockFiles/ExportFiles/valid_staleFragment/project.lock.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "locked": false,
- "version": 2,
- "targets": {
- ".NETFramework,Version=v4.6": { }
- },
- "libraries": {
- },
- "projectFileDependencyGroups": {
- "": [],
- ".NETFramework,Version=v4.6": []
- }
-}
\ No newline at end of file
diff --git a/TestAssets/NonRestoredTestProjects/AppThrowingException/App/AppThrowingException.csproj b/TestAssets/NonRestoredTestProjects/AppThrowingException/App/AppThrowingException.csproj
deleted file mode 100644
index 6fede9c95..000000000
--- a/TestAssets/NonRestoredTestProjects/AppThrowingException/App/AppThrowingException.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- Exe
- netcoreapp1.1
- dotnet-throwingtool
- $(AssemblyName)
-
-
-
-
- $(ProjectRuntimeConfigFilePath)
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/AppThrowingException/App/Program.cs b/TestAssets/NonRestoredTestProjects/AppThrowingException/App/Program.cs
deleted file mode 100644
index eadcb36e6..000000000
--- a/TestAssets/NonRestoredTestProjects/AppThrowingException/App/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace AppThrowing
-{
- class MyException : Exception
- {
- static void Main(string[] args)
- {
- throw new MyException();
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/AppDependingOnOtherAsTool.csproj b/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/AppDependingOnOtherAsTool.csproj
deleted file mode 100644
index 30c6823e7..000000000
--- a/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/AppDependingOnOtherAsTool.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/NuGet.Config b/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/NuGet.Config
deleted file mode 100644
index 97af9d3d0..000000000
--- a/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/Program.cs b/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/Program.cs
deleted file mode 100644
index d2db0fffd..000000000
--- a/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/Program.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj b/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj
deleted file mode 100644
index db9d6f117..000000000
--- a/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/Program.cs b/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestApp/Program.cs b/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestApp/Program.cs
deleted file mode 100644
index 855776696..000000000
--- a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestApp/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestApp/project.json b/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestApp/project.json
deleted file mode 100644
index 98e6c1f8f..000000000
--- a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestApp/project.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "dependencies": {
- "Microsoft.NETCore.App": "1.1.1",
- "TestLibraryAsAPackage": {
- "version": "1.0.0",
- "target": "package"
- }
- },
- "frameworks": {
- "netcoreapp1.1": {}
- },
- "runtimes": {
- "win7-x64": {},
- "win7-x86": {},
- "osx.10.10-x64": {},
- "osx.10.11-x64": {},
- "ubuntu.14.04-x64": {},
- "ubuntu.16.04-x64": {},
- "centos.7-x64": {},
- "rhel.7.2-x64": {},
- "debian.8-x64": {},
- "fedora.23-x64": {},
- "opensuse.13.2-x64": {}
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestLibraryAsAPackage/.noautobuild b/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestLibraryAsAPackage/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestLibraryAsAPackage/Helper.cs b/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestLibraryAsAPackage/Helper.cs
deleted file mode 100644
index 8c643796b..000000000
--- a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestLibraryAsAPackage/Helper.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace TestLibrary
-{
- public static class Helper
- {
- ///
- /// Gets the message from the helper. This comment is here to help test XML documentation file generation, please do not remove it.
- ///
- /// A message
- public static string GetMessage()
- {
- return "This string came from the test library!";
- }
-
- public static void SayHi()
- {
- Console.WriteLine("Hello there!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestLibraryAsAPackage/project.json b/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestLibraryAsAPackage/project.json
deleted file mode 100644
index 48bc772d8..000000000
--- a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/TestLibraryAsAPackage/project.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "nowarn": [
- "CS1591"
- ],
- "xmlDoc": true,
- "additionalArguments": [
- "-highentropyva+"
- ]
- },
- "dependencies": {
- "NETStandard.Library": "1.6.0"
- },
- "frameworks": {
- "netstandard1.5": {}
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/global.json b/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/global.json
deleted file mode 100644
index 8c0927574..000000000
--- a/TestAssets/NonRestoredTestProjects/AppWithProjectDependencyAsTarget/global.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "projects": [ "." ]
-}
\ No newline at end of file
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Broken/Broken.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Broken/Broken.csproj
deleted file mode 100644
index 1a79fa49d..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Broken/Broken.csproj
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- Library
- net451;netcoreapp2.0
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.cs
deleted file mode 100644
index 6b4e993f1..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class EmptyItemGroup
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj
deleted file mode 100644
index 0bdb79506..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Library
- net451;netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.cs
deleted file mode 100644
index 734d29ed8..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.cs
+++ /dev/null
@@ -1,4 +0,0 @@
-// Dummy reference - it can be used as an existing reference in any of the projects
-public class Lib
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj
deleted file mode 100644
index 1be153a79..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Library
- net451;netcoreapp2.0;netstandard1.4
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/SomeSourceFile.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/SomeSourceFile.cs
deleted file mode 100644
index 4b9f356dc..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/SomeSourceFile.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class SomeClass
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj
deleted file mode 100644
index 68b8ed617..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Library
- netcoreapp2.0
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj
deleted file mode 100644
index 68b8ed617..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Library
- netcoreapp2.0
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.cs
deleted file mode 100644
index 7fd23b9ef..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class Net452AndNetCoreApp10Lib
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj
deleted file mode 100644
index e11e31084..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- Library
- net452;netcoreapp2.0
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.cs
deleted file mode 100644
index a0e97f3ee..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class Net45Lib
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.csproj
deleted file mode 100644
index 3e8feea35..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.csproj
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- Library
- net45
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.cs
deleted file mode 100644
index 675dbba01..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-// Dummy reference - it should not be referenced by any other project directly
-// it should be used as a reference passed to the dotnet add p2p
-public class ValidRef
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj
deleted file mode 100644
index 0fc35d3d8..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- Library
- net451;netcoreapp1.0;netstandard1.4
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.cs
deleted file mode 100644
index d093e4a49..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class WithDoubledRef
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj
deleted file mode 100644
index f33aa7821..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Library
- net451;netcoreapp1.0
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.cs
deleted file mode 100644
index 4d402e492..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class WithExistingRefCondOnItem
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj
deleted file mode 100644
index 8747ed6b7..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Library
- net451;netcoreapp1.0
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.cs
deleted file mode 100644
index 1bcd39cfd..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class WithExistingRefCondWhitespaces
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj
deleted file mode 100644
index 0b2792110..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- Library
- net451;netcoreapp1.0
-
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.cs
deleted file mode 100644
index f3fcd06dc..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class WithRefCondNonUniform
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.csproj
deleted file mode 100644
index decd23bec..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.csproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Library
- net451;netcoreapp1.0
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.cs b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.cs
deleted file mode 100644
index 931aa9634..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-public class WithRefNoCondNonUniform
-{
-}
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj
deleted file mode 100644
index 328fc5fb1..000000000
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Library
- net451;netcoreapp1.0
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/Program.cs b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/Program.cs
deleted file mode 100644
index fa982665c..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/Program.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Diagnostics;
-
-namespace TestApp
-{
- public class Program
- {
- public static int Main(string[] args)
- {
- Console.WriteLine(TestLibrary.Helper.GetMessage());
- Console.WriteLine(subdir.Helper.GetMessage());
- return 100;
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestApp.sln b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestApp.sln
deleted file mode 100644
index 3dc27a305..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestApp.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestApp", "TestApp.xproj", "{0138CB8F-4AA9-4029-A21E-C07C30F425BA}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestLibrary", "..\TestLibrary\TestLibrary.xproj", "{DC0B35D0-8A36-4B52-8A11-B86739F055D2}"
-EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "subdir", "src\subdir\subdir.xproj", "{F8F96F4A-F10C-4C54-867C-A9EFF55494C8}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Release|Any CPU.Build.0 = Release|Any CPU
- {DC0B35D0-8A36-4B52-8A11-B86739F055D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DC0B35D0-8A36-4B52-8A11-B86739F055D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DC0B35D0-8A36-4B52-8A11-B86739F055D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DC0B35D0-8A36-4B52-8A11-B86739F055D2}.Release|Any CPU.Build.0 = Release|Any CPU
- {F8F96F4A-F10C-4C54-867C-A9EFF55494C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F8F96F4A-F10C-4C54-867C-A9EFF55494C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F8F96F4A-F10C-4C54-867C-A9EFF55494C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F8F96F4A-F10C-4C54-867C-A9EFF55494C8}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestApp.xproj b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestApp.xproj
deleted file mode 100644
index d18702195..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestApp.xproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- 14.0.23107
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
- 0138cb8f-4aa9-4029-a21e-c07c30f425ba
- TestAppWithContents
- ..\..\..\artifacts\obj\$(MSBuildProjectName)
- ..\..\..\artifacts\
-
-
- 2.0
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestAssets/TestAsset/Program.cs b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestAssets/TestAsset/Program.cs
deleted file mode 100644
index dc6aad3b3..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestAssets/TestAsset/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace App.Tests
-{
- public class TestAssetProgram
- {
- public static void TestAssetMain(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestAssets/TestAsset/project.json b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestAssets/TestAsset/project.json
deleted file mode 100644
index be38f2878..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/TestAssets/TestAsset/project.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "frameworks": {
- "netcoreapp1.1": {
- "imports": [
- "portable-net451+win8"
- ],
- "dependencies": {
- "Microsoft.NETCore.App": {
- "version": "1.1.0",
- "type": "platform"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/project.json b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/project.json
deleted file mode 100644
index 788896dab..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/project.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true,
- "preserveCompilationContext": true
- },
- "dependencies": {
- "TestLibrary": {
- "target": "project",
- "version": "1.0.0-*"
- },
- "subdir": {
- "target": "project",
- "version": "1.0.0-*"
- },
- "Microsoft.NETCore.App": "1.1.1"
- },
- "frameworks": {
- "netcoreapp1.1": {}
- },
- "runtimes": {
- "win7-x64": {},
- "win7-x86": {},
- "osx.10.10-x64": {},
- "osx.10.11-x64": {},
- "ubuntu.14.04-x64": {},
- "ubuntu.16.04-x64": {},
- "centos.7-x64": {},
- "rhel.7.2-x64": {},
- "debian.8-x64": {},
- "fedora.23-x64": {},
- "opensuse.13.2-x64": {}
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/Helper.cs b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/Helper.cs
deleted file mode 100644
index 2d937c387..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/Helper.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace subdir
-{
- public static class Helper
- {
- public static string GetMessage()
- {
- return "This string came from the subdir test library!";
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/project.json b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/project.json
deleted file mode 100644
index bdf53dd6e..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/project.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "nowarn": [
- "CS1591"
- ],
- "additionalArguments": [
- "-highentropyva+"
- ]
- },"dependencies": {
- "NETStandard.Library": "1.6.0"
- },
- "frameworks": {
- "netstandard1.5": {}
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/subdir.xproj b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/subdir.xproj
deleted file mode 100644
index 8f183ae93..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestApp/src/subdir/subdir.xproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- 14.0.23107
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
- F8F96F4A-F10C-4C54-867C-A9EFF55494C8
- TestAppWithContents
- ..\..\..\artifacts\obj\$(MSBuildProjectName)
- ..\..\..\artifacts\
-
-
- 2.0
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/Helper.cs b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/Helper.cs
deleted file mode 100644
index 6c3bc0e53..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/Helper.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace TestLibrary
-{
- public static class Helper
- {
- public static string GetMessage()
- {
- return "This string came from the test library!";
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/TestLibrary.xproj b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/TestLibrary.xproj
deleted file mode 100644
index dc8eb7060..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/TestLibrary.xproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- 14.0.23107
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
- dc0b35d0-8a36-4b52-8a11-b86739f055d2
- TestAppWithContents
- ..\..\..\artifacts\obj\$(MSBuildProjectName)
- ..\..\..\artifacts\
-
-
- 2.0
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/project.json b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/project.json
deleted file mode 100644
index 032754312..000000000
--- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefs/TestLibrary/project.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "version": "1.0.0-*",
- "dependencies": {
- "NETStandard.Library": "1.6.0"
- },
- "frameworks": {
- "netstandard1.5": {}
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJDeprecatedNamedResource/Program.cs b/TestAssets/NonRestoredTestProjects/PJDeprecatedNamedResource/Program.cs
deleted file mode 100644
index ca20e2e00..000000000
--- a/TestAssets/NonRestoredTestProjects/PJDeprecatedNamedResource/Program.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Linq;
-using System.Reflection;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- var thisAssembly = typeof(Program).GetTypeInfo().Assembly;
- var resources = from resourceName in thisAssembly.GetManifestResourceNames()
- select resourceName;
-
- var resourceNames = string.Join(",", resources);
- Console.WriteLine($"{resources.Count()} Resources Found: {resourceNames}");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJDeprecatedNamedResource/project.json b/TestAssets/NonRestoredTestProjects/PJDeprecatedNamedResource/project.json
deleted file mode 100644
index fce9b2e1a..000000000
--- a/TestAssets/NonRestoredTestProjects/PJDeprecatedNamedResource/project.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "version": "1.0.0-*",
- "namedResource": [ "My.Alias", "Strings.resx" ],
- "buildOptions": {
- "debugType": "portable",
- "emitEntryPoint": true
- },
- "dependencies": {},
- "frameworks": {
- "netcoreapp1.1": {
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.1.0"
- }
- },
- "imports": "dnxcore50"
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/ProjectB/Program.cs b/TestAssets/NonRestoredTestProjects/PJHalfMigrated/ProjectB/Program.cs
deleted file mode 100755
index 2130cd0a7..000000000
--- a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/ProjectB/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/ProjectB/project.json b/TestAssets/NonRestoredTestProjects/PJHalfMigrated/ProjectB/project.json
deleted file mode 100755
index 7de792cd3..000000000
--- a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/ProjectB/project.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "debugType": "portable",
- "emitEntryPoint": true
- },
- "dependencies": {
- "ProjectA": {
- "target": "project"
- }
- },
- "frameworks": {
- "netcoreapp1.1": {
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.1.0"
- }
- },
- "imports": "dnxcore50"
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/backup/src/ProjectA/project.json b/TestAssets/NonRestoredTestProjects/PJHalfMigrated/backup/src/ProjectA/project.json
deleted file mode 100755
index ce67b3a46..000000000
--- a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/backup/src/ProjectA/project.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "debugType": "portable",
- "emitEntryPoint": true
- },
- "dependencies": {},
- "frameworks": {
- "netcoreapp1.0": {
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.0.0"
- }
- },
- "imports": "dnxcore50"
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/global.json b/TestAssets/NonRestoredTestProjects/PJHalfMigrated/global.json
deleted file mode 100644
index b0323e428..000000000
--- a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/global.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "projects": [ "src" ]
-}
\ No newline at end of file
diff --git a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/Program.cs b/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/Program.cs
deleted file mode 100755
index 2130cd0a7..000000000
--- a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/ProjectA.csproj b/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/ProjectA.csproj
deleted file mode 100755
index 915cb3e07..000000000
--- a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/ProjectA.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- netcoreapp2.0
- portable
- ProjectA
- Exe
- ProjectA
- $(AssetTargetFallback);dnxcore50
- 1.0.3
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json b/TestAssets/NonRestoredTestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json
deleted file mode 100644
index d685d1947..000000000
--- a/TestAssets/NonRestoredTestProjects/TestLibraryWithProjectFileWithoutFrameworks/project.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "dependencies": {
- "Microsoft.VisualStudio.Web.CodeGeneration.Tools" : {
- "version": "1.0.0-preview2-final",
- "type": "build"
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithSelfReferencingDependency/.noautobuild b/TestAssets/NonRestoredTestProjects/TestProjectWithSelfReferencingDependency/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithSelfReferencingDependency/Program.cs b/TestAssets/NonRestoredTestProjects/TestProjectWithSelfReferencingDependency/Program.cs
deleted file mode 100644
index 855776696..000000000
--- a/TestAssets/NonRestoredTestProjects/TestProjectWithSelfReferencingDependency/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithSelfReferencingDependency/project.json b/TestAssets/NonRestoredTestProjects/TestProjectWithSelfReferencingDependency/project.json
deleted file mode 100644
index 92c28da27..000000000
--- a/TestAssets/NonRestoredTestProjects/TestProjectWithSelfReferencingDependency/project.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "dependencies": {
- "TestProjectWithSelfReferencingDependency": {
- "target": "project"
- }
- },
- "frameworks": {
- "netcoreapp1.1": {
- "imports": "dnxcore50"
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedDependency/.noautobuild b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedDependency/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedDependency/Program.cs b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedDependency/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedDependency/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedDependency/project.json b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedDependency/project.json
deleted file mode 100644
index eafa839b9..000000000
--- a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedDependency/project.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.1.0"
- },
- "ThisIsNotARealDependencyAndIfSomeoneGoesAndAddsAProjectWithThisNameIWillFindThemAndPunishThem": {
- "target": "project"
- }
- },
- "frameworks": {
- "netcoreapp1.1": {
- "imports": "dnxcore50"
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/.noautobuild b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/Program.cs b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj
deleted file mode 100755
index 261918eb3..000000000
--- a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- netcoreapp2.0
- Exe
- $(AssetTargetFallback);dnxcore50
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj
deleted file mode 100644
index f5ab2f51a..000000000
--- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
- random-name
-
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/NuGet.Config b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/NuGet.Config
deleted file mode 100644
index 97af9d3d0..000000000
--- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/Program.cs b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/Program.cs
deleted file mode 100644
index d2db0fffd..000000000
--- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/Program.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/Program.cs b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/Program.cs
deleted file mode 100644
index 0ea7804c7..000000000
--- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/Program.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello World from tool!");
- }
-}
diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj
deleted file mode 100644
index 9184414e8..000000000
--- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
- random-name
- $(GeneratedPackageId)
- dotnet-randompackage
-
-
-
-
- $(ProjectRuntimeConfigFilePath)
-
-
-
-
diff --git a/TestAssets/TestPackages/PackageWithFakeNativeDep/Lib.cs b/TestAssets/TestPackages/PackageWithFakeNativeDep/Lib.cs
deleted file mode 100644
index 07a5ba6b0..000000000
--- a/TestAssets/TestPackages/PackageWithFakeNativeDep/Lib.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace PackageWithFakeNativeDep
-{
- public static class Lib
- {
- public static string GetMessage()
- {
- return "Hello, World";
- }
- }
-}
diff --git a/TestAssets/TestPackages/PackageWithFakeNativeDep/PackageWithFakeNativeDep.csproj b/TestAssets/TestPackages/PackageWithFakeNativeDep/PackageWithFakeNativeDep.csproj
deleted file mode 100644
index de9c330de..000000000
--- a/TestAssets/TestPackages/PackageWithFakeNativeDep/PackageWithFakeNativeDep.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- net45
- PackageWithFakeNativeDep
-
-
-
-
- runtimes/
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestPackages/PackageWithFakeNativeDep/runtimes/win7-x64/native/the-win-x64-version.txt b/TestAssets/TestPackages/PackageWithFakeNativeDep/runtimes/win7-x64/native/the-win-x64-version.txt
deleted file mode 100644
index ee3c10a16..000000000
--- a/TestAssets/TestPackages/PackageWithFakeNativeDep/runtimes/win7-x64/native/the-win-x64-version.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is just a marker to ensure things are deployed right
diff --git a/TestAssets/TestPackages/PackageWithFakeNativeDep/runtimes/win7-x86/native/the-win-x86-version.txt b/TestAssets/TestPackages/PackageWithFakeNativeDep/runtimes/win7-x86/native/the-win-x86-version.txt
deleted file mode 100644
index ee3c10a16..000000000
--- a/TestAssets/TestPackages/PackageWithFakeNativeDep/runtimes/win7-x86/native/the-win-x86-version.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is just a marker to ensure things are deployed right
diff --git a/TestAssets/TestPackages/ToolWithOutputName/Program.cs b/TestAssets/TestPackages/ToolWithOutputName/Program.cs
deleted file mode 100644
index 91bf8b3c7..000000000
--- a/TestAssets/TestPackages/ToolWithOutputName/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Tool with output name!");
- }
- }
-}
diff --git a/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj b/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj
deleted file mode 100644
index 6c57ebe5d..000000000
--- a/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- netcoreapp2.0
- dotnet-tool-with-output-name
- ToolWithOutputName
- Exe
-
-
-
diff --git a/TestAssets/TestPackages/dotnet-dependency-context-test/Program.cs b/TestAssets/TestPackages/dotnet-dependency-context-test/Program.cs
deleted file mode 100644
index c2d8368b9..000000000
--- a/TestAssets/TestPackages/dotnet-dependency-context-test/Program.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Linq;
-using Microsoft.Extensions.DependencyModel;
-
-namespace Microsoft.DotNet.Tools.DependencyContextTest
-{
- public class Program
- {
- public static int Main(string[] args)
- {
- if(args.Length > 0 && args[0] == "--debug")
- {
- Console.WriteLine("Waiting for Debugger to attach, press ENTER to continue");
- Console.WriteLine($"Process ID: {System.Diagnostics.Process.GetCurrentProcess().Id}");
- Console.ReadLine();
- }
-
- if(DependencyContext.Default != null)
- {
- Console.WriteLine("DependencyContext.Default is set!");
- }
- else
- {
- Console.Error.WriteLine("DependencyContext.Default is NULL!");
- return 1;
- }
-
- if(DependencyContext.Default.RuntimeGraph.Any())
- {
- Console.WriteLine("DependencyContext.Default.RuntimeGraph has items!");
- }
- else
- {
- Console.WriteLine("DependencyContext.Default.RuntimeGraph is empty!");
- return 1;
- }
-
- Console.WriteLine("Tests succeeded!");
- return 0;
- }
- }
-}
diff --git a/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj b/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj
deleted file mode 100644
index 97e20d00d..000000000
--- a/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- 1.0.0-rc
- netcoreapp2.0
- Exe
-
-
-
-
-
-
-
diff --git a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj
index a6c5b91c1..dc08ecdd0 100644
--- a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj
+++ b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/dotnet-dependency-tool-invoker.csproj
@@ -12,13 +12,9 @@
false
-
- $(CliVersionPrefix)-*
-
-
-
+
diff --git a/TestAssets/TestPackages/dotnet-desktop-and-portable/NuGet.Config b/TestAssets/TestPackages/dotnet-desktop-and-portable/NuGet.Config
deleted file mode 100644
index e80222c1f..000000000
--- a/TestAssets/TestPackages/dotnet-desktop-and-portable/NuGet.Config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestPackages/dotnet-desktop-and-portable/Program.cs b/TestAssets/TestPackages/dotnet-desktop-and-portable/Program.cs
deleted file mode 100644
index 121c1f775..000000000
--- a/TestAssets/TestPackages/dotnet-desktop-and-portable/Program.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Reflection;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
-#if NET451
- Console.WriteLine($"Hello {string.Join(" ", args)} From .NETFramework,Version=v4.5.1");
-#elif NETCOREAPP1_0
- Console.WriteLine($"Hello {string.Join(" ", args)} From .NETCoreApp,Version=v1.0");
-#endif
- var currentAssemblyPath = typeof(ConsoleApplication.Program).GetTypeInfo().Assembly.Location;
- Console.WriteLine($"Current Assembly Directory - {currentAssemblyPath}");
- }
- }
-}
diff --git a/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj b/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj
deleted file mode 100644
index 185ef41f0..000000000
--- a/TestAssets/TestPackages/dotnet-desktop-and-portable/dotnet-desktop-and-portable.csproj
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- 1.0.0-rc
- netcoreapp1.1;net451
- dotnet-desktop-and-portable
- Exe
- win7-x64;win7-x86
-
-
-
- 1.1.1
-
-
-
-
-
-
-
diff --git a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/Program.cs b/TestAssets/TestPackages/dotnet-desktop-binding-redirects/Program.cs
deleted file mode 100644
index 57ecd14fc..000000000
--- a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/Program.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Reflection;
-
-namespace BindingRedirects
-{
- public class Program
- {
- private const string ExpectedNewtonSoftVersion = "8.0.0.0";
-
- public static int Main(string[] args)
- {
- return VerifyJsonLoad();
- }
-
- private static int VerifyJsonLoad()
- {
- WriteLine("=======Verifying Redirected Newtonsoft.Json assembly load=======");
-
- int result = 0;
-
- try
- {
- var jsonAsm = typeof(Newtonsoft.Json.JsonConvert).Assembly;
- var version = jsonAsm.GetName().Version.ToString();
- if (version != ExpectedNewtonSoftVersion)
- {
- WriteLine($"Failure - Newtonsoft.Json: ExpectedVersion - {ExpectedNewtonSoftVersion}, ActualVersion - {version}");
- result = -1;
- }
- }
- catch (Exception ex)
- {
- WriteLine($"Failed to load type 'Newtonsoft.Json.JsonConvert'");
- throw ex;
- }
-
- return result;
- }
-
- private static void WriteLine(string str)
- {
- var currentAssembly = Assembly.GetExecutingAssembly().GetName().Name;
- Console.WriteLine($"{currentAssembly}: {str}");
- }
- }
-}
diff --git a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj b/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj
deleted file mode 100644
index f77a56e08..000000000
--- a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- 1.0.0-rc
- net451
- dotnet-desktop-binding-redirects
- Exe
- win7-x86;win7-x64
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestPackages/dotnet-fallbackfoldertool/Program.cs b/TestAssets/TestPackages/dotnet-fallbackfoldertool/Program.cs
deleted file mode 100644
index c936da285..000000000
--- a/TestAssets/TestPackages/dotnet-fallbackfoldertool/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello Fallback folder World!");
- }
- }
-}
diff --git a/TestAssets/TestPackages/dotnet-fallbackfoldertool/dotnet-fallbackfoldertool.csproj b/TestAssets/TestPackages/dotnet-fallbackfoldertool/dotnet-fallbackfoldertool.csproj
deleted file mode 100644
index 35e92a2bb..000000000
--- a/TestAssets/TestPackages/dotnet-fallbackfoldertool/dotnet-fallbackfoldertool.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- netcoreapp2.0
- dotnet-fallbackfoldertool
- Exe
-
-
-
-
diff --git a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/Program.cs b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/Program.cs
deleted file mode 100644
index bf77cb409..000000000
--- a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello");
- }
- }
-}
diff --git a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj
deleted file mode 100644
index fd5621f08..000000000
--- a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- 1.0.0
-
-
- netcoreapp2.0
- dotnet-hello
- Exe
- win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
-
-
-
diff --git a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/Program.cs b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj
deleted file mode 100644
index 2391dfc1b..000000000
--- a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- 2.0.0
-
-
- netcoreapp2.0
- dotnet-hello
- Exe
- win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
-
-
diff --git a/TestAssets/TestPackages/dotnet-outputsframeworkversion/dotnet-outputsframeworkversion-netcoreapp1.0/Program.cs b/TestAssets/TestPackages/dotnet-outputsframeworkversion/dotnet-outputsframeworkversion-netcoreapp1.0/Program.cs
deleted file mode 100644
index 02952b8b4..000000000
--- a/TestAssets/TestPackages/dotnet-outputsframeworkversion/dotnet-outputsframeworkversion-netcoreapp1.0/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("netcoreapp1.0");
- }
- }
-}
diff --git a/TestAssets/TestPackages/dotnet-outputsframeworkversion/dotnet-outputsframeworkversion-netcoreapp1.0/dotnet-outputsframeworkversion-netcoreapp1.0.csproj b/TestAssets/TestPackages/dotnet-outputsframeworkversion/dotnet-outputsframeworkversion-netcoreapp1.0/dotnet-outputsframeworkversion-netcoreapp1.0.csproj
deleted file mode 100644
index e26afd464..000000000
--- a/TestAssets/TestPackages/dotnet-outputsframeworkversion/dotnet-outputsframeworkversion-netcoreapp1.0/dotnet-outputsframeworkversion-netcoreapp1.0.csproj
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- netcoreapp1.0
- dotnet-outputsframeworkversion-netcoreapp1.0
- Exe
- 1.1.1
-
-
diff --git a/TestAssets/TestPackages/dotnet-portable-v1-prefercli/dotnet-portable-v1-prefercli.csproj b/TestAssets/TestPackages/dotnet-portable-v1-prefercli/dotnet-portable-v1-prefercli.csproj
deleted file mode 100644
index 10cc9b117..000000000
--- a/TestAssets/TestPackages/dotnet-portable-v1-prefercli/dotnet-portable-v1-prefercli.csproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- netcoreapp1.1
- Exe
-
-
-
-
- $(ProjectRuntimeConfigFilePath)
-
-
-
-
-
-
-
diff --git a/TestAssets/TestPackages/dotnet-portable-v1/dotnet-portable-v1.csproj b/TestAssets/TestPackages/dotnet-portable-v1/dotnet-portable-v1.csproj
deleted file mode 100644
index b1bddfee9..000000000
--- a/TestAssets/TestPackages/dotnet-portable-v1/dotnet-portable-v1.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- netcoreapp1.1
- Exe
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj
deleted file mode 100644
index c15ae1a16..000000000
--- a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Exe
- netcoreapp1.1
- $(TEST_PACKAGES)
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/Program.cs b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithAppDependency/TestApp1/Program.cs b/TestAssets/TestProjects/AppWithAppDependency/TestApp1/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestProjects/AppWithAppDependency/TestApp1/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithAppDependency/TestApp1/project.json b/TestAssets/TestProjects/AppWithAppDependency/TestApp1/project.json
deleted file mode 100644
index f863c3161..000000000
--- a/TestAssets/TestProjects/AppWithAppDependency/TestApp1/project.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "buildOptions": {
- "emitEntryPoint": true
- },
- "dependencies": {
- "TestApp2": {
- "target": "project"
- }
- },
- "frameworks": {
- "netcoreapp1.1": {
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.1.0"
- }
- }
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithAppDependency/TestApp2/Program.cs b/TestAssets/TestProjects/AppWithAppDependency/TestApp2/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestProjects/AppWithAppDependency/TestApp2/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithAppDependency/TestApp2/project.json b/TestAssets/TestProjects/AppWithAppDependency/TestApp2/project.json
deleted file mode 100644
index 2cfedcea8..000000000
--- a/TestAssets/TestProjects/AppWithAppDependency/TestApp2/project.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "buildOptions": {
- "emitEntryPoint": true
- },
- "dependencies": {},
- "frameworks": {
- "netcoreapp1.1": {
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.1.0"
- }
- }
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithAppDependency/global.json b/TestAssets/TestProjects/AppWithAppDependency/global.json
deleted file mode 100644
index 9e26dfeeb..000000000
--- a/TestAssets/TestProjects/AppWithAppDependency/global.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/AppWithCorruptedLaunchSettings.csproj b/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/AppWithCorruptedLaunchSettings.csproj
deleted file mode 100644
index 45a048433..000000000
--- a/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/AppWithCorruptedLaunchSettings.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
- win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
-
-
diff --git a/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/Program.cs b/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/Program.cs
deleted file mode 100644
index 042e99826..000000000
--- a/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/Program.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace MSBuildTestApp
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- if (args.Length > 0)
- {
- Console.WriteLine("echo args:" + string.Join(";", args));
- }
- string message = Environment.GetEnvironmentVariable("Message");
-
- if (string.IsNullOrEmpty(message))
- {
- message = "(NO MESSAGE)";
- }
-
- Console.WriteLine(message);
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/Properties/launchSettings.json b/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/Properties/launchSettings.json
deleted file mode 100644
index 4307944ab..000000000
--- a/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/Properties/launchSettings.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:49850/",
- "sslPort": 0
- }
- },
- "profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "First": {
- "commandName": "Project",
- "environmentVariables": [ ]
- },
- "Second": {
- "commandName": "Project",
- "environmentVariables": {
- "Message": "Second"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj
deleted file mode 100755
index 0559ffd92..000000000
--- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- netcoreapp2.0
- Exe
- $(TEST_PACKAGES)
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/Program.cs b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/Program.cs
deleted file mode 100644
index cbcb20f55..000000000
--- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("App with a dependency on a tool whose package name is different from the dll name!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
deleted file mode 100755
index d94296238..000000000
--- a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- netcoreapp2.0
- Exe
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/Program.cs b/TestAssets/TestProjects/AppWithDirectAndToolDep/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestProjects/AppWithDirectAndToolDep/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
deleted file mode 100755
index f8fea864c..000000000
--- a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- 1.0.0
- netcoreapp2.0
- AppWithDirectDep
- Exe
- false
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/AppWithDirectDep/Program.cs b/TestAssets/TestProjects/AppWithDirectDep/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestProjects/AppWithDirectDep/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj
deleted file mode 100755
index 3a99fed0d..000000000
--- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- netcoreapp2.0
- Exe
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/Program.cs b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/Program.cs
deleted file mode 100644
index 4178a0e4b..000000000
--- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Contains a dependency on a tool whose package name is different from the dll name.");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj
deleted file mode 100755
index 1410deeb4..000000000
--- a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- netcoreapp2.0
- Exe
- $(TEST_PACKAGES)
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/Program.cs b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithLaunchSettings/AppWithLaunchSettings.csproj b/TestAssets/TestProjects/AppWithLaunchSettings/AppWithLaunchSettings.csproj
deleted file mode 100644
index 45a048433..000000000
--- a/TestAssets/TestProjects/AppWithLaunchSettings/AppWithLaunchSettings.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
- win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
-
-
diff --git a/TestAssets/TestProjects/AppWithLaunchSettings/Program.cs b/TestAssets/TestProjects/AppWithLaunchSettings/Program.cs
deleted file mode 100644
index 042e99826..000000000
--- a/TestAssets/TestProjects/AppWithLaunchSettings/Program.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace MSBuildTestApp
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- if (args.Length > 0)
- {
- Console.WriteLine("echo args:" + string.Join(";", args));
- }
- string message = Environment.GetEnvironmentVariable("Message");
-
- if (string.IsNullOrEmpty(message))
- {
- message = "(NO MESSAGE)";
- }
-
- Console.WriteLine(message);
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithLaunchSettings/Properties/launchSettings.json b/TestAssets/TestProjects/AppWithLaunchSettings/Properties/launchSettings.json
deleted file mode 100644
index 615a345f2..000000000
--- a/TestAssets/TestProjects/AppWithLaunchSettings/Properties/launchSettings.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:49850/",
- "sslPort": 0
- }
- },
- "profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "First": {
- "commandName": "Project",
- "environmentVariables": {
- "Message": "First"
- }
- },
- "Second": {
- "commandName": "Project",
- "environmentVariables": {
- "Message": "Second"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/AppWithLaunchSettingsNoDefault.csproj b/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/AppWithLaunchSettingsNoDefault.csproj
deleted file mode 100644
index 45a048433..000000000
--- a/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/AppWithLaunchSettingsNoDefault.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
- win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
-
-
diff --git a/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/Program.cs b/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/Program.cs
deleted file mode 100644
index 042e99826..000000000
--- a/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/Program.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace MSBuildTestApp
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- if (args.Length > 0)
- {
- Console.WriteLine("echo args:" + string.Join(";", args));
- }
- string message = Environment.GetEnvironmentVariable("Message");
-
- if (string.IsNullOrEmpty(message))
- {
- message = "(NO MESSAGE)";
- }
-
- Console.WriteLine(message);
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/Properties/launchSettings.json b/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/Properties/launchSettings.json
deleted file mode 100644
index 010893fd5..000000000
--- a/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/Properties/launchSettings.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:49850/",
- "sslPort": 0
- }
- },
- "profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
deleted file mode 100644
index 3f38586d5..000000000
--- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- Exe
- net451;netcoreapp2.0
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/Program.cs b/TestAssets/TestProjects/AppWithMultipleFxAndTools/Program.cs
deleted file mode 100644
index 6cf5d8c9e..000000000
--- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
deleted file mode 100755
index 6f493b0c3..000000000
--- a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- netcoreapp2.0
- Exe
- $(TEST_PACKAGES)
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithToolDependency/Program.cs b/TestAssets/TestProjects/AppWithToolDependency/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestProjects/AppWithToolDependency/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj
deleted file mode 100755
index 4e7b4cd9d..000000000
--- a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- 1.0.0
- netcoreapp2.0
- DependencyContextFromTool
- Exe
- false
- $(AssetTargetFallback);dnxcore50;portable-net45+win8
- $(TEST_PACKAGES)
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/DependencyContextFromTool/Program.cs b/TestAssets/TestProjects/DependencyContextFromTool/Program.cs
deleted file mode 100644
index 27e3fa454..000000000
--- a/TestAssets/TestProjects/DependencyContextFromTool/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace DependencyContextFromTool
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hi!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/FSharpTestAppSimple/Program.fs b/TestAssets/TestProjects/FSharpTestAppSimple/Program.fs
deleted file mode 100644
index 65479d645..000000000
--- a/TestAssets/TestProjects/FSharpTestAppSimple/Program.fs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-module ConsoleApplication.Program
-
-open System
-
-[]
-let main argv =
- printfn "Hello World!"
- 0
diff --git a/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj b/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj
deleted file mode 100644
index 1af08f3b6..000000000
--- a/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- netcoreapp2.0
- Exe
-
- true
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/FSharpTestProjects/global.json b/TestAssets/TestProjects/FSharpTestProjects/global.json
deleted file mode 100644
index 9e455db71..000000000
--- a/TestAssets/TestProjects/FSharpTestProjects/global.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "projects": [ ".", "../../../src" ]
-}
diff --git a/TestAssets/TestProjects/FluentProfile/FluentFilterProfile.xml b/TestAssets/TestProjects/FluentProfile/FluentFilterProfile.xml
deleted file mode 100644
index ec16d69ab..000000000
--- a/TestAssets/TestProjects/FluentProfile/FluentFilterProfile.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/TestAssets/TestProjects/FluentProfile/FluentProfile.xml b/TestAssets/TestProjects/FluentProfile/FluentProfile.xml
deleted file mode 100644
index 512290d00..000000000
--- a/TestAssets/TestProjects/FluentProfile/FluentProfile.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/TestAssets/TestProjects/InvalidSolution/InvalidSolution.sln b/TestAssets/TestProjects/InvalidSolution/InvalidSolution.sln
deleted file mode 100644
index 6527f5d32..000000000
--- a/TestAssets/TestProjects/InvalidSolution/InvalidSolution.sln
+++ /dev/null
@@ -1 +0,0 @@
-This is a test of an invalid solution.
diff --git a/TestAssets/TestProjects/InvalidSolution/Lib/Lib.csproj b/TestAssets/TestProjects/InvalidSolution/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/InvalidSolution/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/InvalidSolution/Lib/Library.cs b/TestAssets/TestProjects/InvalidSolution/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/InvalidSolution/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/.noautobuild b/TestAssets/TestProjects/LibraryWithOutputAssemblyName/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/Class.cs b/TestAssets/TestProjects/LibraryWithOutputAssemblyName/Class.cs
deleted file mode 100644
index ed618e6bc..000000000
--- a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/Class.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace LibraryWithOutputAssemblyName
-{
- public class MyClass
- {
- }
-}
diff --git a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/MyLibrary.csproj b/TestAssets/TestProjects/LibraryWithOutputAssemblyName/MyLibrary.csproj
deleted file mode 100755
index af0401580..000000000
--- a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/MyLibrary.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- netstandard1.5
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/LibraryWithUnresolvablePackageReference/LibraryWithUnresolvablePackageReference.csproj b/TestAssets/TestProjects/LibraryWithUnresolvablePackageReference/LibraryWithUnresolvablePackageReference.csproj
deleted file mode 100755
index 66c164859..000000000
--- a/TestAssets/TestProjects/LibraryWithUnresolvablePackageReference/LibraryWithUnresolvablePackageReference.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.5
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj
deleted file mode 100644
index 89aae6c65..000000000
--- a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- Exe
- net451;netcoreapp2.0
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/Program.cs b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/Program.cs
deleted file mode 100644
index 6cf5d8c9e..000000000
--- a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
deleted file mode 100644
index 766c1ae66..000000000
--- a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- Exe
- net451;netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/MSBuildBareBonesProject/BareBones.proj b/TestAssets/TestProjects/MSBuildBareBonesProject/BareBones.proj
deleted file mode 100644
index e0b870644..000000000
--- a/TestAssets/TestProjects/MSBuildBareBonesProject/BareBones.proj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/MSBuildIntegration/build.proj b/TestAssets/TestProjects/MSBuildIntegration/build.proj
deleted file mode 100644
index 203f96df3..000000000
--- a/TestAssets/TestProjects/MSBuildIntegration/build.proj
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/MSBuildIntegration/build.props b/TestAssets/TestProjects/MSBuildIntegration/build.props
deleted file mode 100644
index 3d640d339..000000000
--- a/TestAssets/TestProjects/MSBuildIntegration/build.props
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/MultiDependentProject/MultiDependentProject.csproj b/TestAssets/TestProjects/MultiDependentProject/MultiDependentProject.csproj
deleted file mode 100644
index 8437d1b6d..000000000
--- a/TestAssets/TestProjects/MultiDependentProject/MultiDependentProject.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/MultiDependentProject/Program.cs b/TestAssets/TestProjects/MultiDependentProject/Program.cs
deleted file mode 100644
index 248a4d29f..000000000
--- a/TestAssets/TestProjects/MultiDependentProject/Program.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections;
-using Newtonsoft.Json.Linq;
-using FluentAssertions;
-
-class Program
-{
- public static void Main(string[] args)
- {
- ArrayList argList = new ArrayList(args);
- JObject jObject = new JObject();
-
- foreach (string arg in argList)
- {
- jObject[arg] = arg;
- }
-
- jObject.Count.Should().Be(0);
- Console.WriteLine(jObject.ToString());
- }
-}
diff --git a/TestAssets/TestProjects/NewtonSoftDependentProject/NewtonSoftDependentProject.csproj b/TestAssets/TestProjects/NewtonSoftDependentProject/NewtonSoftDependentProject.csproj
deleted file mode 100644
index 48bba3bea..000000000
--- a/TestAssets/TestProjects/NewtonSoftDependentProject/NewtonSoftDependentProject.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/NewtonSoftDependentProject/Program.cs b/TestAssets/TestProjects/NewtonSoftDependentProject/Program.cs
deleted file mode 100644
index 2debeaadb..000000000
--- a/TestAssets/TestProjects/NewtonSoftDependentProject/Program.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections;
-using Newtonsoft.Json.Linq;
-
-class Program
-{
- public static void Main(string[] args)
- {
- ArrayList argList = new ArrayList(args);
- JObject jObject = new JObject();
-
- foreach (string arg in argList)
- {
- jObject[arg] = arg;
- }
-
- Console.WriteLine(jObject.ToString());
- }
-}
diff --git a/TestAssets/TestProjects/NewtonsoftProfile/NewtonsoftFilterProfile.xml b/TestAssets/TestProjects/NewtonsoftProfile/NewtonsoftFilterProfile.xml
deleted file mode 100644
index 8f5abe95e..000000000
--- a/TestAssets/TestProjects/NewtonsoftProfile/NewtonsoftFilterProfile.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/TestAssets/TestProjects/NewtonsoftProfile/NewtonsoftProfile.xml b/TestAssets/TestProjects/NewtonsoftProfile/NewtonsoftProfile.xml
deleted file mode 100644
index 6cc6c5cdc..000000000
--- a/TestAssets/TestProjects/NewtonsoftProfile/NewtonsoftProfile.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/TestAssets/TestProjects/NuGetConfigDependentProject/NuGetConfigDependentProject.csproj b/TestAssets/TestProjects/NuGetConfigDependentProject/NuGetConfigDependentProject.csproj
deleted file mode 100644
index fd76d5489..000000000
--- a/TestAssets/TestProjects/NuGetConfigDependentProject/NuGetConfigDependentProject.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/NuGetConfigDependentProject/Program.cs b/TestAssets/TestProjects/NuGetConfigDependentProject/Program.cs
deleted file mode 100644
index f6d539fe6..000000000
--- a/TestAssets/TestProjects/NuGetConfigDependentProject/Program.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections;
-using NuGet.Configuration;
-
-class Program
-{
- public static void Main(string[] args)
- {
- var settingValue = new SettingValue("key", "value", false);
-
- Console.WriteLine(settingValue.Key);
- }
-}
diff --git a/TestAssets/TestProjects/NuGetConfigProfile/NuGetConfigFilterProfile.xml b/TestAssets/TestProjects/NuGetConfigProfile/NuGetConfigFilterProfile.xml
deleted file mode 100644
index cb238e3f0..000000000
--- a/TestAssets/TestProjects/NuGetConfigProfile/NuGetConfigFilterProfile.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/TestAssets/TestProjects/NuGetConfigProfile/NuGetConfigProfile.xml b/TestAssets/TestProjects/NuGetConfigProfile/NuGetConfigProfile.xml
deleted file mode 100644
index da70b1394..000000000
--- a/TestAssets/TestProjects/NuGetConfigProfile/NuGetConfigProfile.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/TestAssets/TestProjects/PJAppWithMultipleFrameworks/.noautobuild b/TestAssets/TestProjects/PJAppWithMultipleFrameworks/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/PJAppWithMultipleFrameworks/Program.cs b/TestAssets/TestProjects/PJAppWithMultipleFrameworks/Program.cs
deleted file mode 100644
index 6cf5d8c9e..000000000
--- a/TestAssets/TestProjects/PJAppWithMultipleFrameworks/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/PJAppWithMultipleFrameworks/project.json b/TestAssets/TestProjects/PJAppWithMultipleFrameworks/project.json
deleted file mode 100644
index ebe6ac518..000000000
--- a/TestAssets/TestProjects/PJAppWithMultipleFrameworks/project.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "frameworks": {
- "netcoreapp1.1": {
- "dependencies": {
- "Microsoft.NetCore.App": {
- "version": "1.1.0",
- "type": "platform"
- }
- }
- },
- "net20": {},
- "net35": {},
- "net40": {},
- "net461": {}
- }
-}
diff --git a/TestAssets/TestProjects/Packages/SharedContentA.1.0.0.nupkg b/TestAssets/TestProjects/Packages/SharedContentA.1.0.0.nupkg
deleted file mode 100644
index 22c50bfed..000000000
Binary files a/TestAssets/TestProjects/Packages/SharedContentA.1.0.0.nupkg and /dev/null differ
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferences/SlnFileWithNoProjectReferences.sln b/TestAssets/TestProjects/SlnFileWithNoProjectReferences/SlnFileWithNoProjectReferences.sln
deleted file mode 100644
index 5b61df887..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferences/SlnFileWithNoProjectReferences.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/App.sln b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/App.sln
deleted file mode 100644
index 5b61df887..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/App.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/App.config b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/App.config
deleted file mode 100644
index 88fa4027b..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/CSharpProject.csproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/CSharpProject.csproj
deleted file mode 100644
index 7d36c9d22..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/CSharpProject.csproj
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {AE23AD01-99E0-446F-A5F6-16ADBDD0D1E5}
- Exe
- CSharpProject
- CSharpProject
- v4.5.2
- 512
- true
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/Program.cs b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/Program.cs
deleted file mode 100644
index 6c5339907..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/Program.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CSharpProject
-{
- class Program
- {
- static void Main(string[] args)
- {
- }
- }
-}
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/Properties/AssemblyInfo.cs b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/Properties/AssemblyInfo.cs
deleted file mode 100644
index c008db98b..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndCSharpProject/CSharpProject/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("CSharpProject")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("CSharpProject")]
-[assembly: AssemblyCopyright("Copyright © 2016")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("ae23ad01-99e0-446f-a5f6-16adbdd0d1e5")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/App.sln b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/App.sln
deleted file mode 100644
index 5b61df887..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/App.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/App.config b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/App.config
deleted file mode 100644
index 88fa4027b..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/AssemblyInfo.fs b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/AssemblyInfo.fs
deleted file mode 100644
index d8b2c37d6..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/AssemblyInfo.fs
+++ /dev/null
@@ -1,41 +0,0 @@
-namespace FSharpProject.AssemblyInfo
-
-open System.Reflection
-open System.Runtime.CompilerServices
-open System.Runtime.InteropServices
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-[]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// []
-[]
-[]
-
-do
- ()
\ No newline at end of file
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/FSharpProject.fsproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/FSharpProject.fsproj
deleted file mode 100644
index cad8d59ce..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/FSharpProject.fsproj
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- 2.0
- 52161bb2-18bf-4304-87e7-8d7f0c98ccf3
- Exe
- FSharpProject
- FSharpProject
- v4.5.2
- true
- 4.4.1.0
- FSharpProject
-
-
- true
- full
- false
- false
- bin\$(Configuration)\
- DEBUG;TRACE
- 3
- AnyCPU
- bin\$(Configuration)\$(AssemblyName).XML
- true
-
-
- pdbonly
- true
- true
- bin\$(Configuration)\
- TRACE
- 3
- AnyCPU
- bin\$(Configuration)\$(AssemblyName).XML
- true
-
-
- 11
-
-
-
-
- $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
-
-
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
-
-
-
-
-
- ..\packages\System.ValueTuple.4.0.0-rc3-24212-01\lib\netstandard1.1\System.ValueTuple.dll
-
-
-
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/Program.fs b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/Program.fs
deleted file mode 100644
index 2bcf7f989..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/Program.fs
+++ /dev/null
@@ -1,7 +0,0 @@
-// Learn more about F# at http://fsharp.org
-// See the 'F# Tutorial' project for more help.
-
-[]
-let main argv =
- printfn "%A" argv
- 0 // return an integer exit code
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/packages.config b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/packages.config
deleted file mode 100644
index 2688d2baf..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndFSharpProject/FSharpProject/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProject/App.sln b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProject/App.sln
deleted file mode 100644
index 5b61df887..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProject/App.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProject/UnknownProject/UnknownProject.unknownproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProject/UnknownProject/UnknownProject.unknownproj
deleted file mode 100644
index 8b39c56a6..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProject/UnknownProject/UnknownProject.unknownproj
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/App.sln b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/App.sln
deleted file mode 100644
index 5b61df887..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/App.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/UnknownProject/UnknownProject.unknownproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/UnknownProject/UnknownProject.unknownproj
deleted file mode 100644
index c5e694360..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithMultipleProjectTypeGuids/UnknownProject/UnknownProject.unknownproj
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- {20E2F8CC-55AA-4705-B10F-7ABA6F107ECE};{130159A9-F047-44B3-88CF-0CF7F02ED50F}
-
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/App.sln b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/App.sln
deleted file mode 100644
index 5b61df887..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/App.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/UnknownProject/UnknownProject.unknownproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/UnknownProject/UnknownProject.unknownproj
deleted file mode 100644
index 2615598f1..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndUnknownProjectWithSingleProjectTypeGuid/UnknownProject/UnknownProject.unknownproj
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- {130159A9-F047-44B3-88CF-0CF7F02ED50F}
-
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/App.sln b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/App.sln
deleted file mode 100644
index 5b61df887..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/App.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/App.config b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/App.config
deleted file mode 100644
index 88fa4027b..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/Module1.vb b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/Module1.vb
deleted file mode 100644
index 5d7e3a343..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/Module1.vb
+++ /dev/null
@@ -1,7 +0,0 @@
-Module Module1
-
- Sub Main()
-
- End Sub
-
-End Module
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Application.Designer.vb b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Application.Designer.vb
deleted file mode 100644
index 88dd01c78..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Application.Designer.vb
+++ /dev/null
@@ -1,13 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' This code was generated by a tool.
-' Runtime Version:4.0.30319.42000
-'
-' Changes to this file may cause incorrect behavior and will be lost if
-' the code is regenerated.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Application.myapp b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Application.myapp
deleted file mode 100644
index e62f1a533..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Application.myapp
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- false
- false
- 0
- true
- 0
- 2
- true
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/AssemblyInfo.vb b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/AssemblyInfo.vb
deleted file mode 100644
index e06141688..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/AssemblyInfo.vb
+++ /dev/null
@@ -1,35 +0,0 @@
-Imports System
-Imports System.Reflection
-Imports System.Runtime.InteropServices
-
-' General Information about an assembly is controlled through the following
-' set of attributes. Change these attribute values to modify the information
-' associated with an assembly.
-
-' Review the values of the assembly attributes
-
-
-
-
-
-
-
-
-
-
-'The following GUID is for the ID of the typelib if this project is exposed to COM
-
-
-' Version information for an assembly consists of the following four values:
-'
-' Major Version
-' Minor Version
-' Build Number
-' Revision
-'
-' You can specify all the values or you can default the Build and Revision Numbers
-' by using the '*' as shown below:
-'
-
-
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Resources.Designer.vb b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Resources.Designer.vb
deleted file mode 100644
index 7b5d7f7fb..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Resources.Designer.vb
+++ /dev/null
@@ -1,62 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' This code was generated by a tool.
-' Runtime Version:4.0.30319.42000
-'
-' Changes to this file may cause incorrect behavior and will be lost if
-' the code is regenerated.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My.Resources
-
- 'This class was auto-generated by the StronglyTypedResourceBuilder
- 'class via a tool like ResGen or Visual Studio.
- 'To add or remove a member, edit your .ResX file then rerun ResGen
- 'with the /str option, or rebuild your VS project.
- '''
- ''' A strongly-typed resource class, for looking up localized strings, etc.
- '''
- _
- Friend Module Resources
-
- Private resourceMan As Global.System.Resources.ResourceManager
-
- Private resourceCulture As Global.System.Globalization.CultureInfo
-
- '''
- ''' Returns the cached ResourceManager instance used by this class.
- '''
- _
- Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
- Get
- If Object.ReferenceEquals(resourceMan, Nothing) Then
- Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VBProject.Resources", GetType(Resources).Assembly)
- resourceMan = temp
- End If
- Return resourceMan
- End Get
- End Property
-
- '''
- ''' Overrides the current thread's CurrentUICulture property for all
- ''' resource lookups using this strongly typed resource class.
- '''
- _
- Friend Property Culture() As Global.System.Globalization.CultureInfo
- Get
- Return resourceCulture
- End Get
- Set(ByVal value As Global.System.Globalization.CultureInfo)
- resourceCulture = value
- End Set
- End Property
- End Module
-End Namespace
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Resources.resx b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Resources.resx
deleted file mode 100644
index af7dbebba..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Settings.Designer.vb b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Settings.Designer.vb
deleted file mode 100644
index 40d08710c..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Settings.Designer.vb
+++ /dev/null
@@ -1,73 +0,0 @@
-'------------------------------------------------------------------------------
-'
-' This code was generated by a tool.
-' Runtime Version:4.0.30319.42000
-'
-' Changes to this file may cause incorrect behavior and will be lost if
-' the code is regenerated.
-'
-'------------------------------------------------------------------------------
-
-Option Strict On
-Option Explicit On
-
-
-Namespace My
-
- _
- Partial Friend NotInheritable Class MySettings
- Inherits Global.System.Configuration.ApplicationSettingsBase
-
- Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
-
-#Region "My.Settings Auto-Save Functionality"
-#If _MyType = "WindowsForms" Then
- Private Shared addedHandler As Boolean
-
- Private Shared addedHandlerLockObject As New Object
-
- _
- Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
- If My.Application.SaveMySettingsOnExit Then
- My.Settings.Save()
- End If
- End Sub
-#End If
-#End Region
-
- Public Shared ReadOnly Property [Default]() As MySettings
- Get
-
-#If _MyType = "WindowsForms" Then
- If Not addedHandler Then
- SyncLock addedHandlerLockObject
- If Not addedHandler Then
- AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
- addedHandler = True
- End If
- End SyncLock
- End If
-#End If
- Return defaultInstance
- End Get
- End Property
- End Class
-End Namespace
-
-Namespace My
-
- _
- Friend Module MySettingsProperty
-
- _
- Friend ReadOnly Property Settings() As Global.VBProject.My.MySettings
- Get
- Return Global.VBProject.My.MySettings.Default
- End Get
- End Property
- End Module
-End Namespace
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Settings.settings b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Settings.settings
deleted file mode 100644
index 85b890b3c..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/My Project/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/VBProject.vbproj b/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/VBProject.vbproj
deleted file mode 100644
index e383214a4..000000000
--- a/TestAssets/TestProjects/SlnFileWithNoProjectReferencesAndVBProject/VBProject/VBProject.vbproj
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {399CECC0-BEAD-436F-9D5F-BB50EBD683DF}
- Exe
- VBProject.Module1
- VBProject
- VBProject
- 512
- Console
- v4.5.2
- true
-
-
- AnyCPU
- true
- full
- true
- true
- bin\Debug\
- VBProject.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- AnyCPU
- pdbonly
- false
- true
- true
- bin\Release\
- VBProject.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppSimple/Program.cs b/TestAssets/TestProjects/TestAppSimple/Program.cs
deleted file mode 100644
index 2130cd0a7..000000000
--- a/TestAssets/TestProjects/TestAppSimple/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj b/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj
deleted file mode 100755
index e9f02f323..000000000
--- a/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- netcoreapp2.0
- Exe
-
- true
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/TestAppWithEmptySln/App.sln b/TestAssets/TestProjects/TestAppWithEmptySln/App.sln
deleted file mode 100644
index 8eca25366..000000000
--- a/TestAssets/TestProjects/TestAppWithEmptySln/App.sln
+++ /dev/null
@@ -1,5 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
diff --git a/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj b/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj
deleted file mode 100644
index ce5bf06cb..000000000
--- a/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithEmptySln/App/Program.cs b/TestAssets/TestProjects/TestAppWithEmptySln/App/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithEmptySln/App/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestApp/Program.cs b/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestApp/Program.cs
deleted file mode 100644
index ac3163a58..000000000
--- a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestApp/Program.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Diagnostics;
-
-namespace TestApp
-{
- public class Program
- {
- public static int Main(string[] args)
- {
- Console.WriteLine(TestLibrary.Helper.GetMessage());
- return 100;
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestApp/project.json b/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestApp/project.json
deleted file mode 100644
index a77fe2343..000000000
--- a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestApp/project.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true,
- "preserveCompilationContext": true
- },
- "dependencies": {
- "Microsoft.NETCore.App": "1.1.0"
- },
- "frameworks": {
- "netcoreapp1.1": {
- "dependencies": {
- "TestLibrary": {
- "target": "project",
- "version": "1.0.0-*"
- }
- }
- }
- },
- "runtimes": {
- "win7-x64": {},
- "win7-x86": {},
- "osx.10.10-x64": {},
- "osx.10.11-x64": {},
- "ubuntu.14.04-x64": {},
- "ubuntu.16.04-x64": {},
- "centos.7-x64": {},
- "rhel.7.2-x64": {},
- "debian.8-x64": {},
- "fedora.23-x64": {},
- "opensuse.13.2-x64": {}
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestLibrary/.noautobuild b/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestLibrary/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestLibrary/Helper.cs b/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestLibrary/Helper.cs
deleted file mode 100644
index 8c643796b..000000000
--- a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestLibrary/Helper.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace TestLibrary
-{
- public static class Helper
- {
- ///
- /// Gets the message from the helper. This comment is here to help test XML documentation file generation, please do not remove it.
- ///
- /// A message
- public static string GetMessage()
- {
- return "This string came from the test library!";
- }
-
- public static void SayHi()
- {
- Console.WriteLine("Hello there!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestLibrary/project.json b/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestLibrary/project.json
deleted file mode 100644
index 48bc772d8..000000000
--- a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/TestLibrary/project.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "nowarn": [
- "CS1591"
- ],
- "xmlDoc": true,
- "additionalArguments": [
- "-highentropyva+"
- ]
- },
- "dependencies": {
- "NETStandard.Library": "1.6.0"
- },
- "frameworks": {
- "netstandard1.5": {}
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/global.json b/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/global.json
deleted file mode 100644
index 3a4684c26..000000000
--- a/TestAssets/TestProjects/TestAppWithLibraryUnderTFM/global.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "projects": [ "."]
-}
\ No newline at end of file
diff --git a/TestAssets/TestProjects/TestAppWithMigrateableScripts/.noautobuild b/TestAssets/TestProjects/TestAppWithMigrateableScripts/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/TestAppWithMigrateableScripts/Program.cs b/TestAssets/TestProjects/TestAppWithMigrateableScripts/Program.cs
deleted file mode 100644
index 7bcd4fbd3..000000000
--- a/TestAssets/TestProjects/TestAppWithMigrateableScripts/Program.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Diagnostics;
-
-namespace TestApp
-{
- public class Program
- {
- public static int Main(string[] args)
- {
- Console.WriteLine("Hello World");
- return 0;
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithMigrateableScripts/echoscript b/TestAssets/TestProjects/TestAppWithMigrateableScripts/echoscript
deleted file mode 100755
index 778a035de..000000000
--- a/TestAssets/TestProjects/TestAppWithMigrateableScripts/echoscript
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env sh
-echo $@
\ No newline at end of file
diff --git a/TestAssets/TestProjects/TestAppWithMigrateableScripts/echoscript.cmd b/TestAssets/TestProjects/TestAppWithMigrateableScripts/echoscript.cmd
deleted file mode 100644
index a996a370f..000000000
--- a/TestAssets/TestProjects/TestAppWithMigrateableScripts/echoscript.cmd
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-echo %*
\ No newline at end of file
diff --git a/TestAssets/TestProjects/TestAppWithMigrateableScripts/project.json b/TestAssets/TestProjects/TestAppWithMigrateableScripts/project.json
deleted file mode 100644
index a453cbddb..000000000
--- a/TestAssets/TestProjects/TestAppWithMigrateableScripts/project.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "dependencies": {
- "Microsoft.NETCore.App": {
- "type": "platform",
- "version": "1.1.0"
- }
- },
- "frameworks": {
- "netcoreapp1.1": {}
- },
- "scripts": {
- "prepublish": [
- "./echoscript prepublish_output ?%publish:ProjectPath%? ?%publish:Configuration%? ?%publish:OutputPath%? ?%publish:FullTargetFramework%?"
- ],
- "postpublish": [
- "./echoscript postpublish_output ?%publish:ProjectPath%? ?%publish:Configuration%? ?%publish:OutputPath%? ?%publish:FullTargetFramework%?"
- ],
- "precompile": [
- "./echoscript precompile_output ?%compile:Configuration%? ?%compile:OutputDir%? ?%compile:FullTargetFramework%?"
- ],
- "postcompile": [
- "./echoscript postcompile_output ?%compile:Configuration%? ?%compile:OutputDir%? ?%compile:FullTargetFramework%?"
- ]
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithMultipleFrameworksAndRuntimes/.noautobuild b/TestAssets/TestProjects/TestAppWithMultipleFrameworksAndRuntimes/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/TestAppWithMultipleFrameworksAndRuntimes/Program.cs b/TestAssets/TestProjects/TestAppWithMultipleFrameworksAndRuntimes/Program.cs
deleted file mode 100644
index 1b3eb2ea9..000000000
--- a/TestAssets/TestProjects/TestAppWithMultipleFrameworksAndRuntimes/Program.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Xml;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Hello World!");
-#if NET20 || NET35 || NET45 || NET461
- // Force XmlDocument to be used
- var doc = new XmlDocument();
-#endif
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithMultipleFrameworksAndRuntimes/project.json b/TestAssets/TestProjects/TestAppWithMultipleFrameworksAndRuntimes/project.json
deleted file mode 100644
index 352eedd80..000000000
--- a/TestAssets/TestProjects/TestAppWithMultipleFrameworksAndRuntimes/project.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true
- },
- "dependencies": {},
- "frameworks": {
- "net20": {
- "frameworkAssemblies": {
- "System.Xml": {}
- }
- },
- "net35": {
- "frameworkAssemblies": {
- "System.Xml": {}
- }
- },
- "net40": {
- "frameworkAssemblies": {
- "System.Xml": {}
- }
- },
- "net461": {
- "frameworkAssemblies": {
- "System.Xml": {}
- }
- },
- "netcoreapp1.0": {
- "dependencies": {
- "Microsoft.NetCore.App": "1.0.3"
- }
- }
- },
- "runtimes": {
- "win7-x64": {},
- "win7-x86": {}
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App.sln b/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App.sln
deleted file mode 100644
index 1a6639b73..000000000
--- a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj
deleted file mode 100644
index 7a2163613..000000000
--- a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/Program.cs b/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/Program.cs
deleted file mode 100644
index da2c8fe6e..000000000
--- a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/Program.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello");
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App2.sln b/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App2.sln
deleted file mode 100644
index 1a6639b73..000000000
--- a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App2.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/App.sln
deleted file mode 100644
index c8573d702..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/App.sln
+++ /dev/null
@@ -1,39 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "src\App\App.csproj", "{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{72BFCA87-B033-4721-8712-4D12166B4A39}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x64.ActiveCfg = Debug|x64
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x64.Build.0 = Debug|x64
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x86.ActiveCfg = Debug|x86
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x86.Build.0 = Debug|x86
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|Any CPU.Build.0 = Release|Any CPU
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x64.ActiveCfg = Release|x64
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x64.Build.0 = Release|x64
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x86.ActiveCfg = Release|x86
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A} = {72BFCA87-B033-4721-8712-4D12166B4A39}
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj
deleted file mode 100644
index 3a31eb5bf..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App.sln
deleted file mode 100644
index 1a6639b73..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj
deleted file mode 100644
index ce5bf06cb..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.csproj
deleted file mode 100644
index 92f102c88..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.sln
deleted file mode 100644
index 7bd8cded0..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/src/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/src/Lib/Lib.csproj
deleted file mode 100644
index aacaac752..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/src/Lib/Lib.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- netstandard1.4
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/src/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/src/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/src/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.csproj
deleted file mode 100644
index abea1bc3d..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.sln
deleted file mode 100644
index b00300a34..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.sln
+++ /dev/null
@@ -1,62 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7B86CE74-F620-4B32-99FE-82D40F8D6BF2}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{EAB71280-AF32-4531-8703-43CDBA261AA3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib", "src\Lib\Lib.csproj", "{84A45D44-B677-492D-A6DA-B3A71135AB8E}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NotLastProjInSrc", "NotLastProjInSrc", "{1C5EE322-7073-4298-A077-B7816B1CE15F}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotLastProjInSrc", "src\NotLastProjInSrc\NotLastProjInSrc.csproj", "{96E9FA7D-FE59-4866-AE1E-F9EC2BB2FC67}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|x64.ActiveCfg = Debug|x64
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|x64.Build.0 = Debug|x64
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|x86.ActiveCfg = Debug|x86
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|x86.Build.0 = Debug|x86
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|Any CPU.Build.0 = Release|Any CPU
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|x64.ActiveCfg = Release|x64
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|x64.Build.0 = Release|x64
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|x86.ActiveCfg = Release|x86
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {EAB71280-AF32-4531-8703-43CDBA261AA3} = {7B86CE74-F620-4B32-99FE-82D40F8D6BF2}
- {84A45D44-B677-492D-A6DA-B3A71135AB8E} = {EAB71280-AF32-4531-8703-43CDBA261AA3}
- {1C5EE322-7073-4298-A077-B7816B1CE15F} = {7B86CE74-F620-4B32-99FE-82D40F8D6BF2}
- {96E9FA7D-FE59-4866-AE1E-F9EC2BB2FC67} = {1C5EE322-7073-4298-A077-B7816B1CE15F}
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/src/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/src/Lib/Lib.csproj
deleted file mode 100644
index aacaac752..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/src/Lib/Lib.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- netstandard1.4
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/src/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/src/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/src/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App.sln
deleted file mode 100644
index 1a6639b73..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj
deleted file mode 100644
index ce5bf06cb..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Lib.csproj
deleted file mode 100644
index 4a0fd46d5..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Lib.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- netstandard1.4
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App.sln
deleted file mode 100644
index 6af5ab783..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App.sln
+++ /dev/null
@@ -1,45 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "Lib", "Lib\Lib.csproj", "{21D9159F-60E6-4F65-BC6B-D01B71B15FFC}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Debug|x64.ActiveCfg = Debug|x64
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Debug|x64.Build.0 = Debug|x64
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Debug|x86.ActiveCfg = Debug|x86
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Debug|x86.Build.0 = Debug|x86
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Release|Any CPU.Build.0 = Release|Any CPU
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Release|x64.ActiveCfg = Release|x64
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Release|x64.Build.0 = Release|x64
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Release|x86.ActiveCfg = Release|x86
- {21D9159F-60E6-4F65-BC6B-D01B71B15FFC}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj
deleted file mode 100644
index 7a2163613..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/Program.cs
deleted file mode 100644
index 11f138d4d..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/Program.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App.sln
deleted file mode 100644
index 95e9f988e..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App.sln
+++ /dev/null
@@ -1,38 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib", "Lib\Lib.csproj", "{B38B1FA5-B4C9-456A-8B71-8FCD62ACF400}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib", "Lib\Lib.csproj", "{B38B1FA5-B4C9-456A-8B71-8FCD62ACF400}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj
deleted file mode 100644
index ce5bf06cb..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App.sln
deleted file mode 100644
index dab4a7da7..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App.sln
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib", "Lib\Lib.csproj", "{B38B1FA5-B4C9-456A-8B71-8FCD62ACF400}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/App.csproj
deleted file mode 100644
index 21cce6681..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/App.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App.sln
deleted file mode 100644
index 17cd062c5..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App.sln
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App\App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib", "Lib\\Lib.csproj", "{B38B1FA5-B4C9-456A-8B71-8FCD62ACF400}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj
deleted file mode 100644
index 21cce6681..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.csproj
deleted file mode 100644
index abea1bc3d..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.sln
deleted file mode 100644
index ac77ad340..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.sln
+++ /dev/null
@@ -1,53 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "App", "App.csproj", "{7072A694-548F-4CAE-A58F-12D257D5F486}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7B86CE74-F620-4B32-99FE-82D40F8D6BF2}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{EAB71280-AF32-4531-8703-43CDBA261AA3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib", "src\Lib\Lib.csproj", "{84A45D44-B677-492D-A6DA-B3A71135AB8E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.ActiveCfg = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x64.Build.0 = Debug|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.ActiveCfg = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Debug|x86.Build.0 = Debug|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|Any CPU.Build.0 = Release|Any CPU
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.ActiveCfg = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x64.Build.0 = Release|x64
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.ActiveCfg = Release|x86
- {7072A694-548F-4CAE-A58F-12D257D5F486}.Release|x86.Build.0 = Release|x86
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|x64.ActiveCfg = Debug|x64
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|x64.Build.0 = Debug|x64
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|x86.ActiveCfg = Debug|x86
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Debug|x86.Build.0 = Debug|x86
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|Any CPU.Build.0 = Release|Any CPU
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|x64.ActiveCfg = Release|x64
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|x64.Build.0 = Release|x64
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|x86.ActiveCfg = Release|x86
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {EAB71280-AF32-4531-8703-43CDBA261AA3} = {7B86CE74-F620-4B32-99FE-82D40F8D6BF2}
- {84A45D44-B677-492D-A6DA-B3A71135AB8E} = {EAB71280-AF32-4531-8703-43CDBA261AA3}
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/src/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/src/Lib/Lib.csproj
deleted file mode 100644
index aacaac752..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/src/Lib/Lib.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- netstandard1.4
- {84A45D44-B677-492D-A6DA-B3A71135AB8E}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/src/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/src/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/src/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/App.sln b/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/App.sln
deleted file mode 100644
index 6b63b4437..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/App.sln
+++ /dev/null
@@ -1,39 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26006.2
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "src\App\App.csproj", "{DDF3765C-59FB-4AA6-BE83-779ED13AA64A}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{72BFCA87-B033-4721-8712-4D12166B4A39}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x64.ActiveCfg = Debug|x64
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x64.Build.0 = Debug|x64
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x86.ActiveCfg = Debug|x86
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Debug|x86.Build.0 = Debug|x86
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|Any CPU.Build.0 = Release|Any CPU
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x64.ActiveCfg = Release|x64
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x64.Build.0 = Release|x64
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x86.ActiveCfg = Release|x86
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {DDF3765C-59FB-4AA6-BE83-779ED13AA64A} = {72BFCA87-B033-4721-8712-4D12166B4A39}
- EndGlobalSection
-EndGlobal
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/App.csproj
deleted file mode 100644
index 3a31eb5bf..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/App.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/Program.cs b/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/Program.cs
deleted file mode 100644
index b71a6fdb4..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/Program.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("Hello from the main app");
- Console.WriteLine(Lib.Library.GetMessage());
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/src/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/src/Lib/Lib.csproj
deleted file mode 100644
index 9f8bcbb51..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/src/Lib/Lib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard1.4
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/src/Lib/Library.cs b/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/src/Lib/Library.cs
deleted file mode 100644
index 71a4d4832..000000000
--- a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/src/Lib/Library.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Lib
-{
- public class Library
- {
- public static string GetMessage()
- {
- return "Message from Lib";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectA/.noautobuild b/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectA/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectA/Program.cs b/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectA/Program.cs
deleted file mode 100644
index 9576b17c4..000000000
--- a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectA/Program.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Diagnostics;
-using TestLibrary;
-
-namespace TestApp
-{
- public class Program
- {
- public static int Main(string[] args)
- {
- Console.WriteLine("This string came from ProjectA");
- Console.WriteLine($"{ProjectB.GetMessage()}");
- return 0;
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectA/project.json b/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectA/project.json
deleted file mode 100644
index 1ff04d86a..000000000
--- a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectA/project.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": true,
- "preserveCompilationContext": true
- },
- "dependencies": {
- "ProjectB": "1.0.0-*",
- "Microsoft.NETCore.App": "1.1.0"
- },
- "frameworks": {
- "netcoreapp1.1": {}
- },
- "runtimes": {
- "win7-x64": {},
- "win7-x86": {},
- "osx.10.10-x64": {},
- "osx.10.11-x64": {},
- "ubuntu.14.04-x64": {},
- "ubuntu.16.04-x64": {},
- "centos.7-x64": {},
- "rhel.7.2-x64": {},
- "debian.8-x64": {},
- "fedora.23-x64": {},
- "opensuse.13.2-x64": {}
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectB/.noautobuild b/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectB/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectB/Helper.cs b/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectB/Helper.cs
deleted file mode 100644
index 5a986d891..000000000
--- a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectB/Helper.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace TestLibrary
-{
- public static class ProjectB
- {
- public static string GetMessage()
- {
- return "This string came from ProjectB";
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectB/project.json b/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectB/project.json
deleted file mode 100644
index 48bc772d8..000000000
--- a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/ProjectB/project.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "nowarn": [
- "CS1591"
- ],
- "xmlDoc": true,
- "additionalArguments": [
- "-highentropyva+"
- ]
- },
- "dependencies": {
- "NETStandard.Library": "1.6.0"
- },
- "frameworks": {
- "netstandard1.5": {}
- }
-}
diff --git a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/global.json b/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/global.json
deleted file mode 100644
index 9e26dfeeb..000000000
--- a/TestAssets/TestProjects/TestAppWithUnqualifiedDependencies/global.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/TestAssets/TestProjects/TestLibraryWithConfiguration/.noautobuild b/TestAssets/TestProjects/TestLibraryWithConfiguration/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/TestLibraryWithConfiguration/Helper.cs b/TestAssets/TestProjects/TestLibraryWithConfiguration/Helper.cs
deleted file mode 100644
index 8c643796b..000000000
--- a/TestAssets/TestProjects/TestLibraryWithConfiguration/Helper.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace TestLibrary
-{
- public static class Helper
- {
- ///
- /// Gets the message from the helper. This comment is here to help test XML documentation file generation, please do not remove it.
- ///
- /// A message
- public static string GetMessage()
- {
- return "This string came from the test library!";
- }
-
- public static void SayHi()
- {
- Console.WriteLine("Hello there!");
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestLibraryWithConfiguration/TestLibraryWithConfiguration.csproj b/TestAssets/TestProjects/TestLibraryWithConfiguration/TestLibraryWithConfiguration.csproj
deleted file mode 100755
index 9c427890c..000000000
--- a/TestAssets/TestProjects/TestLibraryWithConfiguration/TestLibraryWithConfiguration.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- netstandard1.5
- $(NoWarn);CS1591
- true
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/.noautobuild b/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/.noautobuild
deleted file mode 100644
index e69de29bb..000000000
diff --git a/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/Program.cs b/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/Program.cs
deleted file mode 100644
index 1b3eb2ea9..000000000
--- a/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/Program.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Xml;
-
-namespace ConsoleApplication
-{
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Hello World!");
-#if NET20 || NET35 || NET45 || NET461
- // Force XmlDocument to be used
- var doc = new XmlDocument();
-#endif
- }
- }
-}
diff --git a/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/project.json b/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/project.json
deleted file mode 100644
index 396636d98..000000000
--- a/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/project.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "version": "1.0.0-*",
- "buildOptions": {
- "emitEntryPoint": false
- },
- "dependencies": {},
- "frameworks": {
- "net20": {
- "frameworkAssemblies": {
- "System.Xml": {}
- }
- },
- "net35": {
- "frameworkAssemblies": {
- "System.Xml": {}
- }
- },
- "net40": {
- "frameworkAssemblies": {
- "System.Xml": {}
- }
- },
- "net461": {
- "frameworkAssemblies": {
- "System.Xml": {}
- }
- },
- "netstandard1.5": {
- "imports": "dnxcore50",
- "dependencies": {
- "NETStandard.Library": "1.6.0"
- }
- }
- }
-}
diff --git a/TestAssets/TestProjects/VBTestApp/Program.vb b/TestAssets/TestProjects/VBTestApp/Program.vb
deleted file mode 100644
index 46283ca23..000000000
--- a/TestAssets/TestProjects/VBTestApp/Program.vb
+++ /dev/null
@@ -1,7 +0,0 @@
-Imports System
-
-Module Program
- Sub Main(args As String())
- Console.WriteLine("Hello World!")
- End Sub
-End Module
diff --git a/TestAssets/TestProjects/VBTestApp/VBTestApp.vbproj b/TestAssets/TestProjects/VBTestApp/VBTestApp.vbproj
deleted file mode 100644
index ce1697ae8..000000000
--- a/TestAssets/TestProjects/VBTestApp/VBTestApp.vbproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- Exe
- netcoreapp2.0
-
-
-
diff --git a/TestAssets/TestProjects/VSTestCore/Tests.cs b/TestAssets/TestProjects/VSTestCore/Tests.cs
deleted file mode 100644
index 1bd3cb13f..000000000
--- a/TestAssets/TestProjects/VSTestCore/Tests.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace TestNamespace
-{
- [TestClass]
- public class VSTestTests
- {
- [TestMethod]
- public void VSTestPassTest()
- {
- }
-
- [TestMethod]
- public void VSTestFailTest()
- {
- Assert.Fail();
- }
- }
-}
diff --git a/TestAssets/TestProjects/VSTestCore/VSTestCore.csproj b/TestAssets/TestProjects/VSTestCore/VSTestCore.csproj
deleted file mode 100644
index 0d07738af..000000000
--- a/TestAssets/TestProjects/VSTestCore/VSTestCore.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/VSTestMulti/Tests.cs b/TestAssets/TestProjects/VSTestMulti/Tests.cs
deleted file mode 100644
index 67b494cd5..000000000
--- a/TestAssets/TestProjects/VSTestMulti/Tests.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace TestNamespace
-{
- [TestClass]
- public class VSTestTests
- {
- [TestMethod]
- public void VSTestPassTest()
- {
- }
-
- [TestMethod]
- public void VSTestFailTest()
- {
- Assert.Fail();
- }
-
-#if DESKTOP
- [TestMethod]
- public void VSTestPassTestDesktop()
- {
- }
-#else
- [TestMethod]
- public void VSTestFailTestNetCoreApp()
- {
- Assert.Fail();
- }
-#endif
- }
-}
diff --git a/TestAssets/TestProjects/VSTestMulti/VSTestDesktopAndNetCore.csproj b/TestAssets/TestProjects/VSTestMulti/VSTestDesktopAndNetCore.csproj
deleted file mode 100644
index 1a8fb8e53..000000000
--- a/TestAssets/TestProjects/VSTestMulti/VSTestDesktopAndNetCore.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- net46;netcoreapp2.0
-
-
-
- DESKTOP;$(DefineConstants)
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/TestAssets/TestProjects/XunitCore/UnitTest1.cs b/TestAssets/TestProjects/XunitCore/UnitTest1.cs
deleted file mode 100644
index 6a8094053..000000000
--- a/TestAssets/TestProjects/XunitCore/UnitTest1.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using Xunit;
-
-namespace TestNamespace
-{
- public class VSTestXunitTests
- {
- [Fact]
- public void VSTestXunitPassTest()
- {
- }
-
- [Fact]
- public void VSTestXunitFailTest()
- {
- Assert.Equal(1, 2);
- }
- }
-}
diff --git a/TestAssets/TestProjects/XunitCore/XunitCore.csproj b/TestAssets/TestProjects/XunitCore/XunitCore.csproj
deleted file mode 100644
index d6016beea..000000000
--- a/TestAssets/TestProjects/XunitCore/XunitCore.csproj
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Exe
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/XunitMulti/UnitTest1.cs b/TestAssets/TestProjects/XunitMulti/UnitTest1.cs
deleted file mode 100644
index f98bf0fe4..000000000
--- a/TestAssets/TestProjects/XunitMulti/UnitTest1.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using Xunit;
-
-namespace TestNamespace
-{
- public class VSTestXunitTests
- {
- [Fact]
- public void VSTestXunitPassTest()
- {
- }
-
- [Fact]
- public void VSTestXunitFailTest()
- {
- Assert.Equal(1, 2);
- }
-
-#if DESKTOP
- [Fact]
- public void VSTestXunitPassTestDesktop()
- {
- }
-#else
- [Fact]
- public void VSTestXunitFailTestNetCoreApp()
- {
- Assert.Equal(1, 2);
- }
-#endif
- }
-}
diff --git a/TestAssets/TestProjects/XunitMulti/VSTestXunitDesktopAndNetCore.csproj b/TestAssets/TestProjects/XunitMulti/VSTestXunitDesktopAndNetCore.csproj
deleted file mode 100644
index 3c971a5e9..000000000
--- a/TestAssets/TestProjects/XunitMulti/VSTestXunitDesktopAndNetCore.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
- net46;netcoreapp2.0
- win7-x86
- win7-x86
-
-
-
- DESKTOP;$(DefineConstants)
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build.proj b/build.proj
index 837cf150e..982770597 100644
--- a/build.proj
+++ b/build.proj
@@ -49,7 +49,7 @@
-
+
diff --git a/build/BranchInfo.props b/build/BranchInfo.props
index 622960a55..739bd41b9 100644
--- a/build/BranchInfo.props
+++ b/build/BranchInfo.props
@@ -1,6 +1,6 @@
- release/2.0.0
- release/2.0.0
+ dev/repo-refactoring
+ dev/repo-refactoring
diff --git a/build/BuildDefaults.props b/build/BuildDefaults.props
index 8561a45b0..399abbf8b 100644
--- a/build/BuildDefaults.props
+++ b/build/BuildDefaults.props
@@ -1,6 +1,6 @@
- Prepare;Compile;Test;Package;Publish
+ Prepare;ComposeSdk;Test;Package;Publish
Debug
true
false
diff --git a/build/BundledSdks.props b/build/BundledSdks.props
deleted file mode 100644
index 77a089668..000000000
--- a/build/BundledSdks.props
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/build/BundledTools.props b/build/BundledTools.props
deleted file mode 100644
index 947148dd5..000000000
--- a/build/BundledTools.props
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build/BundledToolset.props b/build/BundledToolset.props
new file mode 100644
index 000000000..ec75255f6
--- /dev/null
+++ b/build/BundledToolset.props
@@ -0,0 +1,22 @@
+
+
+ $(ArtifactNameSdk)-$(ToolsetVersion)-$(SharedFrameworkRid)$(ArchiveExtension)
+
+
+
+
+ $(DotnetBlobRootUrl)/Sdk/$(ToolsetVersion)/
+ $(ToolsetRootUrl)$(ToolsetCompressedFileName)$(CoreSetupBlobAccessTokenParam)
+ $(IntermediateDirectory)/toolsetDownload/$(ToolsetVersion)/
+ $(ToolsetDownloadDirectory)$(ToolsetCompressedFileName)
+
+
+
+ <_DownloadAndExtractItem Include="ToolsetArchive"
+ Condition="!Exists('$(ToolsetArchive)')">
+ $(ToolsetDownloadUrl)
+ $(ToolsetArchive)
+ $(ToolsetPublishDirectory)
+
+
+
diff --git a/build/Compile.targets b/build/Compile.targets
deleted file mode 100644
index d2a3747aa..000000000
--- a/build/Compile.targets
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/ComposeSdk.targets b/build/ComposeSdk.targets
new file mode 100644
index 000000000..0f47564ea
--- /dev/null
+++ b/build/ComposeSdk.targets
@@ -0,0 +1,115 @@
+
+
+
+
+
+ $(SdkOutputDirectory)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
+ TemplatePackageName=%(BundledTemplate.Identity);
+ TemplatePackageVersion=%(BundledTemplate.Version);
+ PreviousStageDirectory=$(PreviousStageDirectory)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props
index 7dec2bd7e..9d8e3ee7b 100644
--- a/build/DependencyVersions.props
+++ b/build/DependencyVersions.props
@@ -3,35 +3,16 @@
2.0.1
15.4.7
- 2.3.2-beta1-61921-05
- 2.3.0-pre-20170727-1
- 1.6.0-beta2-25304
- 4.2.0-rc-170630-0
- 4.4.1-pre-20170727-1
-
-
- 2.0.1-servicing-20170926-1
- $(CLI_NETSDK_Version)
-
4.4.0-preview3-4475
- 2.0.0-preview3-25514-04
- 2.0.0-rel-20170908-653
- 15.3.0-preview-20170628-02
+
+ 2.0.3-servicing-007004
$(CLI_SharedFrameworkVersion)
$(CLI_SharedFrameworkVersion)
$(CLI_SharedFrameworkVersion)
- 1.0.0-beta2-20170810-304
1.0.0-beta2-20170810-304
1.0.0-beta2-20170810-304
- 2.0.0
- 2.0.0
- 0.1.1-alpha-167
- 1.2.1-alpha-002133
0.2.0
1.0.417
- 0.2.0-beta-000042
notimestamp
@@ -44,6 +25,9 @@
aspnetcore-store
$(AspNetCoreVersion)-$(AspNetCoreRelease)
$(AspNetCoreBranchName)-$(AspNetCoreRuntimePackageTimestamp)
+
+ 0.1.1-alpha-167
+ 2.1.0-preview1-25806-02
diff --git a/build/MSBuildExtensions.props b/build/MSBuildExtensions.props
deleted file mode 100644
index 26f27e8c4..000000000
--- a/build/MSBuildExtensions.props
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- $(RepoRoot)/resources/MSBuildImports
-
-
-
-
-
-
diff --git a/build/MSBuildExtensions.targets b/build/MSBuildExtensions.targets
deleted file mode 100644
index e24b2225b..000000000
--- a/build/MSBuildExtensions.targets
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(MSBuildExtensionsLayoutDirectory)/%(VSMSBuildExtensionsContent.DeploymentSubpath)%(RecursiveDir)%(Filename)%(Extension)
-
-
-
-
-
-
-
-
- Microsoft.NET.Build.Extensions
- 15.0
- $(NuGetPackagesDir)/$(MSBuildExtensionsPackageName.ToLower())/$(CLI_MSBuildExtensions_Version.ToLower())
-
- NETStandard.Library.NETFramework
- $(NuGetPackagesDir)/$(NETStandardLibraryNETFrameworkPackageName.ToLower())/$(CLI_NETStandardLibraryNETFrameworkVersion.ToLower())
-
-
-
-
-
-
-
-
-
-
- CLIBuildDll=$(CLIBuildDll);
- NuGetPackagesDir=$(NuGetPackagesDir);
- DependencyPackageName=%(ExtensionPackageToRestore.Identity);
- DependencyPackageVersion=%(ExtensionPackageToRestore.Version);
- PreviousStageDirectory=$(PreviousStageDirectory)
-
-
-
-
-
-
-
-
-
-
- Microsoft.NETCoreSdk.BundledVersions.props
-
-
-
-
- <_NETStandardLibraryVersions Include="@(PackageDefinitions->'%(Version)')"
- Condition="%(PackageDefinitions.Name) == 'NetStandard.Library'" />
-
-
-
-
-
- <_NETCoreAppPackageVersion>$(CLI_SharedFrameworkVersion)
- <_NETStandardPackageVersion>@(_NETStandardLibraryVersions->Distinct())
-
-
- <_NETCoreAppTargetFrameworkVersion>$(_NETCoreAppPackageVersion.Split('.')[0]).$(_NETCoreAppPackageVersion.Split('.')[1])
- <_NETStandardTargetFrameworkVersion>$(_NETStandardPackageVersion.Split('.')[0]).$(_NETStandardPackageVersion.Split('.')[1])
-
-
-
-
-
- $(_NETCoreAppTargetFrameworkVersion)
- $(_NETCoreAppPackageVersion)
- $(_NETStandardTargetFrameworkVersion)
- $(_NETStandardPackageVersion)
-
-
-]]>
-
-
-
-
-
-
-
diff --git a/build/OutputDirectories.props b/build/OutputDirectories.props
index 3f2121980..2edc9734b 100644
--- a/build/OutputDirectories.props
+++ b/build/OutputDirectories.props
@@ -12,7 +12,8 @@
$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)'))
$(BaseOutputDirectory)/dotnet
$(BaseOutputDirectory)/dotnetWithBackwardsCompatibleRuntimes
- $(OutputDirectory)/sdk/$(SdkVersion)
+
+ $(OutputDirectory)/sdk/$(ToolsetVersion)
$(BaseOutputDirectory)/symbols
$(SdkOutputDirectory)/Roslyn
$(SdkOutputDirectory)/FSharp
@@ -20,6 +21,7 @@
$(BaseOutputDirectory)/intermediate
$(BaseOutputDirectory)/packages
$(IntermediateDirectory)/sharedFrameworkPublish
+ $(IntermediateDirectory)/toolsetPublish
$(BaseOutputDirectory)/AspRT
$(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish
diff --git a/build/Package.targets b/build/Package.targets
index 8896bdb1f..6d324830d 100644
--- a/build/Package.targets
+++ b/build/Package.targets
@@ -2,7 +2,6 @@
-
@@ -16,7 +15,6 @@
DependsOnTargets="BuildDotnetCliBuildFramework;
Init;
Layout;
- GenerateNugetPackages;
GenerateArchives;
GenerateInstallers" />
diff --git a/build/Prepare.targets b/build/Prepare.targets
index 3b373ecfc..df136668e 100644
--- a/build/Prepare.targets
+++ b/build/Prepare.targets
@@ -4,7 +4,7 @@
+ DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;DownloadToolsetArtifacts;RestoreSrcPackages;RestoreToolsPackages;IsolateArtifactsFromDirectoryBuildFiles;CreatePropsForNextStage" />
+
+
+
- $(LayoutDirectory)/$(ArtifactNameSdkDebug)
$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)
- $(LayoutDirectory)/$(ArtifactNameSdkLanguagePack)
- *.resources.dll
- .*.resources.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -70,13 +38,6 @@
$(ArtifactNameSdk)
-
- @(SdkDebugLayoutInput)
- @(SdkDebugRelativeOutputFiles -> '$(SdkDebugLayoutOutputDirectory)/%(Identity)')
- $(ArtifactNameWithVersionSdkDebug)
- $(ArtifactNameSdkDebug)
-
-
@(CombinedHostHostFxrFrameworkSdkInput)
@(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)')
@@ -85,20 +46,6 @@
$(WindowsSatelliteAssembliesRegEx)
$(SatelliteAssemblies)
-
-
- @(SdkLanguagePackInput)
- @(SdkLanguagePackRelativeOutputFiles -> '$(SdkLanguagePackOutputDirectory)/%(Identity)')
- $(ArtifactNameWithVersionSdkLanguagePack)
- $(ArtifactNameSdkLanguagePack)
-
-
-
-
-
- @(CombinedMSBuildExtensionsInput)
- @(CombinedMSBuildExtensionsRelativeOutputFiles -> '$(MSBuildExtensionsOutputDirectory)/%(Identity)')
-
diff --git a/build/package/Nupkg.targets b/build/package/Nupkg.targets
deleted file mode 100644
index d7287c8b7..000000000
--- a/build/package/Nupkg.targets
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- $(CompilationDirectory)/forPackaging
-
-
-
-
-
- Microsoft.DotNet.Cli.Utils
- $(SdkNugetVersion)
-
-
- Microsoft.DotNet.MSBuildSdkResolver
- $(SdkNugetVersion)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/sdks/sdks.csproj b/build/sdks/sdks.csproj
deleted file mode 100755
index f246e1f9d..000000000
--- a/build/sdks/sdks.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Library
- netcoreapp1.0
- false
-
-
-
-
-
-
-
-
-
diff --git a/build/test/TestPackageProjects.targets b/build/test/TestPackageProjects.targets
index fea46690c..c77244ad5 100644
--- a/build/test/TestPackageProjects.targets
+++ b/build/test/TestPackageProjects.targets
@@ -20,55 +20,6 @@
-
- Microsoft.DotNet.Cli.Utils
- Microsoft.DotNet.Cli.Utils.csproj
- True
- True
- $(CliVersionPrefix)
- $(VersionSuffix)
- False
-
-
- Microsoft.DotNet.Cli.Utils
- Microsoft.DotNet.Cli.Utils.csproj
- True
- True
- $(CliVersionPrefix)
- $(VersionSuffix)
- False
- /p:TargetFramework=netstandard1.5
-
-
- Microsoft.DotNet.InternalAbstractions
- Microsoft.DotNet.InternalAbstractions.csproj
- True
- True
- 2.0.0
- $(VersionSuffix)
- False
-
-
- PackageWithFakeNativeDep
- PackageWithFakeNativeDep.csproj
- False
- True
- 1.0.0
-
- True
-
-
- dotnet-dependency-context-test
- dotnet-dependency-context-test.csproj
- True
- True
- $(CliVersionPrefix)
- $(VersionSuffix)
- True
-
dotnet-dependency-tool-invoker
dotnet-dependency-tool-invoker.csproj
@@ -78,54 +29,6 @@
$(VersionSuffix)
True
-
- dotnet-desktop-and-portable
- dotnet-desktop-and-portable.csproj
- True
- True
- $(CliVersionPrefix)
- $(VersionSuffix)
- True
-
-
- dotnet-desktop-binding-redirects
- dotnet-desktop-binding-redirects.csproj
- True
- True
- $(DesktopAvailable)
- $(CliVersionPrefix)
- $(VersionSuffix)
- True
-
-
- dotnet-hello
- dotnet-hello.csproj
- True
- True
- 1.0.0
-
- True
-
-
- dotnet-hello
- dotnet-hello.csproj
- True
- True
- 2.0.0
-
- True
-
-
- dotnet-outputsframeworkversion-netcoreapp1.0
- dotnet-outputsframeworkversion-netcoreapp1.0.csproj
- True
- True
- 1.0.0
-
- True
-
dotnet-portable
dotnet-portable.csproj
@@ -135,33 +38,6 @@
True
-
- dotnet-portable
- dotnet-portable-v1.csproj
- True
- True
- 1.0.0
-
- True
-
-
- dotnet-portable
- dotnet-portable-v1-prefercli.csproj
- True
- True
- 1.0.0
-
- True
-
-
- dotnet-fallbackfoldertool
- dotnet-fallbackfoldertool.csproj
- True
- True
- 1.0.0
-
- True
-
dotnet-prefercliruntime
dotnet-prefercliruntime.csproj
@@ -171,16 +47,6 @@
True
-
- dotnet-tool-with-output-name
- ToolWithOutputName.csproj
- ToolWithOutputName
- True
- True
- 1.0.0
-
- True
-
$(RepoRoot)%(Identity)/
diff --git a/build/test/TestProjects.targets b/build/test/TestProjects.targets
index 20045c923..7af148240 100644
--- a/build/test/TestProjects.targets
+++ b/build/test/TestProjects.targets
@@ -6,20 +6,9 @@
-
-
-
-
-
+ Include="test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj;
+ test/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj" />
diff --git a/global.json b/global.json
deleted file mode 100644
index 79c8d8d60..000000000
--- a/global.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "projects": [ "src", "test", "tools", "build_projects" ]
-}
diff --git a/resources/MSBuild.exe.config b/resources/MSBuild.exe.config
deleted file mode 100644
index 76d340ed2..000000000
--- a/resources/MSBuild.exe.config
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/MSBuildImports/15.0/Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets b/resources/MSBuildImports/15.0/Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets
deleted file mode 100644
index 0b4916558..000000000
--- a/resources/MSBuildImports/15.0/Microsoft.Common.CrossTargeting.targets/ImportAfter/Microsoft.TestPlatform.CrossTargeting.targets
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\Microsoft.TestPlatform.Build.dll
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
-
-
-
-
-
-
- <_TargetFramework Include="$(TargetFrameworks)" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VSTest
-
-
-
diff --git a/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets b/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets
deleted file mode 100644
index 433922aac..000000000
--- a/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- $(MSBuildExtensionsPath)\NuGet.targets
-
-
-
diff --git a/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.TestPlatform.ImportAfter.targets b/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.TestPlatform.ImportAfter.targets
deleted file mode 100644
index d1572027e..000000000
--- a/resources/MSBuildImports/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.TestPlatform.ImportAfter.targets
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- $(MSBuildExtensionsPath)\Microsoft.TestPlatform.targets
-
-
-
diff --git a/resources/MSBuildImports/15.0/SolutionFile/ImportAfter/Microsoft.NuGet.ImportAfter.targets b/resources/MSBuildImports/15.0/SolutionFile/ImportAfter/Microsoft.NuGet.ImportAfter.targets
deleted file mode 100644
index 433922aac..000000000
--- a/resources/MSBuildImports/15.0/SolutionFile/ImportAfter/Microsoft.NuGet.ImportAfter.targets
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- $(MSBuildExtensionsPath)\NuGet.targets
-
-
-
diff --git a/run-build.ps1 b/run-build.ps1
index 6acbb15ce..f3eba115e 100644
--- a/run-build.ps1
+++ b/run-build.ps1
@@ -66,7 +66,8 @@ $env:VSTEST_BUILD_TRACE=1
$env:VSTEST_TRACE_BUILD=1
# install a stage0
-$dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1"
+$dotnetInstallPath = Join-Path $RepoRoot "bin\dotnet-install.ps1"
+Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "$dotnetInstallPath"
Write-Output "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
Invoke-Expression "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
diff --git a/run-build.sh b/run-build.sh
index 0dce787e9..4e480e4ce 100755
--- a/run-build.sh
+++ b/run-build.sh
@@ -150,7 +150,7 @@ export VSTEST_TRACE_BUILD=1
export DOTNET_MULTILEVEL_LOOKUP=0
# Install a stage 0
-(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS)
+curl -sSL "https://dot.net/v1/dotnet-install.sh" | bash /dev/stdin --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS
EXIT_CODE=$?
if [ $EXIT_CODE != 0 ]; then
diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1
deleted file mode 100644
index 89e6e74d8..000000000
--- a/scripts/obtain/dotnet-install.ps1
+++ /dev/null
@@ -1,510 +0,0 @@
-#
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#
-
-<#
-.SYNOPSIS
- Installs dotnet cli
-.DESCRIPTION
- Installs dotnet cli. If dotnet installation already exists in the given directory
- it will update it only if the requested version differs from the one already installed.
-.PARAMETER Channel
- Default: LTS
- Download from the Channel specified. Possible values:
- - Current - most current release
- - LTS - most current supported release
- - 2-part version in a format A.B - represents a specific release
- examples: 2.0; 1.0
- - Branch name
- examples: release/2.0.0; Master
-.PARAMETER Version
- Default: latest
- Represents a build version on specific channel. Possible values:
- - latest - most latest build on specific channel
- - coherent - most latest coherent build on specific channel
- coherent applies only to SDK downloads
- - 3-part version in a format A.B.C - represents specific version of build
- examples: 2.0.0-preview2-006120; 1.1.0
-.PARAMETER InstallDir
- Default: %LocalAppData%\Microsoft\dotnet
- Path to where to install dotnet. Note that binaries will be placed directly in a given directory.
-.PARAMETER Architecture
- Default: - this value represents currently running OS architecture
- Architecture of dotnet binaries to be installed.
- Possible values are: , x64 and x86
-.PARAMETER SharedRuntime
- Default: false
- Installs just the shared runtime bits, not the entire SDK
-.PARAMETER DryRun
- If set it will not perform installation but instead display what command line to use to consistently install
- currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link
- with specific version so that this command can be used deterministicly in a build script.
- It also displays binaries location if you prefer to install or download it yourself.
-.PARAMETER NoPath
- By default this script will set environment variable PATH for the current process to the binaries folder inside installation folder.
- If set it will display binaries location but not set any environment variable.
-.PARAMETER Verbose
- Displays diagnostics information.
-.PARAMETER AzureFeed
- Default: https://dotnetcli.azureedge.net/dotnet
- This parameter typically is not changed by the user.
- It allows to change URL for the Azure feed used by this installer.
-.PARAMETER UncachedFeed
- This parameter typically is not changed by the user.
- It allows to change URL for the Uncached feed used by this installer.
-.PARAMETER ProxyAddress
- If set, the installer will use the proxy when making web requests
-.PARAMETER ProxyUseDefaultCredentials
- Default: false
- Use default credentials, when using proxy address.
-.PARAMETER SkipNonVersionedFiles
- Default: false
- Skips installing non-versioned files if they already exist, such as dotnet.exe.
-#>
-[cmdletbinding()]
-param(
- [string]$Channel="LTS",
- [string]$Version="Latest",
- [string]$InstallDir="",
- [string]$Architecture="",
- [switch]$SharedRuntime,
- [switch]$DryRun,
- [switch]$NoPath,
- [string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet",
- [string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet",
- [string]$ProxyAddress,
- [switch]$ProxyUseDefaultCredentials,
- [switch]$SkipNonVersionedFiles
-)
-
-Set-StrictMode -Version Latest
-$ErrorActionPreference="Stop"
-$ProgressPreference="SilentlyContinue"
-
-$BinFolderRelativePath=""
-
-# example path with regex: shared/1.0.0-beta-12345/somepath
-$VersionRegEx="/\d+\.\d+[^/]+/"
-$OverrideNonVersionedFiles = !$SkipNonVersionedFiles
-
-function Say($str) {
- Write-Host "dotnet-install: $str"
-}
-
-function Say-Verbose($str) {
- Write-Verbose "dotnet-install: $str"
-}
-
-function Say-Invocation($Invocation) {
- $command = $Invocation.MyCommand;
- $args = (($Invocation.BoundParameters.Keys | foreach { "-$_ `"$($Invocation.BoundParameters[$_])`"" }) -join " ")
- Say-Verbose "$command $args"
-}
-
-function Invoke-With-Retry([ScriptBlock]$ScriptBlock, [int]$MaxAttempts = 3, [int]$SecondsBetweenAttempts = 1) {
- $Attempts = 0
-
- while ($true) {
- try {
- return $ScriptBlock.Invoke()
- }
- catch {
- $Attempts++
- if ($Attempts -lt $MaxAttempts) {
- Start-Sleep $SecondsBetweenAttempts
- }
- else {
- throw
- }
- }
- }
-}
-
-function Get-Machine-Architecture() {
- Say-Invocation $MyInvocation
-
- # possible values: AMD64, IA64, x86
- return $ENV:PROCESSOR_ARCHITECTURE
-}
-
-# TODO: Architecture and CLIArchitecture should be unified
-function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
- Say-Invocation $MyInvocation
-
- switch ($Architecture.ToLower()) {
- { $_ -eq "" } { return Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) }
- { ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" }
- { $_ -eq "x86" } { return "x86" }
- default { throw "Architecture not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues" }
- }
-}
-
-function Get-Version-Info-From-Version-Text([string]$VersionText) {
- Say-Invocation $MyInvocation
-
- $Data = @($VersionText.Split([char[]]@(), [StringSplitOptions]::RemoveEmptyEntries));
-
- $VersionInfo = @{}
- $VersionInfo.CommitHash = $Data[0].Trim()
- $VersionInfo.Version = $Data[1].Trim()
- return $VersionInfo
-}
-
-function Load-Assembly([string] $Assembly) {
- try {
- Add-Type -Assembly $Assembly | Out-Null
- }
- catch {
- # On Nano Server, Powershell Core Edition is used. Add-Type is unable to resolve base class assemblies because they are not GAC'd.
- # Loading the base class assemblies is not unnecessary as the types will automatically get resolved.
- }
-}
-
-function GetHTTPResponse([Uri] $Uri)
-{
- Invoke-With-Retry(
- {
-
- $HttpClient = $null
-
- try {
- # HttpClient is used vs Invoke-WebRequest in order to support Nano Server which doesn't support the Invoke-WebRequest cmdlet.
- Load-Assembly -Assembly System.Net.Http
-
- if(-not $ProxyAddress) {
- try {
- # Despite no proxy being explicitly specified, we may still be behind a default proxy
- $DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
- if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) {
- $ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
- $ProxyUseDefaultCredentials = $true
- }
- } catch {
- # Eat the exception and move forward as the above code is an attempt
- # at resolving the DefaultProxy that may not have been a problem.
- $ProxyAddress = $null
- Say-Verbose("Exception ignored: $_.Exception.Message - moving forward...")
- }
- }
-
- if($ProxyAddress) {
- $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler
- $HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{Address=$ProxyAddress;UseDefaultCredentials=$ProxyUseDefaultCredentials}
- $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler
- }
- else {
- $HttpClient = New-Object System.Net.Http.HttpClient
- }
- # Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out
- # 10 minutes allows it to work over much slower connections.
- $HttpClient.Timeout = New-TimeSpan -Minutes 10
- $Response = $HttpClient.GetAsync($Uri).Result
- if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode))) {
- $ErrorMsg = "Failed to download $Uri."
- if ($Response -ne $null) {
- $ErrorMsg += " $Response"
- }
-
- throw $ErrorMsg
- }
-
- return $Response
- }
- finally {
- if ($HttpClient -ne $null) {
- $HttpClient.Dispose()
- }
- }
- })
-}
-
-
-function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Coherent) {
- Say-Invocation $MyInvocation
-
- $VersionFileUrl = $null
- if ($SharedRuntime) {
- $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
- }
- else {
- if ($Coherent) {
- $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
- }
- else {
- $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
- }
- }
-
- $Response = GetHTTPResponse -Uri $VersionFileUrl
- $StringContent = $Response.Content.ReadAsStringAsync().Result
-
- switch ($Response.Content.Headers.ContentType) {
- { ($_ -eq "application/octet-stream") } { $VersionText = $StringContent }
- { ($_ -eq "text/plain") } { $VersionText = $StringContent }
- { ($_ -eq "text/plain; charset=UTF-8") } { $VersionText = $StringContent }
- default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." }
- }
-
- $VersionInfo = Get-Version-Info-From-Version-Text $VersionText
-
- return $VersionInfo
-}
-
-
-function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, [string]$Version) {
- Say-Invocation $MyInvocation
-
- switch ($Version.ToLower()) {
- { $_ -eq "latest" } {
- $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $False
- return $LatestVersionInfo.Version
- }
- { $_ -eq "coherent" } {
- $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $True
- return $LatestVersionInfo.Version
- }
- default { return $Version }
- }
-}
-
-function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) {
- Say-Invocation $MyInvocation
-
- if ($SharedRuntime) {
- $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
- }
- else {
- $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip"
- }
-
- Say-Verbose "Constructed primary payload URL: $PayloadURL"
-
- return $PayloadURL
-}
-
-function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) {
- Say-Invocation $MyInvocation
-
- if ($SharedRuntime) {
- $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip"
- }
- else {
- $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-dev-win-$CLIArchitecture.$SpecificVersion.zip"
- }
-
- Say-Verbose "Constructed legacy payload URL: $PayloadURL"
-
- return $PayloadURL
-}
-
-function Get-User-Share-Path() {
- Say-Invocation $MyInvocation
-
- $InstallRoot = $env:DOTNET_INSTALL_DIR
- if (!$InstallRoot) {
- $InstallRoot = "$env:LocalAppData\Microsoft\dotnet"
- }
- return $InstallRoot
-}
-
-function Resolve-Installation-Path([string]$InstallDir) {
- Say-Invocation $MyInvocation
-
- if ($InstallDir -eq "") {
- return Get-User-Share-Path
- }
- return $InstallDir
-}
-
-function Get-Version-Info-From-Version-File([string]$InstallRoot, [string]$RelativePathToVersionFile) {
- Say-Invocation $MyInvocation
-
- $VersionFile = Join-Path -Path $InstallRoot -ChildPath $RelativePathToVersionFile
- Say-Verbose "Local version file: $VersionFile"
-
- if (Test-Path $VersionFile) {
- $VersionText = cat $VersionFile
- Say-Verbose "Local version file text: $VersionText"
- return Get-Version-Info-From-Version-Text $VersionText
- }
-
- Say-Verbose "Local version file not found."
-
- return $null
-}
-
-function Is-Dotnet-Package-Installed([string]$InstallRoot, [string]$RelativePathToPackage, [string]$SpecificVersion) {
- Say-Invocation $MyInvocation
-
- $DotnetPackagePath = Join-Path -Path $InstallRoot -ChildPath $RelativePathToPackage | Join-Path -ChildPath $SpecificVersion
- Say-Verbose "Is-Dotnet-Package-Installed: Path to a package: $DotnetPackagePath"
- return Test-Path $DotnetPackagePath -PathType Container
-}
-
-function Get-Absolute-Path([string]$RelativeOrAbsolutePath) {
- # Too much spam
- # Say-Invocation $MyInvocation
-
- return $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($RelativeOrAbsolutePath)
-}
-
-function Get-Path-Prefix-With-Version($path) {
- $match = [regex]::match($path, $VersionRegEx)
- if ($match.Success) {
- return $entry.FullName.Substring(0, $match.Index + $match.Length)
- }
-
- return $null
-}
-
-function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([System.IO.Compression.ZipArchive]$Zip, [string]$OutPath) {
- Say-Invocation $MyInvocation
-
- $ret = @()
- foreach ($entry in $Zip.Entries) {
- $dir = Get-Path-Prefix-With-Version $entry.FullName
- if ($dir -ne $null) {
- $path = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $dir)
- if (-Not (Test-Path $path -PathType Container)) {
- $ret += $dir
- }
- }
- }
-
- $ret = $ret | Sort-Object | Get-Unique
-
- $values = ($ret | foreach { "$_" }) -join ";"
- Say-Verbose "Directories to unpack: $values"
-
- return $ret
-}
-
-# Example zip content and extraction algorithm:
-# Rule: files if extracted are always being extracted to the same relative path locally
-# .\
-# a.exe # file does not exist locally, extract
-# b.dll # file exists locally, override only if $OverrideFiles set
-# aaa\ # same rules as for files
-# ...
-# abc\1.0.0\ # directory contains version and exists locally
-# ... # do not extract content under versioned part
-# abc\asd\ # same rules as for files
-# ...
-# def\ghi\1.0.1\ # directory contains version and does not exist locally
-# ... # extract content
-function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
- Say-Invocation $MyInvocation
-
- Load-Assembly -Assembly System.IO.Compression.FileSystem
- Set-Variable -Name Zip
- try {
- $Zip = [System.IO.Compression.ZipFile]::OpenRead($ZipPath)
-
- $DirectoriesToUnpack = Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package -Zip $Zip -OutPath $OutPath
-
- foreach ($entry in $Zip.Entries) {
- $PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName
- if (($PathWithVersion -eq $null) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
- $DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName)
- $DestinationDir = Split-Path -Parent $DestinationPath
- $OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath))
- if ((-Not $DestinationPath.EndsWith("\")) -And $OverrideFiles) {
- New-Item -ItemType Directory -Force -Path $DestinationDir | Out-Null
- [System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $DestinationPath, $OverrideNonVersionedFiles)
- }
- }
- }
- }
- finally {
- if ($Zip -ne $null) {
- $Zip.Dispose()
- }
- }
-}
-
-function DownloadFile([Uri]$Uri, [string]$OutPath) {
- $Stream = $null
-
- try {
- $Response = GetHTTPResponse -Uri $Uri
- $Stream = $Response.Content.ReadAsStreamAsync().Result
- $File = [System.IO.File]::Create($OutPath)
- $Stream.CopyTo($File)
- $File.Close()
- }
- finally {
- if ($Stream -ne $null) {
- $Stream.Dispose()
- }
- }
-}
-
-function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolderRelativePath) {
- $BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath)
- if (-Not $NoPath) {
- Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process."
- $env:path = "$BinPath;" + $env:path
- }
- else {
- Say "Binaries of dotnet can be found in $BinPath"
- }
-}
-
-$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
-$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version
-$DownloadLink = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
-$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
-
-if ($DryRun) {
- Say "Payload URLs:"
- Say "Primary - $DownloadLink"
- Say "Legacy - $LegacyDownloadLink"
- Say "Repeatable invocation: .\$($MyInvocation.Line)"
- exit 0
-}
-
-$InstallRoot = Resolve-Installation-Path $InstallDir
-Say-Verbose "InstallRoot: $InstallRoot"
-
-$IsSdkInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage "sdk" -SpecificVersion $SpecificVersion
-Say-Verbose ".NET SDK installed? $IsSdkInstalled"
-if ($IsSdkInstalled) {
- Say ".NET SDK version $SpecificVersion is already installed."
- Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
- exit 0
-}
-
-New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
-
-$installDrive = $((Get-Item $InstallRoot).PSDrive.Name);
-$free = Get-CimInstance -Class win32_logicaldisk | where Deviceid -eq "${installDrive}:"
-if ($free.Freespace / 1MB -le 100 ) {
- Say "There is not enough disk space on drive ${installDrive}:"
- exit 0
-}
-
-$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
-Say-Verbose "Zip path: $ZipPath"
-Say "Downloading link: $DownloadLink"
-try {
- DownloadFile -Uri $DownloadLink -OutPath $ZipPath
-}
-catch {
- Say "Cannot download: $DownloadLink"
- $DownloadLink = $LegacyDownloadLink
- $ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
- Say-Verbose "Legacy zip path: $ZipPath"
- Say "Downloading legacy link: $DownloadLink"
- DownloadFile -Uri $DownloadLink -OutPath $ZipPath
-}
-
-Say "Extracting zip from $DownloadLink"
-Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
-
-Remove-Item $ZipPath
-
-Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
-
-Say "Installation finished"
-exit 0
diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh
deleted file mode 100755
index a3a7b6ed8..000000000
--- a/scripts/obtain/dotnet-install.sh
+++ /dev/null
@@ -1,848 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#
-
-# Stop script on NZEC
-set -e
-# Stop script if unbound variable found (use ${var:-} if intentional)
-set -u
-# By default cmd1 | cmd2 returns exit code of cmd2 regardless of cmd1 success
-# This is causing it to fail
-set -o pipefail
-
-# Use in the the functions: eval $invocation
-invocation='say_verbose "Calling: ${yellow:-}${FUNCNAME[0]} ${green:-}$*${normal:-}"'
-
-# standard output may be used as a return value in the functions
-# we need a way to write text on the screen in the functions so that
-# it won't interfere with the return value.
-# Exposing stream 3 as a pipe to standard output of the script itself
-exec 3>&1
-
-# Setup some colors to use. These need to work in fairly limited shells, like the Ubuntu Docker container where there are only 8 colors.
-# See if stdout is a terminal
-if [ -t 1 ]; then
- # see if it supports colors
- ncolors=$(tput colors)
- if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then
- bold="$(tput bold || echo)"
- normal="$(tput sgr0 || echo)"
- black="$(tput setaf 0 || echo)"
- red="$(tput setaf 1 || echo)"
- green="$(tput setaf 2 || echo)"
- yellow="$(tput setaf 3 || echo)"
- blue="$(tput setaf 4 || echo)"
- magenta="$(tput setaf 5 || echo)"
- cyan="$(tput setaf 6 || echo)"
- white="$(tput setaf 7 || echo)"
- fi
-fi
-
-say_err() {
- printf "%b\n" "${red:-}dotnet_install: Error: $1${normal:-}" >&2
-}
-
-say() {
- # using stream 3 (defined in the beginning) to not interfere with stdout of functions
- # which may be used as return value
- printf "%b\n" "${cyan:-}dotnet-install:${normal:-} $1" >&3
-}
-
-say_verbose() {
- if [ "$verbose" = true ]; then
- say "$1"
- fi
-}
-
-# This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets,
-# then and only then should the Linux distribution appear in this list.
-# Adding a Linux distribution to this list does not imply distribution-specific support.
-get_os_download_name_from_platform() {
- eval $invocation
-
- platform="$1"
- case "$platform" in
- "centos.7")
- echo "centos"
- return 0
- ;;
- "debian.8")
- echo "debian"
- return 0
- ;;
- "fedora.23")
- echo "fedora.23"
- return 0
- ;;
- "fedora.24")
- echo "fedora.24"
- return 0
- ;;
- "opensuse.13.2")
- echo "opensuse.13.2"
- return 0
- ;;
- "opensuse.42.1")
- echo "opensuse.42.1"
- return 0
- ;;
- "rhel.6"*)
- echo "rhel.6"
- return 0
- ;;
- "rhel.7"*)
- echo "rhel"
- return 0
- ;;
- "ubuntu.14.04")
- echo "ubuntu"
- return 0
- ;;
- "ubuntu.16.04")
- echo "ubuntu.16.04"
- return 0
- ;;
- "ubuntu.16.10")
- echo "ubuntu.16.10"
- return 0
- ;;
- "alpine.3.4.3")
- echo "alpine"
- return 0
- ;;
- esac
- return 1
-}
-
-get_current_os_name() {
- eval $invocation
-
- local uname=$(uname)
- if [ "$uname" = "Darwin" ]; then
- echo "osx"
- return 0
- elif [ "$uname" = "Linux" ]; then
- local distro_specific_osname
- distro_specific_osname=$(get_distro_specific_os_name) || return 1
-
- if [ "$distro_specific_osname" = "rhel.6" ]; then
- echo $distro_specific_osname
- return 0
- else
- echo "linux"
- return 0
- fi
- fi
-
- say_err "OS name could not be detected: $ID.$VERSION_ID"
- return 1
-}
-
-get_distro_specific_os_name() {
- eval $invocation
-
- local uname=$(uname)
- if [ "$uname" = "Darwin" ]; then
- echo "osx"
- return 0
- elif [ -n "$runtime_id" ]; then
- echo $(get_os_download_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}")
- return 0
- else
- if [ -e /etc/os-release ]; then
- . /etc/os-release
- os=$(get_os_download_name_from_platform "$ID.$VERSION_ID" || echo "")
- if [ -n "$os" ]; then
- echo "$os"
- return 0
- fi
- elif [ -e /etc/redhat-release ]; then
- local redhatRelease=$( /dev/null 2>&1
- return $?
-}
-
-
-check_min_reqs() {
- local hasMinimum=false
- if machine_has "curl"; then
- hasMinimum=true
- elif machine_has "wget"; then
- hasMinimum=true
- fi
-
- if [ "$hasMinimum" = "false" ]; then
- say_err "curl (recommended) or wget are required to download dotnet. Install missing prerequisite to proceed."
- return 1
- fi
- return 0
-}
-
-check_pre_reqs() {
- eval $invocation
-
- local failing=false;
-
- if [ "${DOTNET_INSTALL_SKIP_PREREQS:-}" = "1" ]; then
- return 0
- fi
-
- if [ "$(uname)" = "Linux" ]; then
- if ! [ -x "$(command -v ldconfig)" ]; then
- echo "ldconfig is not in PATH, trying /sbin/ldconfig."
- LDCONFIG_COMMAND="/sbin/ldconfig"
- else
- LDCONFIG_COMMAND="ldconfig"
- fi
-
- local librarypath=${LD_LIBRARY_PATH:-}
- LDCONFIG_COMMAND="$LDCONFIG_COMMAND -NXv ${librarypath//:/ }"
-
- [ -z "$($LDCONFIG_COMMAND | grep libunwind)" ] && say_err "Unable to locate libunwind. Install libunwind to continue" && failing=true
- [ -z "$($LDCONFIG_COMMAND | grep libssl)" ] && say_err "Unable to locate libssl. Install libssl to continue" && failing=true
- [ -z "$($LDCONFIG_COMMAND | grep libicu)" ] && say_err "Unable to locate libicu. Install libicu to continue" && failing=true
- [ -z "$($LDCONFIG_COMMAND | grep -F libcurl.so)" ] && say_err "Unable to locate libcurl. Install libcurl to continue" && failing=true
- fi
-
- if [ "$failing" = true ]; then
- return 1
- fi
-
- return 0
-}
-
-# args:
-# input - $1
-to_lowercase() {
- #eval $invocation
-
- echo "$1" | tr '[:upper:]' '[:lower:]'
- return 0
-}
-
-# args:
-# input - $1
-remove_trailing_slash() {
- #eval $invocation
-
- local input=${1:-}
- echo "${input%/}"
- return 0
-}
-
-# args:
-# input - $1
-remove_beginning_slash() {
- #eval $invocation
-
- local input=${1:-}
- echo "${input#/}"
- return 0
-}
-
-# args:
-# root_path - $1
-# child_path - $2 - this parameter can be empty
-combine_paths() {
- eval $invocation
-
- # TODO: Consider making it work with any number of paths. For now:
- if [ ! -z "${3:-}" ]; then
- say_err "combine_paths: Function takes two parameters."
- return 1
- fi
-
- local root_path=$(remove_trailing_slash $1)
- local child_path=$(remove_beginning_slash ${2:-})
- say_verbose "combine_paths: root_path=$root_path"
- say_verbose "combine_paths: child_path=$child_path"
- echo "$root_path/$child_path"
- return 0
-}
-
-get_machine_architecture() {
- eval $invocation
-
- # Currently the only one supported
- echo "x64"
- return 0
-}
-
-# args:
-# architecture - $1
-get_normalized_architecture_from_architecture() {
- eval $invocation
-
- local architecture=$(to_lowercase $1)
- case $architecture in
- \)
- echo "$(get_normalized_architecture_from_architecture $(get_machine_architecture))"
- return 0
- ;;
- amd64|x64)
- echo "x64"
- return 0
- ;;
- x86)
- say_err "Architecture \`x86\` currently not supported"
- return 1
- ;;
- esac
-
- say_err "Architecture \`$architecture\` not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues"
- return 1
-}
-
-# version_info is a conceptual two line string representing commit hash and 4-part version
-# format:
-# Line 1: # commit_hash
-# Line 2: # 4-part version
-
-# args:
-# version_text - stdin
-get_version_from_version_info() {
- eval $invocation
-
- cat | tail -n 1 | sed 's/\r$//'
- return 0
-}
-
-# args:
-# version_text - stdin
-get_commit_hash_from_version_info() {
- eval $invocation
-
- cat | head -n 1 | sed 's/\r$//'
- return 0
-}
-
-# args:
-# install_root - $1
-# relative_path_to_package - $2
-# specific_version - $3
-is_dotnet_package_installed() {
- eval $invocation
-
- local install_root=$1
- local relative_path_to_package=$2
- local specific_version=${3//[$'\t\r\n']}
-
- local dotnet_package_path=$(combine_paths $(combine_paths $install_root $relative_path_to_package) $specific_version)
- say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path"
-
- if [ -d "$dotnet_package_path" ]; then
- return 0
- else
- return 1
- fi
-}
-
-# args:
-# azure_feed - $1
-# channel - $2
-# normalized_architecture - $3
-# coherent - $4
-get_latest_version_info() {
- eval $invocation
-
- local azure_feed=$1
- local channel=$2
- local normalized_architecture=$3
- local coherent=$4
-
- local version_file_url=null
- if [ "$shared_runtime" = true ]; then
- version_file_url="$uncached_feed/Runtime/$channel/latest.version"
- else
- if [ "$coherent" = true ]; then
- version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version"
- else
- version_file_url="$uncached_feed/Sdk/$channel/latest.version"
- fi
- fi
- say_verbose "get_latest_version_info: latest url: $version_file_url"
-
- download $version_file_url
- return $?
-}
-
-# args:
-# azure_feed - $1
-# channel - $2
-# normalized_architecture - $3
-# version - $4
-get_specific_version_from_version() {
- eval $invocation
-
- local azure_feed=$1
- local channel=$2
- local normalized_architecture=$3
- local version=$(to_lowercase $4)
-
- case $version in
- latest)
- local version_info
- version_info="$(get_latest_version_info $azure_feed $channel $normalized_architecture false)" || return 1
- say_verbose "get_specific_version_from_version: version_info=$version_info"
- echo "$version_info" | get_version_from_version_info
- return 0
- ;;
- coherent)
- local version_info
- version_info="$(get_latest_version_info $azure_feed $channel $normalized_architecture true)" || return 1
- say_verbose "get_specific_version_from_version: version_info=$version_info"
- echo "$version_info" | get_version_from_version_info
- return 0
- ;;
- *)
- echo $version
- return 0
- ;;
- esac
-}
-
-# args:
-# azure_feed - $1
-# channel - $2
-# normalized_architecture - $3
-# specific_version - $4
-construct_download_link() {
- eval $invocation
-
- local azure_feed=$1
- local channel=$2
- local normalized_architecture=$3
- local specific_version=${4//[$'\t\r\n']}
-
- local osname
- osname=$(get_current_os_name) || return 1
-
- local download_link=null
- if [ "$shared_runtime" = true ]; then
- download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz"
- else
- download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_version-$osname-$normalized_architecture.tar.gz"
- fi
-
- echo "$download_link"
- return 0
-}
-
-# args:
-# azure_feed - $1
-# channel - $2
-# normalized_architecture - $3
-# specific_version - $4
-construct_legacy_download_link() {
- eval $invocation
-
- local azure_feed=$1
- local channel=$2
- local normalized_architecture=$3
- local specific_version=${4//[$'\t\r\n']}
-
- local distro_specific_osname
- distro_specific_osname=$(get_distro_specific_os_name) || return 1
-
- local legacy_download_link=null
- if [ "$shared_runtime" = true ]; then
- legacy_download_link="$azure_feed/Runtime/$specific_version/dotnet-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz"
- else
- legacy_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz"
- fi
-
- echo "$legacy_download_link"
- return 0
-}
-
-get_user_install_path() {
- eval $invocation
-
- if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then
- echo $DOTNET_INSTALL_DIR
- else
- echo "$HOME/.dotnet"
- fi
- return 0
-}
-
-# args:
-# install_dir - $1
-resolve_installation_path() {
- eval $invocation
-
- local install_dir=$1
- if [ "$install_dir" = "" ]; then
- local user_install_path=$(get_user_install_path)
- say_verbose "resolve_installation_path: user_install_path=$user_install_path"
- echo "$user_install_path"
- return 0
- fi
-
- echo "$install_dir"
- return 0
-}
-
-# args:
-# install_root - $1
-get_installed_version_info() {
- eval $invocation
-
- local install_root=$1
- local version_file=$(combine_paths "$install_root" "$local_version_file_relative_path")
- say_verbose "Local version file: $version_file"
- if [ ! -z "$version_file" ] | [ -r "$version_file" ]; then
- local version_info="$(cat $version_file)"
- echo "$version_info"
- return 0
- fi
-
- say_verbose "Local version file not found."
- return 0
-}
-
-# args:
-# relative_or_absolute_path - $1
-get_absolute_path() {
- eval $invocation
-
- local relative_or_absolute_path=$1
- echo $(cd $(dirname "$1") && pwd -P)/$(basename "$1")
- return 0
-}
-
-# args:
-# input_files - stdin
-# root_path - $1
-# out_path - $2
-# override - $3
-copy_files_or_dirs_from_list() {
- eval $invocation
-
- local root_path=$(remove_trailing_slash $1)
- local out_path=$(remove_trailing_slash $2)
- local override=$3
- local override_switch=$(if [ "$override" = false ]; then printf -- "-n"; fi)
-
- cat | uniq | while read -r file_path; do
- local path=$(remove_beginning_slash ${file_path#$root_path})
- local target=$out_path/$path
- if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then
- mkdir -p $out_path/$(dirname $path)
- cp -R $override_switch $root_path/$path $target
- fi
- done
-}
-
-# args:
-# zip_path - $1
-# out_path - $2
-extract_dotnet_package() {
- eval $invocation
-
- local zip_path=$1
- local out_path=$2
-
- local temp_out_path=$(mktemp -d $temporary_file_template)
-
- local failed=false
- tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true
-
- local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
- find $temp_out_path -type f | grep -Eo $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path false
- find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path $override_non_versioned_files
-
- rm -rf $temp_out_path
-
- if [ "$failed" = true ]; then
- say_err "Extraction failed"
- return 1
- fi
-}
-
-# args:
-# remote_path - $1
-# [out_path] - $2 - stdout if not provided
-download() {
- eval $invocation
-
- local remote_path=$1
- local out_path=${2:-}
-
- local failed=false
- if machine_has "curl"; then
- downloadcurl $remote_path $out_path || failed=true
- elif machine_has "wget"; then
- downloadwget $remote_path $out_path || failed=true
- else
- failed=true
- fi
- if [ "$failed" = true ]; then
- say_verbose "Download failed: $remote_path"
- return 1
- fi
- return 0
-}
-
-downloadcurl() {
- eval $invocation
- local remote_path=$1
- local out_path=${2:-}
-
- local failed=false
- if [ -z "$out_path" ]; then
- curl --retry 10 -sSL -f --create-dirs $remote_path || failed=true
- else
- curl --retry 10 -sSL -f --create-dirs -o $out_path $remote_path || failed=true
- fi
- if [ "$failed" = true ]; then
- say_verbose "Curl download failed"
- return 1
- fi
- return 0
-}
-
-downloadwget() {
- eval $invocation
- local remote_path=$1
- local out_path=${2:-}
-
- local failed=false
- if [ -z "$out_path" ]; then
- wget -q --tries 10 -O - $remote_path || failed=true
- else
- wget -v --tries 10 -O $out_path $remote_path || failed=true
- fi
- if [ "$failed" = true ]; then
- say_verbose "Wget download failed"
- return 1
- fi
- return 0
-}
-
-calculate_vars() {
- eval $invocation
- valid_legacy_download_link=true
-
- normalized_architecture=$(get_normalized_architecture_from_architecture "$architecture")
- say_verbose "normalized_architecture=$normalized_architecture"
-
- specific_version=$(get_specific_version_from_version $azure_feed $channel $normalized_architecture $version)
- say_verbose "specific_version=$specific_version"
- if [ -z "$specific_version" ]; then
- say_err "Could not get version information."
- return 1
- fi
-
- download_link=$(construct_download_link $azure_feed $channel $normalized_architecture $specific_version)
- say_verbose "download_link=$download_link"
-
- legacy_download_link=$(construct_legacy_download_link $azure_feed $channel $normalized_architecture $specific_version) || valid_legacy_download_link=false
-
- if [ "$valid_legacy_download_link" = true ]; then
- say_verbose "legacy_download_link=$legacy_download_link"
- else
- say_verbose "Cound not construct a legacy_download_link; omitting..."
- fi
-
- install_root=$(resolve_installation_path $install_dir)
- say_verbose "install_root=$install_root"
-}
-
-install_dotnet() {
- eval $invocation
- local download_failed=false
-
- if is_dotnet_package_installed $install_root "sdk" $specific_version; then
- say ".NET SDK version $specific_version is already installed."
- return 0
- fi
-
- mkdir -p $install_root
- zip_path=$(mktemp $temporary_file_template)
- say_verbose "Zip path: $zip_path"
-
- say "Downloading link: $download_link"
- # Failures are normal in the non-legacy case for ultimately legacy downloads.
- # Do not output to stderr, since output to stderr is considered an error.
- download "$download_link" $zip_path 2>&1 || download_failed=true
-
- # if the download fails, download the legacy_download_link
- if [ "$download_failed" = true ] && [ "$valid_legacy_download_link" = true ]; then
- say "Cannot download: $download_link"
- download_link=$legacy_download_link
- zip_path=$(mktemp $temporary_file_template)
- say_verbose "Legacy zip path: $zip_path"
- say "Downloading legacy link: $download_link"
- download "$download_link" $zip_path
- fi
-
- say "Extracting zip from $download_link"
- extract_dotnet_package $zip_path $install_root
-
- return 0
-}
-
-local_version_file_relative_path="/.version"
-bin_folder_relative_path=""
-temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX"
-
-channel="LTS"
-version="Latest"
-install_dir=""
-architecture=""
-dry_run=false
-no_path=false
-azure_feed="https://dotnetcli.azureedge.net/dotnet"
-uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet"
-verbose=false
-shared_runtime=false
-runtime_id=""
-override_non_versioned_files=true
-
-while [ $# -ne 0 ]
-do
- name=$1
- case $name in
- -c|--channel|-[Cc]hannel)
- shift
- channel=$1
- ;;
- -v|--version|-[Vv]ersion)
- shift
- version="$1"
- ;;
- -i|--install-dir|-[Ii]nstall[Dd]ir)
- shift
- install_dir="$1"
- ;;
- --arch|--architecture|-[Aa]rch|-[Aa]rchitecture)
- shift
- architecture="$1"
- ;;
- --shared-runtime|-[Ss]hared[Rr]untime)
- shared_runtime=true
- ;;
- --dry-run|-[Dd]ry[Rr]un)
- dry_run=true
- ;;
- --no-path|-[Nn]o[Pp]ath)
- no_path=true
- ;;
- --verbose|-[Vv]erbose)
- verbose=true
- ;;
- --azure-feed|-[Aa]zure[Ff]eed)
- shift
- azure_feed="$1"
- ;;
- --uncached-feed|-[Uu]ncached[Ff]eed)
- shift
- uncached_feed="$1"
- ;;
- --runtime-id|-[Rr]untime[Ii]d)
- shift
- runtime_id="$1"
- ;;
- --skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles)
- shift
- override_non_versioned_files=false
- ;;
- -?|--?|-h|--help|-[Hh]elp)
- script_name="$(basename $0)"
- echo ".NET Tools Installer"
- echo "Usage: $script_name [-c|--channel ] [-v|--version ] [-p|--prefix ]"
- echo " $script_name -h|-?|--help"
- echo ""
- echo "$script_name is a simple command line interface for obtaining dotnet cli."
- echo ""
- echo "Options:"
- echo " -c,--channel Download from the CHANNEL specified, Defaults to \`$channel\`."
- echo " -Channel"
- echo " Possible values:"
- echo " - Current - most current release"
- echo " - LTS - most current supported release"
- echo " - 2-part version in a format A.B - represents a specific release"
- echo " examples: 2.0; 1.0"
- echo " - Branch name"
- echo " examples: release/2.0.0; Master"
- echo " -v,--version Use specific VERSION, Defaults to \`$version\`."
- echo " -Version"
- echo " Possible values:"
- echo " - latest - most latest build on specific channel"
- echo " - coherent - most latest coherent build on specific channel"
- echo " coherent applies only to SDK downloads"
- echo " - 3-part version in a format A.B.C - represents specific version of build"
- echo " examples: 2.0.0-preview2-006120; 1.1.0"
- echo " -i,--install-dir Install under specified location (see Install Location below)"
- echo " -InstallDir"
- echo " --architecture Architecture of .NET Tools. Currently only x64 is supported."
- echo " --arch,-Architecture,-Arch"
- echo " --shared-runtime Installs just the shared runtime bits, not the entire SDK."
- echo " -SharedRuntime"
- echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
- echo " -SkipNonVersionedFiles"
- echo " --dry-run,-DryRun Do not perform installation. Display download link."
- echo " --no-path, -NoPath Do not set PATH for the current process."
- echo " --verbose,-Verbose Display diagnostics information."
- echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed, This parameter typically is not changed by the user."
- echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user."
- echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
- echo " -RuntimeId"
- echo " -?,--?,-h,--help,-Help Shows this help message"
- echo ""
- echo "Install Location:"
- echo " Location is chosen in following order:"
- echo " - --install-dir option"
- echo " - Environmental variable DOTNET_INSTALL_DIR"
- echo " - $HOME/.dotnet"
- exit 0
- ;;
- *)
- say_err "Unknown argument \`$name\`"
- exit 1
- ;;
- esac
-
- shift
-done
-
-check_min_reqs
-calculate_vars
-
-if [ "$dry_run" = true ]; then
- say "Payload URL: $download_link"
- if [ "$valid_legacy_download_link" = true ]; then
- say "Legacy payload URL: $legacy_download_link"
- fi
- say "Repeatable invocation: ./$(basename $0) --version $specific_version --channel $channel --install-dir $install_dir"
- exit 0
-fi
-
-check_pre_reqs
-install_dotnet
-
-bin_path=$(get_absolute_path $(combine_paths $install_root $bin_folder_relative_path))
-if [ "$no_path" = false ]; then
- say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script."
- export PATH=$bin_path:$PATH
-else
- say "Binaries of dotnet can be found in $bin_path"
-fi
-
-say "Installation finished successfully."
diff --git a/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh b/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh
deleted file mode 100755
index a62ce9ed4..000000000
--- a/scripts/obtain/uninstall/dotnet-uninstall-debian-packages.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#
-
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-current_userid=$(id -u)
-if [ $current_userid -ne 0 ]; then
- echo "$(basename "$0") uninstallation script requires superuser privileges to run"
- exit 1
-fi
-
-host_package_name="dotnet-host"
-aspnetcore_package_store_package_name="^aspnetcore-store.*"
-
-remove_all(){
- apt-get purge -y $aspnetcore_package_store_package_name
- apt-get purge -y $host_package_name
-}
-
-is_dotnet_host_installed(){
- local out="$(dpkg -l | grep $host_package_name)"
- [ -z "$out" ]
-}
-
-is_dotnet_host_installed
-[ "$?" -eq 0 ] && echo "Unable to find dotnet installation to remove." >&2 \
- && exit 0
-
-remove_all
-[ "$?" -ne 0 ] && echo "Failed to remove dotnet packages." >&2 && exit 1
-
-is_dotnet_host_installed
-[ "$?" -ne 0 ] && \
- echo "dotnet package removal succeeded but appear to still be installed. Please file an issue at https://github.com/dotnet/cli" >&2 && \
- exit 1
-
-echo "dotnet package removal succeeded." >&2
-exit 0
diff --git a/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh b/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh
deleted file mode 100755
index 31a5d8e99..000000000
--- a/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#
-
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-current_userid=$(id -u)
-if [ $current_userid -ne 0 ]; then
- echo "$(basename "$0") uninstallation script requires superuser privileges to run" >&2
- exit 1
-fi
-
-# this is the common suffix for all the dotnet pkgs
-dotnet_pkg_name_suffix="com.microsoft.dotnet"
-dotnet_install_root="/usr/local/share/dotnet"
-dotnet_path_file="/etc/paths.d/dotnet"
-
-remove_dotnet_pkgs(){
- installed_pkgs=($(pkgutil --pkgs | grep $dotnet_pkg_name_suffix))
-
- for i in "${installed_pkgs[@]}"
- do
- echo "Removing dotnet component - \"$i\"" >&2
- pkgutil --force --forget "$i"
- done
-}
-
-remove_dotnet_pkgs
-[ "$?" -ne 0 ] && echo "Failed to remove dotnet packages." >&2 && exit 1
-
-echo "Deleting install root - $dotnet_install_root" >&2
-rm -rf "$dotnet_install_root"
-rm -f "$dotnet_path_file"
-
-echo "dotnet packages removal succeeded." >&2
-exit 0
diff --git a/scripts/obtain/uninstall/dotnet-uninstall-rpm-packages.sh b/scripts/obtain/uninstall/dotnet-uninstall-rpm-packages.sh
deleted file mode 100755
index ef7be91af..000000000
--- a/scripts/obtain/uninstall/dotnet-uninstall-rpm-packages.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) .NET Foundation and contributors. All rights reserved.
-# Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#
-
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-current_userid=$(id -u)
-if [ $current_userid -ne 0 ]; then
- echo "$(basename "$0") uninstallation script requires superuser privileges to run"
- exit 1
-fi
-
-host_package_name="dotnet-host"
-aspnetcore_package_store_package_name="aspnetcore-store*"
-
-remove_all(){
- yum remove -y $host_package_name
- yum remove -y $aspnetcore_package_store_package_name
-}
-
-is_dotnet_host_installed(){
- local out="$(yum list installed | grep $host_package_name)"
- [ -z "$out" ]
-}
-
-is_dotnet_host_installed
-[ "$?" -eq 0 ] && echo "Unable to find dotnet installation to remove." >&2 \
- && exit 0
-
-remove_all
-[ "$?" -ne 0 ] && echo "Failed to remove dotnet packages." >&2 && exit 1
-
-is_dotnet_host_installed
-[ "$?" -ne 0 ] && \
- echo "dotnet package removal succeeded but appear to still be installed. Please file an issue at https://github.com/dotnet/cli" >&2 && \
- exit 1
-
-echo "dotnet package removal succeeded." >&2
-exit 0
diff --git a/scripts/register-completions.bash b/scripts/register-completions.bash
deleted file mode 100644
index b4753def3..000000000
--- a/scripts/register-completions.bash
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-# bash parameter completion for the dotnet CLI
-
-_dotnet_bash_complete()
-{
- local word=${COMP_WORDS[COMP_CWORD]}
- local dotnetPath=${COMP_WORDS[1]}
-
- local completions=("$(dotnet complete --position ${COMP_POINT} "${COMP_LINE}")")
-
- COMPREPLY=( $(compgen -W "$completions" -- "$word") )
-}
-
-complete -f -F _dotnet_bash_complete dotnet
\ No newline at end of file
diff --git a/scripts/register-completions.ps1 b/scripts/register-completions.ps1
deleted file mode 100644
index 88c416cd8..000000000
--- a/scripts/register-completions.ps1
+++ /dev/null
@@ -1,7 +0,0 @@
-# PowerShell parameter completion shim for the dotnet CLI
-Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock {
- param($commandName, $wordToComplete, $cursorPosition)
- dotnet complete --position $cursorPosition "$wordToComplete" | ForEach-Object {
- [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
- }
- }
\ No newline at end of file
diff --git a/scripts/register-completions.zsh b/scripts/register-completions.zsh
deleted file mode 100644
index 9f290bc68..000000000
--- a/scripts/register-completions.zsh
+++ /dev/null
@@ -1,12 +0,0 @@
-# zsh parameter completion for the dotnet CLI
-
-_dotnet_zsh_complete()
-{
- local dotnetPath=$words[1]
-
- local completions=("$(dotnet complete "$words")")
-
- reply=( "${(ps:\n:)completions}" )
-}
-
-compctl -K _dotnet_zsh_complete dotnet
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/CompressionUtility.cs b/src/Microsoft.DotNet.Archive/CompressionUtility.cs
deleted file mode 100644
index 285799116..000000000
--- a/src/Microsoft.DotNet.Archive/CompressionUtility.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using SevenZip;
-using System;
-using System.IO;
-
-namespace Microsoft.DotNet.Archive
-{
- internal static class CompressionUtility
- {
- enum MeasureBy
- {
- Input,
- Output
- }
-
- private class LzmaProgress : ICodeProgress
- {
- private IProgress progress;
- private long totalSize;
- private string phase;
- private MeasureBy measureBy;
-
- public LzmaProgress(IProgress progress, string phase, long totalSize, MeasureBy measureBy)
- {
- this.progress = progress;
- this.totalSize = totalSize;
- this.phase = phase;
- this.measureBy = measureBy;
- }
-
- public void SetProgress(long inSize, long outSize)
- {
- progress.Report(phase, measureBy == MeasureBy.Input ? inSize : outSize, totalSize);
- }
- }
-
- public static void Compress(Stream inStream, Stream outStream, IProgress progress)
- {
- SevenZip.Compression.LZMA.Encoder encoder = new SevenZip.Compression.LZMA.Encoder();
-
- CoderPropID[] propIDs =
- {
- CoderPropID.DictionarySize,
- CoderPropID.PosStateBits,
- CoderPropID.LitContextBits,
- CoderPropID.LitPosBits,
- CoderPropID.Algorithm,
- CoderPropID.NumFastBytes,
- CoderPropID.MatchFinder,
- CoderPropID.EndMarker
- };
- object[] properties =
- {
- (Int32)(1 << 26),
- (Int32)(1),
- (Int32)(8),
- (Int32)(0),
- (Int32)(2),
- (Int32)(96),
- "bt4",
- false
- };
-
- encoder.SetCoderProperties(propIDs, properties);
- encoder.WriteCoderProperties(outStream);
-
- Int64 inSize = inStream.Length;
- for (int i = 0; i < 8; i++)
- {
- outStream.WriteByte((Byte)(inSize >> (8 * i)));
- }
-
- var lzmaProgress = new LzmaProgress(progress, "Compressing", inSize, MeasureBy.Input);
- lzmaProgress.SetProgress(0, 0);
- encoder.Code(inStream, outStream, -1, -1, lzmaProgress);
- lzmaProgress.SetProgress(inSize, outStream.Length);
- }
-
- public static void Decompress(Stream inStream, Stream outStream, IProgress progress)
- {
- byte[] properties = new byte[5];
-
- if (inStream.Read(properties, 0, 5) != 5)
- throw (new Exception("input .lzma is too short"));
-
- SevenZip.Compression.LZMA.Decoder decoder = new SevenZip.Compression.LZMA.Decoder();
- decoder.SetDecoderProperties(properties);
-
- long outSize = 0;
- for (int i = 0; i < 8; i++)
- {
- int v = inStream.ReadByte();
- if (v < 0)
- throw (new Exception("Can't Read 1"));
- outSize |= ((long)(byte)v) << (8 * i);
- }
-
- long compressedSize = inStream.Length - inStream.Position;
- var lzmaProgress = new LzmaProgress(progress, LocalizableStrings.Decompressing, outSize, MeasureBy.Output);
- lzmaProgress.SetProgress(0, 0);
- decoder.Code(inStream, outStream, compressedSize, outSize, lzmaProgress);
- lzmaProgress.SetProgress(inStream.Length, outSize);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/ConsoleProgressReport.cs b/src/Microsoft.DotNet.Archive/ConsoleProgressReport.cs
deleted file mode 100644
index e8f6cd0df..000000000
--- a/src/Microsoft.DotNet.Archive/ConsoleProgressReport.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Diagnostics;
-
-namespace Microsoft.DotNet.Archive
-{
- public class ConsoleProgressReport : IProgress
- {
- private string _currentPhase;
- private int _lastLineLength = 0;
- private double _lastProgress = -1;
- private Stopwatch _stopwatch;
- private object _stateLock = new object();
-
- public void Report(ProgressReport value)
- {
- long progress = (long)(100 * ((double)value.Ticks / value.Total));
-
- if (progress == _lastProgress && value.Phase == _currentPhase)
- {
- return;
- }
- _lastProgress = progress;
-
- lock (_stateLock)
- {
- string line = $"{value.Phase} {progress}%";
- if (value.Phase == _currentPhase)
- {
- if (Console.IsOutputRedirected)
- {
- Console.Write($"...{progress}%");
- }
- else
- {
- Console.Write(new string('\b', _lastLineLength));
- Console.Write(line);
- }
-
- _lastLineLength = line.Length;
-
- if (progress == 100)
- {
- Console.WriteLine($" {_stopwatch.ElapsedMilliseconds} ms");
- }
- }
- else
- {
- Console.Write(line);
- _currentPhase = value.Phase;
- _lastLineLength = line.Length;
- _stopwatch = Stopwatch.StartNew();
- }
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/IndexedArchive.cs b/src/Microsoft.DotNet.Archive/IndexedArchive.cs
deleted file mode 100644
index fb0ef22f6..000000000
--- a/src/Microsoft.DotNet.Archive/IndexedArchive.cs
+++ /dev/null
@@ -1,538 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.IO.Compression;
-using System.Linq;
-using System.Security.Cryptography;
-using System.Text;
-using System.Threading;
-
-namespace Microsoft.DotNet.Archive
-{
- public class IndexedArchive : IDisposable
- {
- private class DestinationFileInfo
- {
- public DestinationFileInfo(string destinationPath, string hash)
- {
- DestinationPath = destinationPath;
- Hash = hash;
- }
-
- public string DestinationPath { get; }
- public string Hash { get; }
- }
-
- private class ArchiveSource
- {
- public ArchiveSource(string sourceArchive, string sourceFile, string archivePath, string hash, long size)
- {
- SourceArchive = sourceArchive;
- SourceFile = sourceFile;
- ArchivePath = archivePath;
- Hash = hash;
- Size = size;
- }
-
- public string SourceArchive { get; set; }
- public string SourceFile { get; set; }
- public string ArchivePath { get; }
- public string Hash { get; }
- public string FileName { get { return Path.GetFileNameWithoutExtension(ArchivePath); } }
- public string Extension { get { return Path.GetExtension(ArchivePath); } }
- public long Size { get; }
-
- public void CopyTo(Stream destination)
- {
- if (!String.IsNullOrEmpty(SourceArchive))
- {
- using (var zip = new ZipArchive(File.OpenRead(SourceArchive), ZipArchiveMode.Read))
- using (var sourceStream = zip.GetEntry(SourceFile)?.Open())
- {
- if (sourceStream == null)
- {
- throw new Exception($"Couldn't find entry {SourceFile} in archive {SourceArchive}");
- }
-
- sourceStream.CopyTo(destination);
- }
- }
- else
- {
- using (var sourceStream = File.OpenRead(SourceFile))
- {
- sourceStream.CopyTo(destination);
- }
- }
- }
- }
-
- static string[] ZipExtensions = new[] { ".zip", ".nupkg" };
- static string IndexFileName = "index.txt";
-
- // maps file hash to archve path
- // $ prefix indicates that the file is not in the archive and path is a hash
- private Dictionary _archiveFiles = new Dictionary();
- // maps file hash to external path
- private Dictionary _externalFiles = new Dictionary();
- // lists all extracted files & hashes
- private List _destFiles = new List();
- private bool _disposed = false;
- private ThreadLocal _sha = new ThreadLocal(() => SHA256.Create());
-
- public IndexedArchive()
- { }
-
- private static Stream CreateTemporaryStream()
- {
- string temp = Path.GetTempPath();
- string tempFile = Path.Combine(temp, Guid.NewGuid().ToString());
- return File.Create(tempFile, 4096, FileOptions.DeleteOnClose);
- }
-
- private static FileStream CreateTemporaryFileStream()
- {
- string temp = Path.GetTempPath();
- string tempFile = Path.Combine(temp, Guid.NewGuid().ToString());
- return new FileStream(tempFile, FileMode.Create, FileAccess.ReadWrite, FileShare.Read | FileShare.Delete, 4096, FileOptions.DeleteOnClose);
- }
-
- public void Save(string archivePath, IProgress progress)
- {
- CheckDisposed();
-
- using (var archiveStream = CreateTemporaryStream())
- {
- using (var archive = new ZipArchive(archiveStream, ZipArchiveMode.Create, true))
- {
- BuildArchive(archive, progress);
- } // close archive
-
- archiveStream.Seek(0, SeekOrigin.Begin);
-
- using (var lzmaStream = File.Create(archivePath))
- {
- CompressionUtility.Compress(archiveStream, lzmaStream, progress);
- }
- } // close archiveStream
- }
-
- private void BuildArchive(ZipArchive archive, IProgress progress)
- {
- // write the file index
- var indexEntry = archive.CreateEntry(IndexFileName, CompressionLevel.NoCompression);
-
- using (var stream = indexEntry.Open())
- using (var textWriter = new StreamWriter(stream))
- {
- foreach (var entry in _destFiles)
- {
- var archiveFile = _archiveFiles[entry.Hash];
- string archivePath = _archiveFiles[entry.Hash].ArchivePath;
- if (archiveFile.SourceFile == null)
- {
- archivePath = "$" + archivePath;
- }
-
- textWriter.WriteLine($"{entry.DestinationPath}|{archivePath}");
- }
- }
-
- // sort the files so that similar files are close together
- var filesToArchive = _archiveFiles.Values.ToList();
- filesToArchive.Sort((f1, f2) =>
- {
- // first sort by extension
- var comp = String.Compare(f1.Extension, f2.Extension, StringComparison.OrdinalIgnoreCase);
-
- if (comp == 0)
- {
- // then sort by filename
- comp = String.Compare(f1.FileName, f2.FileName, StringComparison.OrdinalIgnoreCase);
- }
-
- if (comp == 0)
- {
- // sort by file size (helps differentiate ref/lib/facade)
- comp = f1.Size.CompareTo(f2.Size);
- }
-
- if (comp == 0)
- {
- // finally sort by full archive path so we have stable output
- comp = String.Compare(f1.ArchivePath, f2.ArchivePath, StringComparison.OrdinalIgnoreCase);
- }
-
- return comp;
- });
-
- int filesAdded = 0;
- // add all the files
- foreach (var fileToArchive in filesToArchive)
- {
- var entry = archive.CreateEntry(fileToArchive.ArchivePath, CompressionLevel.NoCompression);
- using (var entryStream = entry.Open())
- {
- fileToArchive.CopyTo(entryStream);
- }
-
- progress.Report("Archiving files", ++filesAdded, filesToArchive.Count);
- }
- }
-
- private abstract class ExtractOperation
- {
- public ExtractOperation(string destinationPath)
- {
- DestinationPath = destinationPath;
- }
-
- public string DestinationPath { get; }
- public virtual void DoOperation()
- {
- string directory = Path.GetDirectoryName(DestinationPath);
-
- if (!Directory.Exists(directory))
- {
- Directory.CreateDirectory(directory);
- }
-
- Execute();
- }
- protected abstract void Execute();
- }
-
- private class CopyOperation : ExtractOperation
- {
- public CopyOperation(ExtractSource source, string destinationPath) : base(destinationPath)
- {
- Source = source;
- }
- public ExtractSource Source { get; }
- protected override void Execute()
- {
- if (Source.LocalPath != null)
- {
- File.Copy(Source.LocalPath, DestinationPath, true);
- }
- else
- {
- using (var destinationStream = File.Create(DestinationPath))
- {
- Source.CopyToStream(destinationStream);
- }
- }
- }
- }
-
- private class ZipOperation : ExtractOperation
- {
- public ZipOperation(string destinationPath) : base(destinationPath)
- {
- }
-
- private List> entries = new List>();
-
- public void AddEntry(string entryName, ExtractSource source)
- {
- entries.Add(Tuple.Create(entryName, source));
- }
-
- protected override void Execute()
- {
- using (var archiveStream = File.Create(DestinationPath))
- using (var archive = new ZipArchive(archiveStream, ZipArchiveMode.Create))
- {
- foreach(var zipSource in entries)
- {
- var entry = archive.CreateEntry(zipSource.Item1, CompressionLevel.Optimal);
- using (var entryStream = entry.Open())
- {
- zipSource.Item2.CopyToStream(entryStream);
- }
- }
- }
- }
- }
-
- private class ExtractSource
- {
- private string _entryName;
- private readonly string _localPath;
- private ThreadLocalZipArchive _archive;
-
- public ExtractSource(string sourceString, Dictionary externalFiles, ThreadLocalZipArchive archive)
- {
- if (sourceString[0] == '$')
- {
- var externalHash = sourceString.Substring(1);
- if (!externalFiles.TryGetValue(externalHash, out _localPath))
- {
- throw new Exception("Could not find external file with hash {externalHash}.");
- }
- }
- else
- {
- _entryName = sourceString;
- _archive = archive;
- }
- }
-
- public string LocalPath { get { return _localPath; } }
-
- public void CopyToStream(Stream destinationStream)
- {
- if (_localPath != null)
- {
- using (var sourceStream = File.OpenRead(_localPath))
- {
- sourceStream.CopyTo(destinationStream);
- }
- }
- else
- {
- using (var sourceStream = _archive.Archive.GetEntry(_entryName).Open())
- {
- sourceStream.CopyTo(destinationStream);
- }
- }
-
- }
- }
-
- private static char[] pipeSeperator = new[] { '|' };
- public void Extract(string compressedArchivePath, string outputDirectory, IProgress progress)
- {
- using (var archiveStream = CreateTemporaryFileStream())
- {
- // decompress the LZMA stream
- using (var lzmaStream = File.OpenRead(compressedArchivePath))
- {
- CompressionUtility.Decompress(lzmaStream, archiveStream, progress);
- }
-
- var archivePath = ((FileStream)archiveStream).Name;
-
- // reset the uncompressed stream
- archiveStream.Seek(0, SeekOrigin.Begin);
-
- // read as a zip archive
- using (var archive = new ZipArchive(archiveStream, ZipArchiveMode.Read))
- using (var tlArchive = new ThreadLocalZipArchive(archivePath, archive))
- {
- List extractOperations = new List();
- Dictionary sourceCache = new Dictionary();
-
- // process the index to determine all extraction operations
- var indexEntry = archive.GetEntry(IndexFileName);
- using (var indexReader = new StreamReader(indexEntry.Open()))
- {
- Dictionary zipOperations = new Dictionary(StringComparer.OrdinalIgnoreCase);
- for (var line = indexReader.ReadLine(); line != null; line = indexReader.ReadLine())
- {
- var lineParts = line.Split(pipeSeperator);
- if (lineParts.Length != 2)
- {
- throw new Exception("Unexpected index line format, too many '|'s.");
- }
-
- string target = lineParts[0];
- string source = lineParts[1];
-
- ExtractSource extractSource;
- if (!sourceCache.TryGetValue(source, out extractSource))
- {
- sourceCache[source] = extractSource = new ExtractSource(source, _externalFiles, tlArchive);
- }
-
- var zipSeperatorIndex = target.IndexOf("::", StringComparison.OrdinalIgnoreCase);
-
- if (zipSeperatorIndex != -1)
- {
- string zipRelativePath = target.Substring(0, zipSeperatorIndex);
- string zipEntryName = target.Substring(zipSeperatorIndex + 2);
- string destinationPath = Path.Combine(outputDirectory, zipRelativePath);
-
- // operations on a zip file will be sequential
- ZipOperation currentZipOperation;
-
- if (!zipOperations.TryGetValue(destinationPath, out currentZipOperation))
- {
- extractOperations.Add(currentZipOperation = new ZipOperation(destinationPath));
- zipOperations.Add(destinationPath, currentZipOperation);
- }
- currentZipOperation.AddEntry(zipEntryName, extractSource);
- }
- else
- {
- string destinationPath = Path.Combine(outputDirectory, target);
- extractOperations.Add(new CopyOperation(extractSource, destinationPath));
- }
- }
- }
-
- int opsExecuted = 0;
- // execute all operations
- //foreach(var extractOperation in extractOperations)
- extractOperations.AsParallel().ForAll(extractOperation =>
- {
- extractOperation.DoOperation();
- progress.Report(LocalizableStrings.Expanding, Interlocked.Increment(ref opsExecuted), extractOperations.Count);
- });
- }
- }
- }
-
- public void AddExternalDirectory(string externalDirectory)
- {
- CheckDisposed();
- foreach (var externalFile in Directory.EnumerateFiles(externalDirectory, "*", SearchOption.AllDirectories))
- {
- AddExternalFile(externalFile);
- }
- }
-
- public void AddExternalFile(string externalFile)
- {
- CheckDisposed();
- using (var fs = File.OpenRead(externalFile))
- {
- string hash = GetHash(fs);
- // $ prefix indicates that the file is not in the archive and path is relative to an external directory
- _archiveFiles[hash] = new ArchiveSource(null, null, "$" + hash , hash, fs.Length);
- _externalFiles[hash] = externalFile;
- }
- }
- public void AddDirectory(string sourceDirectory, IProgress progress, string destinationDirectory = null)
- {
- var sourceFiles = Directory.EnumerateFiles(sourceDirectory, "*", SearchOption.AllDirectories).ToArray();
- int filesAdded = 0;
- sourceFiles.AsParallel().ForAll(sourceFile =>
- {
- // path relative to the destination/extracted directory to write the file
- string destinationRelativePath = sourceFile.Substring(sourceDirectory.Length + 1);
-
- if (destinationDirectory != null)
- {
- destinationRelativePath = Path.Combine(destinationDirectory, destinationRelativePath);
- }
-
- string extension = Path.GetExtension(sourceFile);
-
- if (ZipExtensions.Any(ze => ze.Equals(extension, StringComparison.OrdinalIgnoreCase)))
- {
- AddZip(sourceFile, destinationRelativePath);
- }
- else
- {
- AddFile(sourceFile, destinationRelativePath);
- }
-
- progress.Report($"Adding {sourceDirectory}", Interlocked.Increment(ref filesAdded), sourceFiles.Length);
- });
- }
-
- public void AddZip(string sourceZipFile, string destinationZipFile)
- {
- CheckDisposed();
-
- using (var sourceArchive = new ZipArchive(File.OpenRead(sourceZipFile), ZipArchiveMode.Read))
- {
- foreach(var entry in sourceArchive.Entries)
- {
- string hash = null;
- long size = entry.Length;
- string destinationPath = $"{destinationZipFile}::{entry.FullName}";
- using (var stream = entry.Open())
- {
- hash = GetHash(stream);
- }
-
- AddArchiveSource(sourceZipFile, entry.FullName, destinationPath, hash, size);
- }
- }
- }
-
- public void AddFile(string sourceFilePath, string destinationPath)
- {
- CheckDisposed();
-
- string hash;
- long size;
- // lifetime of this stream is managed by AddStream
- using (var stream = File.Open(sourceFilePath, FileMode.Open))
- {
- hash = GetHash(stream);
- size = stream.Length;
- }
-
- AddArchiveSource(null, sourceFilePath, destinationPath, hash, size);
- }
-
- private void AddArchiveSource(string sourceArchive, string sourceFile, string destinationPath, string hash, long size)
- {
- lock (_archiveFiles)
- {
- _destFiles.Add(new DestinationFileInfo(destinationPath, hash));
-
- // see if we already have this file in the archive/external
- ArchiveSource existing = null;
- if (_archiveFiles.TryGetValue(hash, out existing))
- {
- // if we have raw source file, prefer that over a zipped source file
- if (sourceArchive == null && existing.SourceArchive != null)
- {
- existing.SourceArchive = null;
- existing.SourceFile = sourceFile;
- }
- }
- else
- {
- var archivePath = Path.Combine(hash, Path.GetFileName(destinationPath));
-
- _archiveFiles.Add(hash, new ArchiveSource(sourceArchive, sourceFile, archivePath, hash, size));
- }
- }
- }
-
- public string GetHash(Stream stream)
- {
- var hashBytes = _sha.Value.ComputeHash(stream);
-
- return GetHashString(hashBytes);
- }
-
- private static string GetHashString(byte[] hashBytes)
- {
- StringBuilder builder = new StringBuilder(hashBytes.Length * 2);
- foreach (var b in hashBytes)
- {
- builder.AppendFormat("{0:x2}", b);
- }
- return builder.ToString();
- }
-
- public void Dispose()
- {
- if (!_disposed)
- {
- if (_sha != null)
- {
- _sha.Dispose();
- _sha = null;
- }
- }
- }
-
- private void CheckDisposed()
- {
- if (_disposed)
- {
- throw new ObjectDisposedException(nameof(IndexedArchive));
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Common/CRC.cs b/src/Microsoft.DotNet.Archive/LZMA/Common/CRC.cs
deleted file mode 100644
index 5d38bf911..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Common/CRC.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// Common/CRC.cs
-
-namespace SevenZip
-{
- class CRC
- {
- public static readonly uint[] Table;
-
- static CRC()
- {
- Table = new uint[256];
- const uint kPoly = 0xEDB88320;
- for (uint i = 0; i < 256; i++)
- {
- uint r = i;
- for (int j = 0; j < 8; j++)
- if ((r & 1) != 0)
- r = (r >> 1) ^ kPoly;
- else
- r >>= 1;
- Table[i] = r;
- }
- }
-
- uint _value = 0xFFFFFFFF;
-
- public void Init() { _value = 0xFFFFFFFF; }
-
- public void UpdateByte(byte b)
- {
- _value = Table[(((byte)(_value)) ^ b)] ^ (_value >> 8);
- }
-
- public void Update(byte[] data, uint offset, uint size)
- {
- for (uint i = 0; i < size; i++)
- _value = Table[(((byte)(_value)) ^ data[offset + i])] ^ (_value >> 8);
- }
-
- public uint GetDigest() { return _value ^ 0xFFFFFFFF; }
-
- static uint CalculateDigest(byte[] data, uint offset, uint size)
- {
- CRC crc = new CRC();
- // crc.Init();
- crc.Update(data, offset, size);
- return crc.GetDigest();
- }
-
- static bool VerifyDigest(uint digest, byte[] data, uint offset, uint size)
- {
- return (CalculateDigest(data, offset, size) == digest);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Common/InBuffer.cs b/src/Microsoft.DotNet.Archive/LZMA/Common/InBuffer.cs
deleted file mode 100644
index a26bf4a29..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Common/InBuffer.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// InBuffer.cs
-
-namespace SevenZip.Buffer
-{
- public class InBuffer
- {
- byte[] m_Buffer;
- uint m_Pos;
- uint m_Limit;
- uint m_BufferSize;
- System.IO.Stream m_Stream;
- bool m_StreamWasExhausted;
- ulong m_ProcessedSize;
-
- public InBuffer(uint bufferSize)
- {
- m_Buffer = new byte[bufferSize];
- m_BufferSize = bufferSize;
- }
-
- public void Init(System.IO.Stream stream)
- {
- m_Stream = stream;
- m_ProcessedSize = 0;
- m_Limit = 0;
- m_Pos = 0;
- m_StreamWasExhausted = false;
- }
-
- public bool ReadBlock()
- {
- if (m_StreamWasExhausted)
- return false;
- m_ProcessedSize += m_Pos;
- int aNumProcessedBytes = m_Stream.Read(m_Buffer, 0, (int)m_BufferSize);
- m_Pos = 0;
- m_Limit = (uint)aNumProcessedBytes;
- m_StreamWasExhausted = (aNumProcessedBytes == 0);
- return (!m_StreamWasExhausted);
- }
-
-
- public void ReleaseStream()
- {
- // m_Stream.Close();
- m_Stream = null;
- }
-
- public bool ReadByte(byte b) // check it
- {
- if (m_Pos >= m_Limit)
- if (!ReadBlock())
- return false;
- b = m_Buffer[m_Pos++];
- return true;
- }
-
- public byte ReadByte()
- {
- // return (byte)m_Stream.ReadByte();
- if (m_Pos >= m_Limit)
- if (!ReadBlock())
- return 0xFF;
- return m_Buffer[m_Pos++];
- }
-
- public ulong GetProcessedSize()
- {
- return m_ProcessedSize + m_Pos;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Common/OutBuffer.cs b/src/Microsoft.DotNet.Archive/LZMA/Common/OutBuffer.cs
deleted file mode 100644
index 429bccfc9..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Common/OutBuffer.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// OutBuffer.cs
-
-namespace SevenZip.Buffer
-{
- public class OutBuffer
- {
- byte[] m_Buffer;
- uint m_Pos;
- uint m_BufferSize;
- System.IO.Stream m_Stream;
- ulong m_ProcessedSize;
-
- public OutBuffer(uint bufferSize)
- {
- m_Buffer = new byte[bufferSize];
- m_BufferSize = bufferSize;
- }
-
- public void SetStream(System.IO.Stream stream) { m_Stream = stream; }
- public void FlushStream() { m_Stream.Flush(); }
- public void CloseStream() { m_Stream.Dispose(); }
- public void ReleaseStream() { m_Stream = null; }
-
- public void Init()
- {
- m_ProcessedSize = 0;
- m_Pos = 0;
- }
-
- public void WriteByte(byte b)
- {
- m_Buffer[m_Pos++] = b;
- if (m_Pos >= m_BufferSize)
- FlushData();
- }
-
- public void FlushData()
- {
- if (m_Pos == 0)
- return;
- m_Stream.Write(m_Buffer, 0, (int)m_Pos);
- m_Pos = 0;
- }
-
- public ulong GetProcessedSize() { return m_ProcessedSize + m_Pos; }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/IMatchFinder.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/IMatchFinder.cs
deleted file mode 100644
index 2916aedb0..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/IMatchFinder.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// IMatchFinder.cs
-
-using System;
-
-namespace SevenZip.Compression.LZ
-{
- interface IInWindowStream
- {
- void SetStream(System.IO.Stream inStream);
- void Init();
- void ReleaseStream();
- Byte GetIndexByte(Int32 index);
- UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit);
- UInt32 GetNumAvailableBytes();
- }
-
- interface IMatchFinder : IInWindowStream
- {
- void Create(UInt32 historySize, UInt32 keepAddBufferBefore,
- UInt32 matchMaxLen, UInt32 keepAddBufferAfter);
- UInt32 GetMatches(UInt32[] distances);
- void Skip(UInt32 num);
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzBinTree.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzBinTree.cs
deleted file mode 100644
index 017cf8ea2..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzBinTree.cs
+++ /dev/null
@@ -1,370 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// LzBinTree.cs
-
-using System;
-
-namespace SevenZip.Compression.LZ
-{
- public class BinTree : InWindow, IMatchFinder
- {
- UInt32 _cyclicBufferPos;
- UInt32 _cyclicBufferSize = 0;
- UInt32 _matchMaxLen;
-
- UInt32[] _son;
- UInt32[] _hash;
-
- UInt32 _cutValue = 0xFF;
- UInt32 _hashMask;
- UInt32 _hashSizeSum = 0;
-
- bool HASH_ARRAY = true;
-
- const UInt32 kHash2Size = 1 << 10;
- const UInt32 kHash3Size = 1 << 16;
- const UInt32 kBT2HashSize = 1 << 16;
- const UInt32 kStartMaxLen = 1;
- const UInt32 kHash3Offset = kHash2Size;
- const UInt32 kEmptyHashValue = 0;
- const UInt32 kMaxValForNormalize = ((UInt32)1 << 31) - 1;
-
- UInt32 kNumHashDirectBytes = 0;
- UInt32 kMinMatchCheck = 4;
- UInt32 kFixHashSize = kHash2Size + kHash3Size;
-
- public void SetType(int numHashBytes)
- {
- HASH_ARRAY = (numHashBytes > 2);
- if (HASH_ARRAY)
- {
- kNumHashDirectBytes = 0;
- kMinMatchCheck = 4;
- kFixHashSize = kHash2Size + kHash3Size;
- }
- else
- {
- kNumHashDirectBytes = 2;
- kMinMatchCheck = 2 + 1;
- kFixHashSize = 0;
- }
- }
-
- public new void SetStream(System.IO.Stream stream) { base.SetStream(stream); }
- public new void ReleaseStream() { base.ReleaseStream(); }
-
- public new void Init()
- {
- base.Init();
- for (UInt32 i = 0; i < _hashSizeSum; i++)
- _hash[i] = kEmptyHashValue;
- _cyclicBufferPos = 0;
- ReduceOffsets(-1);
- }
-
- public new void MovePos()
- {
- if (++_cyclicBufferPos >= _cyclicBufferSize)
- _cyclicBufferPos = 0;
- base.MovePos();
- if (_pos == kMaxValForNormalize)
- Normalize();
- }
-
- public new Byte GetIndexByte(Int32 index) { return base.GetIndexByte(index); }
-
- public new UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit)
- { return base.GetMatchLen(index, distance, limit); }
-
- public new UInt32 GetNumAvailableBytes() { return base.GetNumAvailableBytes(); }
-
- public void Create(UInt32 historySize, UInt32 keepAddBufferBefore,
- UInt32 matchMaxLen, UInt32 keepAddBufferAfter)
- {
- if (historySize > kMaxValForNormalize - 256)
- throw new Exception();
- _cutValue = 16 + (matchMaxLen >> 1);
-
- UInt32 windowReservSize = (historySize + keepAddBufferBefore +
- matchMaxLen + keepAddBufferAfter) / 2 + 256;
-
- base.Create(historySize + keepAddBufferBefore, matchMaxLen + keepAddBufferAfter, windowReservSize);
-
- _matchMaxLen = matchMaxLen;
-
- UInt32 cyclicBufferSize = historySize + 1;
- if (_cyclicBufferSize != cyclicBufferSize)
- _son = new UInt32[(_cyclicBufferSize = cyclicBufferSize) * 2];
-
- UInt32 hs = kBT2HashSize;
-
- if (HASH_ARRAY)
- {
- hs = historySize - 1;
- hs |= (hs >> 1);
- hs |= (hs >> 2);
- hs |= (hs >> 4);
- hs |= (hs >> 8);
- hs >>= 1;
- hs |= 0xFFFF;
- if (hs > (1 << 24))
- hs >>= 1;
- _hashMask = hs;
- hs++;
- hs += kFixHashSize;
- }
- if (hs != _hashSizeSum)
- _hash = new UInt32[_hashSizeSum = hs];
- }
-
- public UInt32 GetMatches(UInt32[] distances)
- {
- UInt32 lenLimit;
- if (_pos + _matchMaxLen <= _streamPos)
- lenLimit = _matchMaxLen;
- else
- {
- lenLimit = _streamPos - _pos;
- if (lenLimit < kMinMatchCheck)
- {
- MovePos();
- return 0;
- }
- }
-
- UInt32 offset = 0;
- UInt32 matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;
- UInt32 cur = _bufferOffset + _pos;
- UInt32 maxLen = kStartMaxLen; // to avoid items for len < hashSize;
- UInt32 hashValue, hash2Value = 0, hash3Value = 0;
-
- if (HASH_ARRAY)
- {
- UInt32 temp = CRC.Table[_bufferBase[cur]] ^ _bufferBase[cur + 1];
- hash2Value = temp & (kHash2Size - 1);
- temp ^= ((UInt32)(_bufferBase[cur + 2]) << 8);
- hash3Value = temp & (kHash3Size - 1);
- hashValue = (temp ^ (CRC.Table[_bufferBase[cur + 3]] << 5)) & _hashMask;
- }
- else
- hashValue = _bufferBase[cur] ^ ((UInt32)(_bufferBase[cur + 1]) << 8);
-
- UInt32 curMatch = _hash[kFixHashSize + hashValue];
- if (HASH_ARRAY)
- {
- UInt32 curMatch2 = _hash[hash2Value];
- UInt32 curMatch3 = _hash[kHash3Offset + hash3Value];
- _hash[hash2Value] = _pos;
- _hash[kHash3Offset + hash3Value] = _pos;
- if (curMatch2 > matchMinPos)
- if (_bufferBase[_bufferOffset + curMatch2] == _bufferBase[cur])
- {
- distances[offset++] = maxLen = 2;
- distances[offset++] = _pos - curMatch2 - 1;
- }
- if (curMatch3 > matchMinPos)
- if (_bufferBase[_bufferOffset + curMatch3] == _bufferBase[cur])
- {
- if (curMatch3 == curMatch2)
- offset -= 2;
- distances[offset++] = maxLen = 3;
- distances[offset++] = _pos - curMatch3 - 1;
- curMatch2 = curMatch3;
- }
- if (offset != 0 && curMatch2 == curMatch)
- {
- offset -= 2;
- maxLen = kStartMaxLen;
- }
- }
-
- _hash[kFixHashSize + hashValue] = _pos;
-
- UInt32 ptr0 = (_cyclicBufferPos << 1) + 1;
- UInt32 ptr1 = (_cyclicBufferPos << 1);
-
- UInt32 len0, len1;
- len0 = len1 = kNumHashDirectBytes;
-
- if (kNumHashDirectBytes != 0)
- {
- if (curMatch > matchMinPos)
- {
- if (_bufferBase[_bufferOffset + curMatch + kNumHashDirectBytes] !=
- _bufferBase[cur + kNumHashDirectBytes])
- {
- distances[offset++] = maxLen = kNumHashDirectBytes;
- distances[offset++] = _pos - curMatch - 1;
- }
- }
- }
-
- UInt32 count = _cutValue;
-
- while(true)
- {
- if(curMatch <= matchMinPos || count-- == 0)
- {
- _son[ptr0] = _son[ptr1] = kEmptyHashValue;
- break;
- }
- UInt32 delta = _pos - curMatch;
- UInt32 cyclicPos = ((delta <= _cyclicBufferPos) ?
- (_cyclicBufferPos - delta) :
- (_cyclicBufferPos - delta + _cyclicBufferSize)) << 1;
-
- UInt32 pby1 = _bufferOffset + curMatch;
- UInt32 len = Math.Min(len0, len1);
- if (_bufferBase[pby1 + len] == _bufferBase[cur + len])
- {
- while(++len != lenLimit)
- if (_bufferBase[pby1 + len] != _bufferBase[cur + len])
- break;
- if (maxLen < len)
- {
- distances[offset++] = maxLen = len;
- distances[offset++] = delta - 1;
- if (len == lenLimit)
- {
- _son[ptr1] = _son[cyclicPos];
- _son[ptr0] = _son[cyclicPos + 1];
- break;
- }
- }
- }
- if (_bufferBase[pby1 + len] < _bufferBase[cur + len])
- {
- _son[ptr1] = curMatch;
- ptr1 = cyclicPos + 1;
- curMatch = _son[ptr1];
- len1 = len;
- }
- else
- {
- _son[ptr0] = curMatch;
- ptr0 = cyclicPos;
- curMatch = _son[ptr0];
- len0 = len;
- }
- }
- MovePos();
- return offset;
- }
-
- public void Skip(UInt32 num)
- {
- do
- {
- UInt32 lenLimit;
- if (_pos + _matchMaxLen <= _streamPos)
- lenLimit = _matchMaxLen;
- else
- {
- lenLimit = _streamPos - _pos;
- if (lenLimit < kMinMatchCheck)
- {
- MovePos();
- continue;
- }
- }
-
- UInt32 matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;
- UInt32 cur = _bufferOffset + _pos;
-
- UInt32 hashValue;
-
- if (HASH_ARRAY)
- {
- UInt32 temp = CRC.Table[_bufferBase[cur]] ^ _bufferBase[cur + 1];
- UInt32 hash2Value = temp & (kHash2Size - 1);
- _hash[hash2Value] = _pos;
- temp ^= ((UInt32)(_bufferBase[cur + 2]) << 8);
- UInt32 hash3Value = temp & (kHash3Size - 1);
- _hash[kHash3Offset + hash3Value] = _pos;
- hashValue = (temp ^ (CRC.Table[_bufferBase[cur + 3]] << 5)) & _hashMask;
- }
- else
- hashValue = _bufferBase[cur] ^ ((UInt32)(_bufferBase[cur + 1]) << 8);
-
- UInt32 curMatch = _hash[kFixHashSize + hashValue];
- _hash[kFixHashSize + hashValue] = _pos;
-
- UInt32 ptr0 = (_cyclicBufferPos << 1) + 1;
- UInt32 ptr1 = (_cyclicBufferPos << 1);
-
- UInt32 len0, len1;
- len0 = len1 = kNumHashDirectBytes;
-
- UInt32 count = _cutValue;
- while (true)
- {
- if (curMatch <= matchMinPos || count-- == 0)
- {
- _son[ptr0] = _son[ptr1] = kEmptyHashValue;
- break;
- }
-
- UInt32 delta = _pos - curMatch;
- UInt32 cyclicPos = ((delta <= _cyclicBufferPos) ?
- (_cyclicBufferPos - delta) :
- (_cyclicBufferPos - delta + _cyclicBufferSize)) << 1;
-
- UInt32 pby1 = _bufferOffset + curMatch;
- UInt32 len = Math.Min(len0, len1);
- if (_bufferBase[pby1 + len] == _bufferBase[cur + len])
- {
- while (++len != lenLimit)
- if (_bufferBase[pby1 + len] != _bufferBase[cur + len])
- break;
- if (len == lenLimit)
- {
- _son[ptr1] = _son[cyclicPos];
- _son[ptr0] = _son[cyclicPos + 1];
- break;
- }
- }
- if (_bufferBase[pby1 + len] < _bufferBase[cur + len])
- {
- _son[ptr1] = curMatch;
- ptr1 = cyclicPos + 1;
- curMatch = _son[ptr1];
- len1 = len;
- }
- else
- {
- _son[ptr0] = curMatch;
- ptr0 = cyclicPos;
- curMatch = _son[ptr0];
- len0 = len;
- }
- }
- MovePos();
- }
- while (--num != 0);
- }
-
- void NormalizeLinks(UInt32[] items, UInt32 numItems, UInt32 subValue)
- {
- for (UInt32 i = 0; i < numItems; i++)
- {
- UInt32 value = items[i];
- if (value <= subValue)
- value = kEmptyHashValue;
- else
- value -= subValue;
- items[i] = value;
- }
- }
-
- void Normalize()
- {
- UInt32 subValue = _pos - _cyclicBufferSize;
- NormalizeLinks(_son, _cyclicBufferSize * 2, subValue);
- NormalizeLinks(_hash, _hashSizeSum, subValue);
- ReduceOffsets((Int32)subValue);
- }
-
- public void SetCutValue(UInt32 cutValue) { _cutValue = cutValue; }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzInWindow.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzInWindow.cs
deleted file mode 100644
index 1ee8282f1..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzInWindow.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// LzInWindow.cs
-
-using System;
-
-namespace SevenZip.Compression.LZ
-{
- public class InWindow
- {
- public Byte[] _bufferBase = null; // pointer to buffer with data
- System.IO.Stream _stream;
- UInt32 _posLimit; // offset (from _buffer) of first byte when new block reading must be done
- bool _streamEndWasReached; // if (true) then _streamPos shows real end of stream
-
- UInt32 _pointerToLastSafePosition;
-
- public UInt32 _bufferOffset;
-
- public UInt32 _blockSize; // Size of Allocated memory block
- public UInt32 _pos; // offset (from _buffer) of curent byte
- UInt32 _keepSizeBefore; // how many BYTEs must be kept in buffer before _pos
- UInt32 _keepSizeAfter; // how many BYTEs must be kept buffer after _pos
- public UInt32 _streamPos; // offset (from _buffer) of first not read byte from Stream
-
- public void MoveBlock()
- {
- UInt32 offset = (UInt32)(_bufferOffset) + _pos - _keepSizeBefore;
- // we need one additional byte, since MovePos moves on 1 byte.
- if (offset > 0)
- offset--;
-
- UInt32 numBytes = (UInt32)(_bufferOffset) + _streamPos - offset;
-
- // check negative offset ????
- for (UInt32 i = 0; i < numBytes; i++)
- _bufferBase[i] = _bufferBase[offset + i];
- _bufferOffset -= offset;
- }
-
- public virtual void ReadBlock()
- {
- if (_streamEndWasReached)
- return;
- while (true)
- {
- int size = (int)((0 - _bufferOffset) + _blockSize - _streamPos);
- if (size == 0)
- return;
- int numReadBytes = _stream.Read(_bufferBase, (int)(_bufferOffset + _streamPos), size);
- if (numReadBytes == 0)
- {
- _posLimit = _streamPos;
- UInt32 pointerToPostion = _bufferOffset + _posLimit;
- if (pointerToPostion > _pointerToLastSafePosition)
- _posLimit = (UInt32)(_pointerToLastSafePosition - _bufferOffset);
-
- _streamEndWasReached = true;
- return;
- }
- _streamPos += (UInt32)numReadBytes;
- if (_streamPos >= _pos + _keepSizeAfter)
- _posLimit = _streamPos - _keepSizeAfter;
- }
- }
-
- void Free() { _bufferBase = null; }
-
- public void Create(UInt32 keepSizeBefore, UInt32 keepSizeAfter, UInt32 keepSizeReserv)
- {
- _keepSizeBefore = keepSizeBefore;
- _keepSizeAfter = keepSizeAfter;
- UInt32 blockSize = keepSizeBefore + keepSizeAfter + keepSizeReserv;
- if (_bufferBase == null || _blockSize != blockSize)
- {
- Free();
- _blockSize = blockSize;
- _bufferBase = new Byte[_blockSize];
- }
- _pointerToLastSafePosition = _blockSize - keepSizeAfter;
- }
-
- public void SetStream(System.IO.Stream stream) { _stream = stream; }
- public void ReleaseStream() { _stream = null; }
-
- public void Init()
- {
- _bufferOffset = 0;
- _pos = 0;
- _streamPos = 0;
- _streamEndWasReached = false;
- ReadBlock();
- }
-
- public void MovePos()
- {
- _pos++;
- if (_pos > _posLimit)
- {
- UInt32 pointerToPostion = _bufferOffset + _pos;
- if (pointerToPostion > _pointerToLastSafePosition)
- MoveBlock();
- ReadBlock();
- }
- }
-
- public Byte GetIndexByte(Int32 index) { return _bufferBase[_bufferOffset + _pos + index]; }
-
- // index + limit have not to exceed _keepSizeAfter;
- public UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit)
- {
- if (_streamEndWasReached)
- if ((_pos + index) + limit > _streamPos)
- limit = _streamPos - (UInt32)(_pos + index);
- distance++;
- // Byte *pby = _buffer + (size_t)_pos + index;
- UInt32 pby = _bufferOffset + _pos + (UInt32)index;
-
- UInt32 i;
- for (i = 0; i < limit && _bufferBase[pby + i] == _bufferBase[pby + i - distance]; i++);
- return i;
- }
-
- public UInt32 GetNumAvailableBytes() { return _streamPos - _pos; }
-
- public void ReduceOffsets(Int32 subValue)
- {
- _bufferOffset += (UInt32)subValue;
- _posLimit -= (UInt32)subValue;
- _pos -= (UInt32)subValue;
- _streamPos -= (UInt32)subValue;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzOutWindow.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzOutWindow.cs
deleted file mode 100644
index 479ae4f13..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZ/LzOutWindow.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// LzOutWindow.cs
-
-namespace SevenZip.Compression.LZ
-{
- public class OutWindow
- {
- byte[] _buffer = null;
- uint _pos;
- uint _windowSize = 0;
- uint _streamPos;
- System.IO.Stream _stream;
-
- public uint TrainSize = 0;
-
- public void Create(uint windowSize)
- {
- if (_windowSize != windowSize)
- {
- // System.GC.Collect();
- _buffer = new byte[windowSize];
- }
- _windowSize = windowSize;
- _pos = 0;
- _streamPos = 0;
- }
-
- public void Init(System.IO.Stream stream, bool solid)
- {
- ReleaseStream();
- _stream = stream;
- if (!solid)
- {
- _streamPos = 0;
- _pos = 0;
- TrainSize = 0;
- }
- }
-
- public bool Train(System.IO.Stream stream)
- {
- long len = stream.Length;
- uint size = (len < _windowSize) ? (uint)len : _windowSize;
- TrainSize = size;
- stream.Position = len - size;
- _streamPos = _pos = 0;
- while (size > 0)
- {
- uint curSize = _windowSize - _pos;
- if (size < curSize)
- curSize = size;
- int numReadBytes = stream.Read(_buffer, (int)_pos, (int)curSize);
- if (numReadBytes == 0)
- return false;
- size -= (uint)numReadBytes;
- _pos += (uint)numReadBytes;
- _streamPos += (uint)numReadBytes;
- if (_pos == _windowSize)
- _streamPos = _pos = 0;
- }
- return true;
- }
-
- public void ReleaseStream()
- {
- Flush();
- _stream = null;
- }
-
- public void Flush()
- {
- uint size = _pos - _streamPos;
- if (size == 0)
- return;
- _stream.Write(_buffer, (int)_streamPos, (int)size);
- if (_pos >= _windowSize)
- _pos = 0;
- _streamPos = _pos;
- }
-
- public void CopyBlock(uint distance, uint len)
- {
- uint pos = _pos - distance - 1;
- if (pos >= _windowSize)
- pos += _windowSize;
- for (; len > 0; len--)
- {
- if (pos >= _windowSize)
- pos = 0;
- _buffer[_pos++] = _buffer[pos++];
- if (_pos >= _windowSize)
- Flush();
- }
- }
-
- public void PutByte(byte b)
- {
- _buffer[_pos++] = b;
- if (_pos >= _windowSize)
- Flush();
- }
-
- public byte GetByte(uint distance)
- {
- uint pos = _pos - distance - 1;
- if (pos >= _windowSize)
- pos += _windowSize;
- return _buffer[pos];
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaBase.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaBase.cs
deleted file mode 100644
index f4a8f823f..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaBase.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// LzmaBase.cs
-
-namespace SevenZip.Compression.LZMA
-{
- internal abstract class Base
- {
- public const uint kNumRepDistances = 4;
- public const uint kNumStates = 12;
-
- // static byte []kLiteralNextStates = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5};
- // static byte []kMatchNextStates = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10};
- // static byte []kRepNextStates = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11};
- // static byte []kShortRepNextStates = {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11};
-
- public struct State
- {
- public uint Index;
- public void Init() { Index = 0; }
- public void UpdateChar()
- {
- if (Index < 4) Index = 0;
- else if (Index < 10) Index -= 3;
- else Index -= 6;
- }
- public void UpdateMatch() { Index = (uint)(Index < 7 ? 7 : 10); }
- public void UpdateRep() { Index = (uint)(Index < 7 ? 8 : 11); }
- public void UpdateShortRep() { Index = (uint)(Index < 7 ? 9 : 11); }
- public bool IsCharState() { return Index < 7; }
- }
-
- public const int kNumPosSlotBits = 6;
- public const int kDicLogSizeMin = 0;
- // public const int kDicLogSizeMax = 30;
- // public const uint kDistTableSizeMax = kDicLogSizeMax * 2;
-
- public const int kNumLenToPosStatesBits = 2; // it's for speed optimization
- public const uint kNumLenToPosStates = 1 << kNumLenToPosStatesBits;
-
- public const uint kMatchMinLen = 2;
-
- public static uint GetLenToPosState(uint len)
- {
- len -= kMatchMinLen;
- if (len < kNumLenToPosStates)
- return len;
- return (uint)(kNumLenToPosStates - 1);
- }
-
- public const int kNumAlignBits = 4;
- public const uint kAlignTableSize = 1 << kNumAlignBits;
- public const uint kAlignMask = (kAlignTableSize - 1);
-
- public const uint kStartPosModelIndex = 4;
- public const uint kEndPosModelIndex = 14;
- public const uint kNumPosModels = kEndPosModelIndex - kStartPosModelIndex;
-
- public const uint kNumFullDistances = 1 << ((int)kEndPosModelIndex / 2);
-
- public const uint kNumLitPosStatesBitsEncodingMax = 4;
- public const uint kNumLitContextBitsMax = 8;
-
- public const int kNumPosStatesBitsMax = 4;
- public const uint kNumPosStatesMax = (1 << kNumPosStatesBitsMax);
- public const int kNumPosStatesBitsEncodingMax = 4;
- public const uint kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax);
-
- public const int kNumLowLenBits = 3;
- public const int kNumMidLenBits = 3;
- public const int kNumHighLenBits = 8;
- public const uint kNumLowLenSymbols = 1 << kNumLowLenBits;
- public const uint kNumMidLenSymbols = 1 << kNumMidLenBits;
- public const uint kNumLenSymbols = kNumLowLenSymbols + kNumMidLenSymbols +
- (1 << kNumHighLenBits);
- public const uint kMatchMaxLen = kMatchMinLen + kNumLenSymbols - 1;
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaDecoder.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaDecoder.cs
deleted file mode 100644
index 95d42eed0..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaDecoder.cs
+++ /dev/null
@@ -1,402 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// LzmaDecoder.cs
-
-using System;
-
-namespace SevenZip.Compression.LZMA
-{
- using RangeCoder;
-
- public class Decoder : ICoder, ISetDecoderProperties // ,System.IO.Stream
- {
- class LenDecoder
- {
- BitDecoder m_Choice = new BitDecoder();
- BitDecoder m_Choice2 = new BitDecoder();
- BitTreeDecoder[] m_LowCoder = new BitTreeDecoder[Base.kNumPosStatesMax];
- BitTreeDecoder[] m_MidCoder = new BitTreeDecoder[Base.kNumPosStatesMax];
- BitTreeDecoder m_HighCoder = new BitTreeDecoder(Base.kNumHighLenBits);
- uint m_NumPosStates = 0;
-
- public void Create(uint numPosStates)
- {
- for (uint posState = m_NumPosStates; posState < numPosStates; posState++)
- {
- m_LowCoder[posState] = new BitTreeDecoder(Base.kNumLowLenBits);
- m_MidCoder[posState] = new BitTreeDecoder(Base.kNumMidLenBits);
- }
- m_NumPosStates = numPosStates;
- }
-
- public void Init()
- {
- m_Choice.Init();
- for (uint posState = 0; posState < m_NumPosStates; posState++)
- {
- m_LowCoder[posState].Init();
- m_MidCoder[posState].Init();
- }
- m_Choice2.Init();
- m_HighCoder.Init();
- }
-
- public uint Decode(RangeCoder.Decoder rangeDecoder, uint posState)
- {
- if (m_Choice.Decode(rangeDecoder) == 0)
- return m_LowCoder[posState].Decode(rangeDecoder);
- else
- {
- uint symbol = Base.kNumLowLenSymbols;
- if (m_Choice2.Decode(rangeDecoder) == 0)
- symbol += m_MidCoder[posState].Decode(rangeDecoder);
- else
- {
- symbol += Base.kNumMidLenSymbols;
- symbol += m_HighCoder.Decode(rangeDecoder);
- }
- return symbol;
- }
- }
- }
-
- class LiteralDecoder
- {
- struct Decoder2
- {
- BitDecoder[] m_Decoders;
- public void Create() { m_Decoders = new BitDecoder[0x300]; }
- public void Init() { for (int i = 0; i < 0x300; i++) m_Decoders[i].Init(); }
-
- public byte DecodeNormal(RangeCoder.Decoder rangeDecoder)
- {
- uint symbol = 1;
- do
- symbol = (symbol << 1) | m_Decoders[symbol].Decode(rangeDecoder);
- while (symbol < 0x100);
- return (byte)symbol;
- }
-
- public byte DecodeWithMatchByte(RangeCoder.Decoder rangeDecoder, byte matchByte)
- {
- uint symbol = 1;
- do
- {
- uint matchBit = (uint)(matchByte >> 7) & 1;
- matchByte <<= 1;
- uint bit = m_Decoders[((1 + matchBit) << 8) + symbol].Decode(rangeDecoder);
- symbol = (symbol << 1) | bit;
- if (matchBit != bit)
- {
- while (symbol < 0x100)
- symbol = (symbol << 1) | m_Decoders[symbol].Decode(rangeDecoder);
- break;
- }
- }
- while (symbol < 0x100);
- return (byte)symbol;
- }
- }
-
- Decoder2[] m_Coders;
- int m_NumPrevBits;
- int m_NumPosBits;
- uint m_PosMask;
-
- public void Create(int numPosBits, int numPrevBits)
- {
- if (m_Coders != null && m_NumPrevBits == numPrevBits &&
- m_NumPosBits == numPosBits)
- return;
- m_NumPosBits = numPosBits;
- m_PosMask = ((uint)1 << numPosBits) - 1;
- m_NumPrevBits = numPrevBits;
- uint numStates = (uint)1 << (m_NumPrevBits + m_NumPosBits);
- m_Coders = new Decoder2[numStates];
- for (uint i = 0; i < numStates; i++)
- m_Coders[i].Create();
- }
-
- public void Init()
- {
- uint numStates = (uint)1 << (m_NumPrevBits + m_NumPosBits);
- for (uint i = 0; i < numStates; i++)
- m_Coders[i].Init();
- }
-
- uint GetState(uint pos, byte prevByte)
- { return ((pos & m_PosMask) << m_NumPrevBits) + (uint)(prevByte >> (8 - m_NumPrevBits)); }
-
- public byte DecodeNormal(RangeCoder.Decoder rangeDecoder, uint pos, byte prevByte)
- { return m_Coders[GetState(pos, prevByte)].DecodeNormal(rangeDecoder); }
-
- public byte DecodeWithMatchByte(RangeCoder.Decoder rangeDecoder, uint pos, byte prevByte, byte matchByte)
- { return m_Coders[GetState(pos, prevByte)].DecodeWithMatchByte(rangeDecoder, matchByte); }
- };
-
- LZ.OutWindow m_OutWindow = new LZ.OutWindow();
- RangeCoder.Decoder m_RangeDecoder = new RangeCoder.Decoder();
-
- BitDecoder[] m_IsMatchDecoders = new BitDecoder[Base.kNumStates << Base.kNumPosStatesBitsMax];
- BitDecoder[] m_IsRepDecoders = new BitDecoder[Base.kNumStates];
- BitDecoder[] m_IsRepG0Decoders = new BitDecoder[Base.kNumStates];
- BitDecoder[] m_IsRepG1Decoders = new BitDecoder[Base.kNumStates];
- BitDecoder[] m_IsRepG2Decoders = new BitDecoder[Base.kNumStates];
- BitDecoder[] m_IsRep0LongDecoders = new BitDecoder[Base.kNumStates << Base.kNumPosStatesBitsMax];
-
- BitTreeDecoder[] m_PosSlotDecoder = new BitTreeDecoder[Base.kNumLenToPosStates];
- BitDecoder[] m_PosDecoders = new BitDecoder[Base.kNumFullDistances - Base.kEndPosModelIndex];
-
- BitTreeDecoder m_PosAlignDecoder = new BitTreeDecoder(Base.kNumAlignBits);
-
- LenDecoder m_LenDecoder = new LenDecoder();
- LenDecoder m_RepLenDecoder = new LenDecoder();
-
- LiteralDecoder m_LiteralDecoder = new LiteralDecoder();
-
- uint m_DictionarySize;
- uint m_DictionarySizeCheck;
-
- uint m_PosStateMask;
-
- public Decoder()
- {
- m_DictionarySize = 0xFFFFFFFF;
- for (int i = 0; i < Base.kNumLenToPosStates; i++)
- m_PosSlotDecoder[i] = new BitTreeDecoder(Base.kNumPosSlotBits);
- }
-
- void SetDictionarySize(uint dictionarySize)
- {
- if (m_DictionarySize != dictionarySize)
- {
- m_DictionarySize = dictionarySize;
- m_DictionarySizeCheck = Math.Max(m_DictionarySize, 1);
- uint blockSize = Math.Max(m_DictionarySizeCheck, (1 << 12));
- m_OutWindow.Create(blockSize);
- }
- }
-
- void SetLiteralProperties(int lp, int lc)
- {
- if (lp > 8)
- throw new InvalidParamException();
- if (lc > 8)
- throw new InvalidParamException();
- m_LiteralDecoder.Create(lp, lc);
- }
-
- void SetPosBitsProperties(int pb)
- {
- if (pb > Base.kNumPosStatesBitsMax)
- throw new InvalidParamException();
- uint numPosStates = (uint)1 << pb;
- m_LenDecoder.Create(numPosStates);
- m_RepLenDecoder.Create(numPosStates);
- m_PosStateMask = numPosStates - 1;
- }
-
- bool _solid = false;
- void Init(System.IO.Stream inStream, System.IO.Stream outStream)
- {
- m_RangeDecoder.Init(inStream);
- m_OutWindow.Init(outStream, _solid);
-
- uint i;
- for (i = 0; i < Base.kNumStates; i++)
- {
- for (uint j = 0; j <= m_PosStateMask; j++)
- {
- uint index = (i << Base.kNumPosStatesBitsMax) + j;
- m_IsMatchDecoders[index].Init();
- m_IsRep0LongDecoders[index].Init();
- }
- m_IsRepDecoders[i].Init();
- m_IsRepG0Decoders[i].Init();
- m_IsRepG1Decoders[i].Init();
- m_IsRepG2Decoders[i].Init();
- }
-
- m_LiteralDecoder.Init();
- for (i = 0; i < Base.kNumLenToPosStates; i++)
- m_PosSlotDecoder[i].Init();
- // m_PosSpecDecoder.Init();
- for (i = 0; i < Base.kNumFullDistances - Base.kEndPosModelIndex; i++)
- m_PosDecoders[i].Init();
-
- m_LenDecoder.Init();
- m_RepLenDecoder.Init();
- m_PosAlignDecoder.Init();
- }
-
- public void Code(System.IO.Stream inStream, System.IO.Stream outStream,
- Int64 inSize, Int64 outSize, ICodeProgress progress)
- {
- Init(inStream, outStream);
-
- Base.State state = new Base.State();
- state.Init();
- uint rep0 = 0, rep1 = 0, rep2 = 0, rep3 = 0;
-
- UInt64 nowPos64 = 0;
- UInt64 outSize64 = (UInt64)outSize;
- if (nowPos64 < outSize64)
- {
- if (m_IsMatchDecoders[state.Index << Base.kNumPosStatesBitsMax].Decode(m_RangeDecoder) != 0)
- throw new DataErrorException();
- state.UpdateChar();
- byte b = m_LiteralDecoder.DecodeNormal(m_RangeDecoder, 0, 0);
- m_OutWindow.PutByte(b);
- nowPos64++;
- }
- while (nowPos64 < outSize64)
- {
- progress.SetProgress(inStream.Position, (long)nowPos64);
- // UInt64 next = Math.Min(nowPos64 + (1 << 18), outSize64);
- // while(nowPos64 < next)
- {
- uint posState = (uint)nowPos64 & m_PosStateMask;
- if (m_IsMatchDecoders[(state.Index << Base.kNumPosStatesBitsMax) + posState].Decode(m_RangeDecoder) == 0)
- {
- byte b;
- byte prevByte = m_OutWindow.GetByte(0);
- if (!state.IsCharState())
- b = m_LiteralDecoder.DecodeWithMatchByte(m_RangeDecoder,
- (uint)nowPos64, prevByte, m_OutWindow.GetByte(rep0));
- else
- b = m_LiteralDecoder.DecodeNormal(m_RangeDecoder, (uint)nowPos64, prevByte);
- m_OutWindow.PutByte(b);
- state.UpdateChar();
- nowPos64++;
- }
- else
- {
- uint len;
- if (m_IsRepDecoders[state.Index].Decode(m_RangeDecoder) == 1)
- {
- if (m_IsRepG0Decoders[state.Index].Decode(m_RangeDecoder) == 0)
- {
- if (m_IsRep0LongDecoders[(state.Index << Base.kNumPosStatesBitsMax) + posState].Decode(m_RangeDecoder) == 0)
- {
- state.UpdateShortRep();
- m_OutWindow.PutByte(m_OutWindow.GetByte(rep0));
- nowPos64++;
- continue;
- }
- }
- else
- {
- UInt32 distance;
- if (m_IsRepG1Decoders[state.Index].Decode(m_RangeDecoder) == 0)
- {
- distance = rep1;
- }
- else
- {
- if (m_IsRepG2Decoders[state.Index].Decode(m_RangeDecoder) == 0)
- distance = rep2;
- else
- {
- distance = rep3;
- rep3 = rep2;
- }
- rep2 = rep1;
- }
- rep1 = rep0;
- rep0 = distance;
- }
- len = m_RepLenDecoder.Decode(m_RangeDecoder, posState) + Base.kMatchMinLen;
- state.UpdateRep();
- }
- else
- {
- rep3 = rep2;
- rep2 = rep1;
- rep1 = rep0;
- len = Base.kMatchMinLen + m_LenDecoder.Decode(m_RangeDecoder, posState);
- state.UpdateMatch();
- uint posSlot = m_PosSlotDecoder[Base.GetLenToPosState(len)].Decode(m_RangeDecoder);
- if (posSlot >= Base.kStartPosModelIndex)
- {
- int numDirectBits = (int)((posSlot >> 1) - 1);
- rep0 = ((2 | (posSlot & 1)) << numDirectBits);
- if (posSlot < Base.kEndPosModelIndex)
- rep0 += BitTreeDecoder.ReverseDecode(m_PosDecoders,
- rep0 - posSlot - 1, m_RangeDecoder, numDirectBits);
- else
- {
- rep0 += (m_RangeDecoder.DecodeDirectBits(
- numDirectBits - Base.kNumAlignBits) << Base.kNumAlignBits);
- rep0 += m_PosAlignDecoder.ReverseDecode(m_RangeDecoder);
- }
- }
- else
- rep0 = posSlot;
- }
- if (rep0 >= m_OutWindow.TrainSize + nowPos64 || rep0 >= m_DictionarySizeCheck)
- {
- if (rep0 == 0xFFFFFFFF)
- break;
- throw new DataErrorException();
- }
- m_OutWindow.CopyBlock(rep0, len);
- nowPos64 += len;
- }
- }
- }
- m_OutWindow.Flush();
- m_OutWindow.ReleaseStream();
- m_RangeDecoder.ReleaseStream();
- }
-
- public void SetDecoderProperties(byte[] properties)
- {
- if (properties.Length < 5)
- throw new InvalidParamException();
- int lc = properties[0] % 9;
- int remainder = properties[0] / 9;
- int lp = remainder % 5;
- int pb = remainder / 5;
- if (pb > Base.kNumPosStatesBitsMax)
- throw new InvalidParamException();
- UInt32 dictionarySize = 0;
- for (int i = 0; i < 4; i++)
- dictionarySize += ((UInt32)(properties[1 + i])) << (i * 8);
- SetDictionarySize(dictionarySize);
- SetLiteralProperties(lp, lc);
- SetPosBitsProperties(pb);
- }
-
- public bool Train(System.IO.Stream stream)
- {
- _solid = true;
- return m_OutWindow.Train(stream);
- }
-
- /*
- public override bool CanRead { get { return true; }}
- public override bool CanWrite { get { return true; }}
- public override bool CanSeek { get { return true; }}
- public override long Length { get { return 0; }}
- public override long Position
- {
- get { return 0; }
- set { }
- }
- public override void Flush() { }
- public override int Read(byte[] buffer, int offset, int count)
- {
- return 0;
- }
- public override void Write(byte[] buffer, int offset, int count)
- {
- }
- public override long Seek(long offset, System.IO.SeekOrigin origin)
- {
- return 0;
- }
- public override void SetLength(long value) {}
- */
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaEncoder.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaEncoder.cs
deleted file mode 100644
index 527a67e0c..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/LZMA/LzmaEncoder.cs
+++ /dev/null
@@ -1,1483 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// LzmaEncoder.cs
-
-using System;
-
-namespace SevenZip.Compression.LZMA
-{
- using RangeCoder;
-
- public class Encoder : ICoder, ISetCoderProperties, IWriteCoderProperties
- {
- enum EMatchFinderType
- {
- BT2,
- BT4,
- };
-
- const UInt32 kIfinityPrice = 0xFFFFFFF;
-
- static Byte[] g_FastPos = new Byte[1 << 11];
-
- static Encoder()
- {
- const Byte kFastSlots = 22;
- int c = 2;
- g_FastPos[0] = 0;
- g_FastPos[1] = 1;
- for (Byte slotFast = 2; slotFast < kFastSlots; slotFast++)
- {
- UInt32 k = ((UInt32)1 << ((slotFast >> 1) - 1));
- for (UInt32 j = 0; j < k; j++, c++)
- g_FastPos[c] = slotFast;
- }
- }
-
- static UInt32 GetPosSlot(UInt32 pos)
- {
- if (pos < (1 << 11))
- return g_FastPos[pos];
- if (pos < (1 << 21))
- return (UInt32)(g_FastPos[pos >> 10] + 20);
- return (UInt32)(g_FastPos[pos >> 20] + 40);
- }
-
- static UInt32 GetPosSlot2(UInt32 pos)
- {
- if (pos < (1 << 17))
- return (UInt32)(g_FastPos[pos >> 6] + 12);
- if (pos < (1 << 27))
- return (UInt32)(g_FastPos[pos >> 16] + 32);
- return (UInt32)(g_FastPos[pos >> 26] + 52);
- }
-
- Base.State _state = new Base.State();
- Byte _previousByte;
- UInt32[] _repDistances = new UInt32[Base.kNumRepDistances];
-
- void BaseInit()
- {
- _state.Init();
- _previousByte = 0;
- for (UInt32 i = 0; i < Base.kNumRepDistances; i++)
- _repDistances[i] = 0;
- }
-
- const int kDefaultDictionaryLogSize = 22;
- const UInt32 kNumFastBytesDefault = 0x20;
-
- class LiteralEncoder
- {
- public struct Encoder2
- {
- BitEncoder[] m_Encoders;
-
- public void Create() { m_Encoders = new BitEncoder[0x300]; }
-
- public void Init() { for (int i = 0; i < 0x300; i++) m_Encoders[i].Init(); }
-
- public void Encode(RangeCoder.Encoder rangeEncoder, byte symbol)
- {
- uint context = 1;
- for (int i = 7; i >= 0; i--)
- {
- uint bit = (uint)((symbol >> i) & 1);
- m_Encoders[context].Encode(rangeEncoder, bit);
- context = (context << 1) | bit;
- }
- }
-
- public void EncodeMatched(RangeCoder.Encoder rangeEncoder, byte matchByte, byte symbol)
- {
- uint context = 1;
- bool same = true;
- for (int i = 7; i >= 0; i--)
- {
- uint bit = (uint)((symbol >> i) & 1);
- uint state = context;
- if (same)
- {
- uint matchBit = (uint)((matchByte >> i) & 1);
- state += ((1 + matchBit) << 8);
- same = (matchBit == bit);
- }
- m_Encoders[state].Encode(rangeEncoder, bit);
- context = (context << 1) | bit;
- }
- }
-
- public uint GetPrice(bool matchMode, byte matchByte, byte symbol)
- {
- uint price = 0;
- uint context = 1;
- int i = 7;
- if (matchMode)
- {
- for (; i >= 0; i--)
- {
- uint matchBit = (uint)(matchByte >> i) & 1;
- uint bit = (uint)(symbol >> i) & 1;
- price += m_Encoders[((1 + matchBit) << 8) + context].GetPrice(bit);
- context = (context << 1) | bit;
- if (matchBit != bit)
- {
- i--;
- break;
- }
- }
- }
- for (; i >= 0; i--)
- {
- uint bit = (uint)(symbol >> i) & 1;
- price += m_Encoders[context].GetPrice(bit);
- context = (context << 1) | bit;
- }
- return price;
- }
- }
-
- Encoder2[] m_Coders;
- int m_NumPrevBits;
- int m_NumPosBits;
- uint m_PosMask;
-
- public void Create(int numPosBits, int numPrevBits)
- {
- if (m_Coders != null && m_NumPrevBits == numPrevBits && m_NumPosBits == numPosBits)
- return;
- m_NumPosBits = numPosBits;
- m_PosMask = ((uint)1 << numPosBits) - 1;
- m_NumPrevBits = numPrevBits;
- uint numStates = (uint)1 << (m_NumPrevBits + m_NumPosBits);
- m_Coders = new Encoder2[numStates];
- for (uint i = 0; i < numStates; i++)
- m_Coders[i].Create();
- }
-
- public void Init()
- {
- uint numStates = (uint)1 << (m_NumPrevBits + m_NumPosBits);
- for (uint i = 0; i < numStates; i++)
- m_Coders[i].Init();
- }
-
- public Encoder2 GetSubCoder(UInt32 pos, Byte prevByte)
- { return m_Coders[((pos & m_PosMask) << m_NumPrevBits) + (uint)(prevByte >> (8 - m_NumPrevBits))]; }
- }
-
- class LenEncoder
- {
- RangeCoder.BitEncoder _choice = new RangeCoder.BitEncoder();
- RangeCoder.BitEncoder _choice2 = new RangeCoder.BitEncoder();
- RangeCoder.BitTreeEncoder[] _lowCoder = new RangeCoder.BitTreeEncoder[Base.kNumPosStatesEncodingMax];
- RangeCoder.BitTreeEncoder[] _midCoder = new RangeCoder.BitTreeEncoder[Base.kNumPosStatesEncodingMax];
- RangeCoder.BitTreeEncoder _highCoder = new RangeCoder.BitTreeEncoder(Base.kNumHighLenBits);
-
- public LenEncoder()
- {
- for (UInt32 posState = 0; posState < Base.kNumPosStatesEncodingMax; posState++)
- {
- _lowCoder[posState] = new RangeCoder.BitTreeEncoder(Base.kNumLowLenBits);
- _midCoder[posState] = new RangeCoder.BitTreeEncoder(Base.kNumMidLenBits);
- }
- }
-
- public void Init(UInt32 numPosStates)
- {
- _choice.Init();
- _choice2.Init();
- for (UInt32 posState = 0; posState < numPosStates; posState++)
- {
- _lowCoder[posState].Init();
- _midCoder[posState].Init();
- }
- _highCoder.Init();
- }
-
- public void Encode(RangeCoder.Encoder rangeEncoder, UInt32 symbol, UInt32 posState)
- {
- if (symbol < Base.kNumLowLenSymbols)
- {
- _choice.Encode(rangeEncoder, 0);
- _lowCoder[posState].Encode(rangeEncoder, symbol);
- }
- else
- {
- symbol -= Base.kNumLowLenSymbols;
- _choice.Encode(rangeEncoder, 1);
- if (symbol < Base.kNumMidLenSymbols)
- {
- _choice2.Encode(rangeEncoder, 0);
- _midCoder[posState].Encode(rangeEncoder, symbol);
- }
- else
- {
- _choice2.Encode(rangeEncoder, 1);
- _highCoder.Encode(rangeEncoder, symbol - Base.kNumMidLenSymbols);
- }
- }
- }
-
- public void SetPrices(UInt32 posState, UInt32 numSymbols, UInt32[] prices, UInt32 st)
- {
- UInt32 a0 = _choice.GetPrice0();
- UInt32 a1 = _choice.GetPrice1();
- UInt32 b0 = a1 + _choice2.GetPrice0();
- UInt32 b1 = a1 + _choice2.GetPrice1();
- UInt32 i = 0;
- for (i = 0; i < Base.kNumLowLenSymbols; i++)
- {
- if (i >= numSymbols)
- return;
- prices[st + i] = a0 + _lowCoder[posState].GetPrice(i);
- }
- for (; i < Base.kNumLowLenSymbols + Base.kNumMidLenSymbols; i++)
- {
- if (i >= numSymbols)
- return;
- prices[st + i] = b0 + _midCoder[posState].GetPrice(i - Base.kNumLowLenSymbols);
- }
- for (; i < numSymbols; i++)
- prices[st + i] = b1 + _highCoder.GetPrice(i - Base.kNumLowLenSymbols - Base.kNumMidLenSymbols);
- }
- };
-
- const UInt32 kNumLenSpecSymbols = Base.kNumLowLenSymbols + Base.kNumMidLenSymbols;
-
- class LenPriceTableEncoder : LenEncoder
- {
- UInt32[] _prices = new UInt32[Base.kNumLenSymbols << Base.kNumPosStatesBitsEncodingMax];
- UInt32 _tableSize;
- UInt32[] _counters = new UInt32[Base.kNumPosStatesEncodingMax];
-
- public void SetTableSize(UInt32 tableSize) { _tableSize = tableSize; }
-
- public UInt32 GetPrice(UInt32 symbol, UInt32 posState)
- {
- return _prices[posState * Base.kNumLenSymbols + symbol];
- }
-
- void UpdateTable(UInt32 posState)
- {
- SetPrices(posState, _tableSize, _prices, posState * Base.kNumLenSymbols);
- _counters[posState] = _tableSize;
- }
-
- public void UpdateTables(UInt32 numPosStates)
- {
- for (UInt32 posState = 0; posState < numPosStates; posState++)
- UpdateTable(posState);
- }
-
- public new void Encode(RangeCoder.Encoder rangeEncoder, UInt32 symbol, UInt32 posState)
- {
- base.Encode(rangeEncoder, symbol, posState);
- if (--_counters[posState] == 0)
- UpdateTable(posState);
- }
- }
-
- const UInt32 kNumOpts = 1 << 12;
- class Optimal
- {
- public Base.State State;
-
- public bool Prev1IsChar;
- public bool Prev2;
-
- public UInt32 PosPrev2;
- public UInt32 BackPrev2;
-
- public UInt32 Price;
- public UInt32 PosPrev;
- public UInt32 BackPrev;
-
- public UInt32 Backs0;
- public UInt32 Backs1;
- public UInt32 Backs2;
- public UInt32 Backs3;
-
- public void MakeAsChar() { BackPrev = 0xFFFFFFFF; Prev1IsChar = false; }
- public void MakeAsShortRep() { BackPrev = 0; ; Prev1IsChar = false; }
- public bool IsShortRep() { return (BackPrev == 0); }
- };
- Optimal[] _optimum = new Optimal[kNumOpts];
- LZ.IMatchFinder _matchFinder = null;
- RangeCoder.Encoder _rangeEncoder = new RangeCoder.Encoder();
-
- RangeCoder.BitEncoder[] _isMatch = new RangeCoder.BitEncoder[Base.kNumStates << Base.kNumPosStatesBitsMax];
- RangeCoder.BitEncoder[] _isRep = new RangeCoder.BitEncoder[Base.kNumStates];
- RangeCoder.BitEncoder[] _isRepG0 = new RangeCoder.BitEncoder[Base.kNumStates];
- RangeCoder.BitEncoder[] _isRepG1 = new RangeCoder.BitEncoder[Base.kNumStates];
- RangeCoder.BitEncoder[] _isRepG2 = new RangeCoder.BitEncoder[Base.kNumStates];
- RangeCoder.BitEncoder[] _isRep0Long = new RangeCoder.BitEncoder[Base.kNumStates << Base.kNumPosStatesBitsMax];
-
- RangeCoder.BitTreeEncoder[] _posSlotEncoder = new RangeCoder.BitTreeEncoder[Base.kNumLenToPosStates];
-
- RangeCoder.BitEncoder[] _posEncoders = new RangeCoder.BitEncoder[Base.kNumFullDistances - Base.kEndPosModelIndex];
- RangeCoder.BitTreeEncoder _posAlignEncoder = new RangeCoder.BitTreeEncoder(Base.kNumAlignBits);
-
- LenPriceTableEncoder _lenEncoder = new LenPriceTableEncoder();
- LenPriceTableEncoder _repMatchLenEncoder = new LenPriceTableEncoder();
-
- LiteralEncoder _literalEncoder = new LiteralEncoder();
-
- UInt32[] _matchDistances = new UInt32[Base.kMatchMaxLen * 2 + 2];
-
- UInt32 _numFastBytes = kNumFastBytesDefault;
- UInt32 _longestMatchLength;
- UInt32 _numDistancePairs;
-
- UInt32 _additionalOffset;
-
- UInt32 _optimumEndIndex;
- UInt32 _optimumCurrentIndex;
-
- bool _longestMatchWasFound;
-
- UInt32[] _posSlotPrices = new UInt32[1 << (Base.kNumPosSlotBits + Base.kNumLenToPosStatesBits)];
- UInt32[] _distancesPrices = new UInt32[Base.kNumFullDistances << Base.kNumLenToPosStatesBits];
- UInt32[] _alignPrices = new UInt32[Base.kAlignTableSize];
- UInt32 _alignPriceCount;
-
- UInt32 _distTableSize = (kDefaultDictionaryLogSize * 2);
-
- int _posStateBits = 2;
- UInt32 _posStateMask = (4 - 1);
- int _numLiteralPosStateBits = 0;
- int _numLiteralContextBits = 3;
-
- UInt32 _dictionarySize = (1 << kDefaultDictionaryLogSize);
- UInt32 _dictionarySizePrev = 0xFFFFFFFF;
- UInt32 _numFastBytesPrev = 0xFFFFFFFF;
-
- Int64 nowPos64;
- bool _finished;
- System.IO.Stream _inStream;
-
- EMatchFinderType _matchFinderType = EMatchFinderType.BT4;
- bool _writeEndMark = false;
-
- bool _needReleaseMFStream;
-
- void Create()
- {
- if (_matchFinder == null)
- {
- LZ.BinTree bt = new LZ.BinTree();
- int numHashBytes = 4;
- if (_matchFinderType == EMatchFinderType.BT2)
- numHashBytes = 2;
- bt.SetType(numHashBytes);
- _matchFinder = bt;
- }
- _literalEncoder.Create(_numLiteralPosStateBits, _numLiteralContextBits);
-
- if (_dictionarySize == _dictionarySizePrev && _numFastBytesPrev == _numFastBytes)
- return;
- _matchFinder.Create(_dictionarySize, kNumOpts, _numFastBytes, Base.kMatchMaxLen + 1);
- _dictionarySizePrev = _dictionarySize;
- _numFastBytesPrev = _numFastBytes;
- }
-
- public Encoder()
- {
- for (int i = 0; i < kNumOpts; i++)
- _optimum[i] = new Optimal();
- for (int i = 0; i < Base.kNumLenToPosStates; i++)
- _posSlotEncoder[i] = new RangeCoder.BitTreeEncoder(Base.kNumPosSlotBits);
- }
-
- void SetWriteEndMarkerMode(bool writeEndMarker)
- {
- _writeEndMark = writeEndMarker;
- }
-
- void Init()
- {
- BaseInit();
- _rangeEncoder.Init();
-
- uint i;
- for (i = 0; i < Base.kNumStates; i++)
- {
- for (uint j = 0; j <= _posStateMask; j++)
- {
- uint complexState = (i << Base.kNumPosStatesBitsMax) + j;
- _isMatch[complexState].Init();
- _isRep0Long[complexState].Init();
- }
- _isRep[i].Init();
- _isRepG0[i].Init();
- _isRepG1[i].Init();
- _isRepG2[i].Init();
- }
- _literalEncoder.Init();
- for (i = 0; i < Base.kNumLenToPosStates; i++)
- _posSlotEncoder[i].Init();
- for (i = 0; i < Base.kNumFullDistances - Base.kEndPosModelIndex; i++)
- _posEncoders[i].Init();
-
- _lenEncoder.Init((UInt32)1 << _posStateBits);
- _repMatchLenEncoder.Init((UInt32)1 << _posStateBits);
-
- _posAlignEncoder.Init();
-
- _longestMatchWasFound = false;
- _optimumEndIndex = 0;
- _optimumCurrentIndex = 0;
- _additionalOffset = 0;
- }
-
- void ReadMatchDistances(out UInt32 lenRes, out UInt32 numDistancePairs)
- {
- lenRes = 0;
- numDistancePairs = _matchFinder.GetMatches(_matchDistances);
- if (numDistancePairs > 0)
- {
- lenRes = _matchDistances[numDistancePairs - 2];
- if (lenRes == _numFastBytes)
- lenRes += _matchFinder.GetMatchLen((int)lenRes - 1, _matchDistances[numDistancePairs - 1],
- Base.kMatchMaxLen - lenRes);
- }
- _additionalOffset++;
- }
-
-
- void MovePos(UInt32 num)
- {
- if (num > 0)
- {
- _matchFinder.Skip(num);
- _additionalOffset += num;
- }
- }
-
- UInt32 GetRepLen1Price(Base.State state, UInt32 posState)
- {
- return _isRepG0[state.Index].GetPrice0() +
- _isRep0Long[(state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice0();
- }
-
- UInt32 GetPureRepPrice(UInt32 repIndex, Base.State state, UInt32 posState)
- {
- UInt32 price;
- if (repIndex == 0)
- {
- price = _isRepG0[state.Index].GetPrice0();
- price += _isRep0Long[(state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice1();
- }
- else
- {
- price = _isRepG0[state.Index].GetPrice1();
- if (repIndex == 1)
- price += _isRepG1[state.Index].GetPrice0();
- else
- {
- price += _isRepG1[state.Index].GetPrice1();
- price += _isRepG2[state.Index].GetPrice(repIndex - 2);
- }
- }
- return price;
- }
-
- UInt32 GetRepPrice(UInt32 repIndex, UInt32 len, Base.State state, UInt32 posState)
- {
- UInt32 price = _repMatchLenEncoder.GetPrice(len - Base.kMatchMinLen, posState);
- return price + GetPureRepPrice(repIndex, state, posState);
- }
-
- UInt32 GetPosLenPrice(UInt32 pos, UInt32 len, UInt32 posState)
- {
- UInt32 price;
- UInt32 lenToPosState = Base.GetLenToPosState(len);
- if (pos < Base.kNumFullDistances)
- price = _distancesPrices[(lenToPosState * Base.kNumFullDistances) + pos];
- else
- price = _posSlotPrices[(lenToPosState << Base.kNumPosSlotBits) + GetPosSlot2(pos)] +
- _alignPrices[pos & Base.kAlignMask];
- return price + _lenEncoder.GetPrice(len - Base.kMatchMinLen, posState);
- }
-
- UInt32 Backward(out UInt32 backRes, UInt32 cur)
- {
- _optimumEndIndex = cur;
- UInt32 posMem = _optimum[cur].PosPrev;
- UInt32 backMem = _optimum[cur].BackPrev;
- do
- {
- if (_optimum[cur].Prev1IsChar)
- {
- _optimum[posMem].MakeAsChar();
- _optimum[posMem].PosPrev = posMem - 1;
- if (_optimum[cur].Prev2)
- {
- _optimum[posMem - 1].Prev1IsChar = false;
- _optimum[posMem - 1].PosPrev = _optimum[cur].PosPrev2;
- _optimum[posMem - 1].BackPrev = _optimum[cur].BackPrev2;
- }
- }
- UInt32 posPrev = posMem;
- UInt32 backCur = backMem;
-
- backMem = _optimum[posPrev].BackPrev;
- posMem = _optimum[posPrev].PosPrev;
-
- _optimum[posPrev].BackPrev = backCur;
- _optimum[posPrev].PosPrev = cur;
- cur = posPrev;
- }
- while (cur > 0);
- backRes = _optimum[0].BackPrev;
- _optimumCurrentIndex = _optimum[0].PosPrev;
- return _optimumCurrentIndex;
- }
-
- UInt32[] reps = new UInt32[Base.kNumRepDistances];
- UInt32[] repLens = new UInt32[Base.kNumRepDistances];
-
-
- UInt32 GetOptimum(UInt32 position, out UInt32 backRes)
- {
- if (_optimumEndIndex != _optimumCurrentIndex)
- {
- UInt32 lenRes = _optimum[_optimumCurrentIndex].PosPrev - _optimumCurrentIndex;
- backRes = _optimum[_optimumCurrentIndex].BackPrev;
- _optimumCurrentIndex = _optimum[_optimumCurrentIndex].PosPrev;
- return lenRes;
- }
- _optimumCurrentIndex = _optimumEndIndex = 0;
-
- UInt32 lenMain, numDistancePairs;
- if (!_longestMatchWasFound)
- {
- ReadMatchDistances(out lenMain, out numDistancePairs);
- }
- else
- {
- lenMain = _longestMatchLength;
- numDistancePairs = _numDistancePairs;
- _longestMatchWasFound = false;
- }
-
- UInt32 numAvailableBytes = _matchFinder.GetNumAvailableBytes() + 1;
- if (numAvailableBytes < 2)
- {
- backRes = 0xFFFFFFFF;
- return 1;
- }
- if (numAvailableBytes > Base.kMatchMaxLen)
- numAvailableBytes = Base.kMatchMaxLen;
-
- UInt32 repMaxIndex = 0;
- UInt32 i;
- for (i = 0; i < Base.kNumRepDistances; i++)
- {
- reps[i] = _repDistances[i];
- repLens[i] = _matchFinder.GetMatchLen(0 - 1, reps[i], Base.kMatchMaxLen);
- if (repLens[i] > repLens[repMaxIndex])
- repMaxIndex = i;
- }
- if (repLens[repMaxIndex] >= _numFastBytes)
- {
- backRes = repMaxIndex;
- UInt32 lenRes = repLens[repMaxIndex];
- MovePos(lenRes - 1);
- return lenRes;
- }
-
- if (lenMain >= _numFastBytes)
- {
- backRes = _matchDistances[numDistancePairs - 1] + Base.kNumRepDistances;
- MovePos(lenMain - 1);
- return lenMain;
- }
-
- Byte currentByte = _matchFinder.GetIndexByte(0 - 1);
- Byte matchByte = _matchFinder.GetIndexByte((Int32)(0 - _repDistances[0] - 1 - 1));
-
- if (lenMain < 2 && currentByte != matchByte && repLens[repMaxIndex] < 2)
- {
- backRes = (UInt32)0xFFFFFFFF;
- return 1;
- }
-
- _optimum[0].State = _state;
-
- UInt32 posState = (position & _posStateMask);
-
- _optimum[1].Price = _isMatch[(_state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice0() +
- _literalEncoder.GetSubCoder(position, _previousByte).GetPrice(!_state.IsCharState(), matchByte, currentByte);
- _optimum[1].MakeAsChar();
-
- UInt32 matchPrice = _isMatch[(_state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice1();
- UInt32 repMatchPrice = matchPrice + _isRep[_state.Index].GetPrice1();
-
- if (matchByte == currentByte)
- {
- UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(_state, posState);
- if (shortRepPrice < _optimum[1].Price)
- {
- _optimum[1].Price = shortRepPrice;
- _optimum[1].MakeAsShortRep();
- }
- }
-
- UInt32 lenEnd = ((lenMain >= repLens[repMaxIndex]) ? lenMain : repLens[repMaxIndex]);
-
- if(lenEnd < 2)
- {
- backRes = _optimum[1].BackPrev;
- return 1;
- }
-
- _optimum[1].PosPrev = 0;
-
- _optimum[0].Backs0 = reps[0];
- _optimum[0].Backs1 = reps[1];
- _optimum[0].Backs2 = reps[2];
- _optimum[0].Backs3 = reps[3];
-
- UInt32 len = lenEnd;
- do
- _optimum[len--].Price = kIfinityPrice;
- while (len >= 2);
-
- for (i = 0; i < Base.kNumRepDistances; i++)
- {
- UInt32 repLen = repLens[i];
- if (repLen < 2)
- continue;
- UInt32 price = repMatchPrice + GetPureRepPrice(i, _state, posState);
- do
- {
- UInt32 curAndLenPrice = price + _repMatchLenEncoder.GetPrice(repLen - 2, posState);
- Optimal optimum = _optimum[repLen];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = 0;
- optimum.BackPrev = i;
- optimum.Prev1IsChar = false;
- }
- }
- while (--repLen >= 2);
- }
-
- UInt32 normalMatchPrice = matchPrice + _isRep[_state.Index].GetPrice0();
-
- len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2);
- if (len <= lenMain)
- {
- UInt32 offs = 0;
- while (len > _matchDistances[offs])
- offs += 2;
- for (; ; len++)
- {
- UInt32 distance = _matchDistances[offs + 1];
- UInt32 curAndLenPrice = normalMatchPrice + GetPosLenPrice(distance, len, posState);
- Optimal optimum = _optimum[len];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = 0;
- optimum.BackPrev = distance + Base.kNumRepDistances;
- optimum.Prev1IsChar = false;
- }
- if (len == _matchDistances[offs])
- {
- offs += 2;
- if (offs == numDistancePairs)
- break;
- }
- }
- }
-
- UInt32 cur = 0;
-
- while (true)
- {
- cur++;
- if (cur == lenEnd)
- return Backward(out backRes, cur);
- UInt32 newLen;
- ReadMatchDistances(out newLen, out numDistancePairs);
- if (newLen >= _numFastBytes)
- {
- _numDistancePairs = numDistancePairs;
- _longestMatchLength = newLen;
- _longestMatchWasFound = true;
- return Backward(out backRes, cur);
- }
- position++;
- UInt32 posPrev = _optimum[cur].PosPrev;
- Base.State state;
- if (_optimum[cur].Prev1IsChar)
- {
- posPrev--;
- if (_optimum[cur].Prev2)
- {
- state = _optimum[_optimum[cur].PosPrev2].State;
- if (_optimum[cur].BackPrev2 < Base.kNumRepDistances)
- state.UpdateRep();
- else
- state.UpdateMatch();
- }
- else
- state = _optimum[posPrev].State;
- state.UpdateChar();
- }
- else
- state = _optimum[posPrev].State;
- if (posPrev == cur - 1)
- {
- if (_optimum[cur].IsShortRep())
- state.UpdateShortRep();
- else
- state.UpdateChar();
- }
- else
- {
- UInt32 pos;
- if (_optimum[cur].Prev1IsChar && _optimum[cur].Prev2)
- {
- posPrev = _optimum[cur].PosPrev2;
- pos = _optimum[cur].BackPrev2;
- state.UpdateRep();
- }
- else
- {
- pos = _optimum[cur].BackPrev;
- if (pos < Base.kNumRepDistances)
- state.UpdateRep();
- else
- state.UpdateMatch();
- }
- Optimal opt = _optimum[posPrev];
- if (pos < Base.kNumRepDistances)
- {
- if (pos == 0)
- {
- reps[0] = opt.Backs0;
- reps[1] = opt.Backs1;
- reps[2] = opt.Backs2;
- reps[3] = opt.Backs3;
- }
- else if (pos == 1)
- {
- reps[0] = opt.Backs1;
- reps[1] = opt.Backs0;
- reps[2] = opt.Backs2;
- reps[3] = opt.Backs3;
- }
- else if (pos == 2)
- {
- reps[0] = opt.Backs2;
- reps[1] = opt.Backs0;
- reps[2] = opt.Backs1;
- reps[3] = opt.Backs3;
- }
- else
- {
- reps[0] = opt.Backs3;
- reps[1] = opt.Backs0;
- reps[2] = opt.Backs1;
- reps[3] = opt.Backs2;
- }
- }
- else
- {
- reps[0] = (pos - Base.kNumRepDistances);
- reps[1] = opt.Backs0;
- reps[2] = opt.Backs1;
- reps[3] = opt.Backs2;
- }
- }
- _optimum[cur].State = state;
- _optimum[cur].Backs0 = reps[0];
- _optimum[cur].Backs1 = reps[1];
- _optimum[cur].Backs2 = reps[2];
- _optimum[cur].Backs3 = reps[3];
- UInt32 curPrice = _optimum[cur].Price;
-
- currentByte = _matchFinder.GetIndexByte(0 - 1);
- matchByte = _matchFinder.GetIndexByte((Int32)(0 - reps[0] - 1 - 1));
-
- posState = (position & _posStateMask);
-
- UInt32 curAnd1Price = curPrice +
- _isMatch[(state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice0() +
- _literalEncoder.GetSubCoder(position, _matchFinder.GetIndexByte(0 - 2)).
- GetPrice(!state.IsCharState(), matchByte, currentByte);
-
- Optimal nextOptimum = _optimum[cur + 1];
-
- bool nextIsChar = false;
- if (curAnd1Price < nextOptimum.Price)
- {
- nextOptimum.Price = curAnd1Price;
- nextOptimum.PosPrev = cur;
- nextOptimum.MakeAsChar();
- nextIsChar = true;
- }
-
- matchPrice = curPrice + _isMatch[(state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice1();
- repMatchPrice = matchPrice + _isRep[state.Index].GetPrice1();
-
- if (matchByte == currentByte &&
- !(nextOptimum.PosPrev < cur && nextOptimum.BackPrev == 0))
- {
- UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(state, posState);
- if (shortRepPrice <= nextOptimum.Price)
- {
- nextOptimum.Price = shortRepPrice;
- nextOptimum.PosPrev = cur;
- nextOptimum.MakeAsShortRep();
- nextIsChar = true;
- }
- }
-
- UInt32 numAvailableBytesFull = _matchFinder.GetNumAvailableBytes() + 1;
- numAvailableBytesFull = Math.Min(kNumOpts - 1 - cur, numAvailableBytesFull);
- numAvailableBytes = numAvailableBytesFull;
-
- if (numAvailableBytes < 2)
- continue;
- if (numAvailableBytes > _numFastBytes)
- numAvailableBytes = _numFastBytes;
- if (!nextIsChar && matchByte != currentByte)
- {
- // try Literal + rep0
- UInt32 t = Math.Min(numAvailableBytesFull - 1, _numFastBytes);
- UInt32 lenTest2 = _matchFinder.GetMatchLen(0, reps[0], t);
- if (lenTest2 >= 2)
- {
- Base.State state2 = state;
- state2.UpdateChar();
- UInt32 posStateNext = (position + 1) & _posStateMask;
- UInt32 nextRepMatchPrice = curAnd1Price +
- _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) + posStateNext].GetPrice1() +
- _isRep[state2.Index].GetPrice1();
- {
- UInt32 offset = cur + 1 + lenTest2;
- while (lenEnd < offset)
- _optimum[++lenEnd].Price = kIfinityPrice;
- UInt32 curAndLenPrice = nextRepMatchPrice + GetRepPrice(
- 0, lenTest2, state2, posStateNext);
- Optimal optimum = _optimum[offset];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur + 1;
- optimum.BackPrev = 0;
- optimum.Prev1IsChar = true;
- optimum.Prev2 = false;
- }
- }
- }
- }
-
- UInt32 startLen = 2; // speed optimization
-
- for (UInt32 repIndex = 0; repIndex < Base.kNumRepDistances; repIndex++)
- {
- UInt32 lenTest = _matchFinder.GetMatchLen(0 - 1, reps[repIndex], numAvailableBytes);
- if (lenTest < 2)
- continue;
- UInt32 lenTestTemp = lenTest;
- do
- {
- while (lenEnd < cur + lenTest)
- _optimum[++lenEnd].Price = kIfinityPrice;
- UInt32 curAndLenPrice = repMatchPrice + GetRepPrice(repIndex, lenTest, state, posState);
- Optimal optimum = _optimum[cur + lenTest];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur;
- optimum.BackPrev = repIndex;
- optimum.Prev1IsChar = false;
- }
- }
- while(--lenTest >= 2);
- lenTest = lenTestTemp;
-
- if (repIndex == 0)
- startLen = lenTest + 1;
-
- // if (_maxMode)
- if (lenTest < numAvailableBytesFull)
- {
- UInt32 t = Math.Min(numAvailableBytesFull - 1 - lenTest, _numFastBytes);
- UInt32 lenTest2 = _matchFinder.GetMatchLen((Int32)lenTest, reps[repIndex], t);
- if (lenTest2 >= 2)
- {
- Base.State state2 = state;
- state2.UpdateRep();
- UInt32 posStateNext = (position + lenTest) & _posStateMask;
- UInt32 curAndLenCharPrice =
- repMatchPrice + GetRepPrice(repIndex, lenTest, state, posState) +
- _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) + posStateNext].GetPrice0() +
- _literalEncoder.GetSubCoder(position + lenTest,
- _matchFinder.GetIndexByte((Int32)lenTest - 1 - 1)).GetPrice(true,
- _matchFinder.GetIndexByte((Int32)((Int32)lenTest - 1 - (Int32)(reps[repIndex] + 1))),
- _matchFinder.GetIndexByte((Int32)lenTest - 1));
- state2.UpdateChar();
- posStateNext = (position + lenTest + 1) & _posStateMask;
- UInt32 nextMatchPrice = curAndLenCharPrice + _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) + posStateNext].GetPrice1();
- UInt32 nextRepMatchPrice = nextMatchPrice + _isRep[state2.Index].GetPrice1();
-
- // for(; lenTest2 >= 2; lenTest2--)
- {
- UInt32 offset = lenTest + 1 + lenTest2;
- while(lenEnd < cur + offset)
- _optimum[++lenEnd].Price = kIfinityPrice;
- UInt32 curAndLenPrice = nextRepMatchPrice + GetRepPrice(0, lenTest2, state2, posStateNext);
- Optimal optimum = _optimum[cur + offset];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur + lenTest + 1;
- optimum.BackPrev = 0;
- optimum.Prev1IsChar = true;
- optimum.Prev2 = true;
- optimum.PosPrev2 = cur;
- optimum.BackPrev2 = repIndex;
- }
- }
- }
- }
- }
-
- if (newLen > numAvailableBytes)
- {
- newLen = numAvailableBytes;
- for (numDistancePairs = 0; newLen > _matchDistances[numDistancePairs]; numDistancePairs += 2) ;
- _matchDistances[numDistancePairs] = newLen;
- numDistancePairs += 2;
- }
- if (newLen >= startLen)
- {
- normalMatchPrice = matchPrice + _isRep[state.Index].GetPrice0();
- while (lenEnd < cur + newLen)
- _optimum[++lenEnd].Price = kIfinityPrice;
-
- UInt32 offs = 0;
- while (startLen > _matchDistances[offs])
- offs += 2;
-
- for (UInt32 lenTest = startLen; ; lenTest++)
- {
- UInt32 curBack = _matchDistances[offs + 1];
- UInt32 curAndLenPrice = normalMatchPrice + GetPosLenPrice(curBack, lenTest, posState);
- Optimal optimum = _optimum[cur + lenTest];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur;
- optimum.BackPrev = curBack + Base.kNumRepDistances;
- optimum.Prev1IsChar = false;
- }
-
- if (lenTest == _matchDistances[offs])
- {
- if (lenTest < numAvailableBytesFull)
- {
- UInt32 t = Math.Min(numAvailableBytesFull - 1 - lenTest, _numFastBytes);
- UInt32 lenTest2 = _matchFinder.GetMatchLen((Int32)lenTest, curBack, t);
- if (lenTest2 >= 2)
- {
- Base.State state2 = state;
- state2.UpdateMatch();
- UInt32 posStateNext = (position + lenTest) & _posStateMask;
- UInt32 curAndLenCharPrice = curAndLenPrice +
- _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) + posStateNext].GetPrice0() +
- _literalEncoder.GetSubCoder(position + lenTest,
- _matchFinder.GetIndexByte((Int32)lenTest - 1 - 1)).
- GetPrice(true,
- _matchFinder.GetIndexByte((Int32)lenTest - (Int32)(curBack + 1) - 1),
- _matchFinder.GetIndexByte((Int32)lenTest - 1));
- state2.UpdateChar();
- posStateNext = (position + lenTest + 1) & _posStateMask;
- UInt32 nextMatchPrice = curAndLenCharPrice + _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) + posStateNext].GetPrice1();
- UInt32 nextRepMatchPrice = nextMatchPrice + _isRep[state2.Index].GetPrice1();
-
- UInt32 offset = lenTest + 1 + lenTest2;
- while (lenEnd < cur + offset)
- _optimum[++lenEnd].Price = kIfinityPrice;
- curAndLenPrice = nextRepMatchPrice + GetRepPrice(0, lenTest2, state2, posStateNext);
- optimum = _optimum[cur + offset];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur + lenTest + 1;
- optimum.BackPrev = 0;
- optimum.Prev1IsChar = true;
- optimum.Prev2 = true;
- optimum.PosPrev2 = cur;
- optimum.BackPrev2 = curBack + Base.kNumRepDistances;
- }
- }
- }
- offs += 2;
- if (offs == numDistancePairs)
- break;
- }
- }
- }
- }
- }
-
- bool ChangePair(UInt32 smallDist, UInt32 bigDist)
- {
- const int kDif = 7;
- return (smallDist < ((UInt32)(1) << (32 - kDif)) && bigDist >= (smallDist << kDif));
- }
-
- void WriteEndMarker(UInt32 posState)
- {
- if (!_writeEndMark)
- return;
-
- _isMatch[(_state.Index << Base.kNumPosStatesBitsMax) + posState].Encode(_rangeEncoder, 1);
- _isRep[_state.Index].Encode(_rangeEncoder, 0);
- _state.UpdateMatch();
- UInt32 len = Base.kMatchMinLen;
- _lenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState);
- UInt32 posSlot = (1 << Base.kNumPosSlotBits) - 1;
- UInt32 lenToPosState = Base.GetLenToPosState(len);
- _posSlotEncoder[lenToPosState].Encode(_rangeEncoder, posSlot);
- int footerBits = 30;
- UInt32 posReduced = (((UInt32)1) << footerBits) - 1;
- _rangeEncoder.EncodeDirectBits(posReduced >> Base.kNumAlignBits, footerBits - Base.kNumAlignBits);
- _posAlignEncoder.ReverseEncode(_rangeEncoder, posReduced & Base.kAlignMask);
- }
-
- void Flush(UInt32 nowPos)
- {
- ReleaseMFStream();
- WriteEndMarker(nowPos & _posStateMask);
- _rangeEncoder.FlushData();
- _rangeEncoder.FlushStream();
- }
-
- public void CodeOneBlock(out Int64 inSize, out Int64 outSize, out bool finished)
- {
- inSize = 0;
- outSize = 0;
- finished = true;
-
- if (_inStream != null)
- {
- _matchFinder.SetStream(_inStream);
- _matchFinder.Init();
- _needReleaseMFStream = true;
- _inStream = null;
- if (_trainSize > 0)
- _matchFinder.Skip(_trainSize);
- }
-
- if (_finished)
- return;
- _finished = true;
-
-
- Int64 progressPosValuePrev = nowPos64;
- if (nowPos64 == 0)
- {
- if (_matchFinder.GetNumAvailableBytes() == 0)
- {
- Flush((UInt32)nowPos64);
- return;
- }
- UInt32 len, numDistancePairs; // it's not used
- ReadMatchDistances(out len, out numDistancePairs);
- UInt32 posState = (UInt32)(nowPos64) & _posStateMask;
- _isMatch[(_state.Index << Base.kNumPosStatesBitsMax) + posState].Encode(_rangeEncoder, 0);
- _state.UpdateChar();
- Byte curByte = _matchFinder.GetIndexByte((Int32)(0 - _additionalOffset));
- _literalEncoder.GetSubCoder((UInt32)(nowPos64), _previousByte).Encode(_rangeEncoder, curByte);
- _previousByte = curByte;
- _additionalOffset--;
- nowPos64++;
- }
- if (_matchFinder.GetNumAvailableBytes() == 0)
- {
- Flush((UInt32)nowPos64);
- return;
- }
- while (true)
- {
- UInt32 pos;
- UInt32 len = GetOptimum((UInt32)nowPos64, out pos);
-
- UInt32 posState = ((UInt32)nowPos64) & _posStateMask;
- UInt32 complexState = (_state.Index << Base.kNumPosStatesBitsMax) + posState;
- if (len == 1 && pos == 0xFFFFFFFF)
- {
- _isMatch[complexState].Encode(_rangeEncoder, 0);
- Byte curByte = _matchFinder.GetIndexByte((Int32)(0 - _additionalOffset));
- LiteralEncoder.Encoder2 subCoder = _literalEncoder.GetSubCoder((UInt32)nowPos64, _previousByte);
- if (!_state.IsCharState())
- {
- Byte matchByte = _matchFinder.GetIndexByte((Int32)(0 - _repDistances[0] - 1 - _additionalOffset));
- subCoder.EncodeMatched(_rangeEncoder, matchByte, curByte);
- }
- else
- subCoder.Encode(_rangeEncoder, curByte);
- _previousByte = curByte;
- _state.UpdateChar();
- }
- else
- {
- _isMatch[complexState].Encode(_rangeEncoder, 1);
- if (pos < Base.kNumRepDistances)
- {
- _isRep[_state.Index].Encode(_rangeEncoder, 1);
- if (pos == 0)
- {
- _isRepG0[_state.Index].Encode(_rangeEncoder, 0);
- if (len == 1)
- _isRep0Long[complexState].Encode(_rangeEncoder, 0);
- else
- _isRep0Long[complexState].Encode(_rangeEncoder, 1);
- }
- else
- {
- _isRepG0[_state.Index].Encode(_rangeEncoder, 1);
- if (pos == 1)
- _isRepG1[_state.Index].Encode(_rangeEncoder, 0);
- else
- {
- _isRepG1[_state.Index].Encode(_rangeEncoder, 1);
- _isRepG2[_state.Index].Encode(_rangeEncoder, pos - 2);
- }
- }
- if (len == 1)
- _state.UpdateShortRep();
- else
- {
- _repMatchLenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState);
- _state.UpdateRep();
- }
- UInt32 distance = _repDistances[pos];
- if (pos != 0)
- {
- for (UInt32 i = pos; i >= 1; i--)
- _repDistances[i] = _repDistances[i - 1];
- _repDistances[0] = distance;
- }
- }
- else
- {
- _isRep[_state.Index].Encode(_rangeEncoder, 0);
- _state.UpdateMatch();
- _lenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState);
- pos -= Base.kNumRepDistances;
- UInt32 posSlot = GetPosSlot(pos);
- UInt32 lenToPosState = Base.GetLenToPosState(len);
- _posSlotEncoder[lenToPosState].Encode(_rangeEncoder, posSlot);
-
- if (posSlot >= Base.kStartPosModelIndex)
- {
- int footerBits = (int)((posSlot >> 1) - 1);
- UInt32 baseVal = ((2 | (posSlot & 1)) << footerBits);
- UInt32 posReduced = pos - baseVal;
-
- if (posSlot < Base.kEndPosModelIndex)
- RangeCoder.BitTreeEncoder.ReverseEncode(_posEncoders,
- baseVal - posSlot - 1, _rangeEncoder, footerBits, posReduced);
- else
- {
- _rangeEncoder.EncodeDirectBits(posReduced >> Base.kNumAlignBits, footerBits - Base.kNumAlignBits);
- _posAlignEncoder.ReverseEncode(_rangeEncoder, posReduced & Base.kAlignMask);
- _alignPriceCount++;
- }
- }
- UInt32 distance = pos;
- for (UInt32 i = Base.kNumRepDistances - 1; i >= 1; i--)
- _repDistances[i] = _repDistances[i - 1];
- _repDistances[0] = distance;
- _matchPriceCount++;
- }
- _previousByte = _matchFinder.GetIndexByte((Int32)(len - 1 - _additionalOffset));
- }
- _additionalOffset -= len;
- nowPos64 += len;
- if (_additionalOffset == 0)
- {
- // if (!_fastMode)
- if (_matchPriceCount >= (1 << 7))
- FillDistancesPrices();
- if (_alignPriceCount >= Base.kAlignTableSize)
- FillAlignPrices();
- inSize = nowPos64;
- outSize = _rangeEncoder.GetProcessedSizeAdd();
- if (_matchFinder.GetNumAvailableBytes() == 0)
- {
- Flush((UInt32)nowPos64);
- return;
- }
-
- if (nowPos64 - progressPosValuePrev >= (1 << 12))
- {
- _finished = false;
- finished = false;
- return;
- }
- }
- }
- }
-
- void ReleaseMFStream()
- {
- if (_matchFinder != null && _needReleaseMFStream)
- {
- _matchFinder.ReleaseStream();
- _needReleaseMFStream = false;
- }
- }
-
- void SetOutStream(System.IO.Stream outStream) { _rangeEncoder.SetStream(outStream); }
- void ReleaseOutStream() { _rangeEncoder.ReleaseStream(); }
-
- void ReleaseStreams()
- {
- ReleaseMFStream();
- ReleaseOutStream();
- }
-
- void SetStreams(System.IO.Stream inStream, System.IO.Stream outStream,
- Int64 inSize, Int64 outSize)
- {
- _inStream = inStream;
- _finished = false;
- Create();
- SetOutStream(outStream);
- Init();
-
- // if (!_fastMode)
- {
- FillDistancesPrices();
- FillAlignPrices();
- }
-
- _lenEncoder.SetTableSize(_numFastBytes + 1 - Base.kMatchMinLen);
- _lenEncoder.UpdateTables((UInt32)1 << _posStateBits);
- _repMatchLenEncoder.SetTableSize(_numFastBytes + 1 - Base.kMatchMinLen);
- _repMatchLenEncoder.UpdateTables((UInt32)1 << _posStateBits);
-
- nowPos64 = 0;
- }
-
-
- public void Code(System.IO.Stream inStream, System.IO.Stream outStream,
- Int64 inSize, Int64 outSize, ICodeProgress progress)
- {
- _needReleaseMFStream = false;
- try
- {
- SetStreams(inStream, outStream, inSize, outSize);
- while (true)
- {
- Int64 processedInSize;
- Int64 processedOutSize;
- bool finished;
- CodeOneBlock(out processedInSize, out processedOutSize, out finished);
- if (finished)
- return;
- if (progress != null)
- {
- progress.SetProgress(processedInSize, processedOutSize);
- }
- }
- }
- finally
- {
- ReleaseStreams();
- }
- }
-
- const int kPropSize = 5;
- Byte[] properties = new Byte[kPropSize];
-
- public void WriteCoderProperties(System.IO.Stream outStream)
- {
- properties[0] = (Byte)((_posStateBits * 5 + _numLiteralPosStateBits) * 9 + _numLiteralContextBits);
- for (int i = 0; i < 4; i++)
- properties[1 + i] = (Byte)((_dictionarySize >> (8 * i)) & 0xFF);
- outStream.Write(properties, 0, kPropSize);
- }
-
- UInt32[] tempPrices = new UInt32[Base.kNumFullDistances];
- UInt32 _matchPriceCount;
-
- void FillDistancesPrices()
- {
- for (UInt32 i = Base.kStartPosModelIndex; i < Base.kNumFullDistances; i++)
- {
- UInt32 posSlot = GetPosSlot(i);
- int footerBits = (int)((posSlot >> 1) - 1);
- UInt32 baseVal = ((2 | (posSlot & 1)) << footerBits);
- tempPrices[i] = BitTreeEncoder.ReverseGetPrice(_posEncoders,
- baseVal - posSlot - 1, footerBits, i - baseVal);
- }
-
- for (UInt32 lenToPosState = 0; lenToPosState < Base.kNumLenToPosStates; lenToPosState++)
- {
- UInt32 posSlot;
- RangeCoder.BitTreeEncoder encoder = _posSlotEncoder[lenToPosState];
-
- UInt32 st = (lenToPosState << Base.kNumPosSlotBits);
- for (posSlot = 0; posSlot < _distTableSize; posSlot++)
- _posSlotPrices[st + posSlot] = encoder.GetPrice(posSlot);
- for (posSlot = Base.kEndPosModelIndex; posSlot < _distTableSize; posSlot++)
- _posSlotPrices[st + posSlot] += ((((posSlot >> 1) - 1) - Base.kNumAlignBits) << RangeCoder.BitEncoder.kNumBitPriceShiftBits);
-
- UInt32 st2 = lenToPosState * Base.kNumFullDistances;
- UInt32 i;
- for (i = 0; i < Base.kStartPosModelIndex; i++)
- _distancesPrices[st2 + i] = _posSlotPrices[st + i];
- for (; i < Base.kNumFullDistances; i++)
- _distancesPrices[st2 + i] = _posSlotPrices[st + GetPosSlot(i)] + tempPrices[i];
- }
- _matchPriceCount = 0;
- }
-
- void FillAlignPrices()
- {
- for (UInt32 i = 0; i < Base.kAlignTableSize; i++)
- _alignPrices[i] = _posAlignEncoder.ReverseGetPrice(i);
- _alignPriceCount = 0;
- }
-
-
- static string[] kMatchFinderIDs =
- {
- "BT2",
- "BT4",
- };
-
- static int FindMatchFinder(string s)
- {
- for (int m = 0; m < kMatchFinderIDs.Length; m++)
- if (s == kMatchFinderIDs[m])
- return m;
- return -1;
- }
-
- public void SetCoderProperties(CoderPropID[] propIDs, object[] properties)
- {
- for (UInt32 i = 0; i < properties.Length; i++)
- {
- object prop = properties[i];
- switch (propIDs[i])
- {
- case CoderPropID.NumFastBytes:
- {
- if (!(prop is Int32))
- throw new InvalidParamException();
- Int32 numFastBytes = (Int32)prop;
- if (numFastBytes < 5 || numFastBytes > Base.kMatchMaxLen)
- throw new InvalidParamException();
- _numFastBytes = (UInt32)numFastBytes;
- break;
- }
- case CoderPropID.Algorithm:
- {
- /*
- if (!(prop is Int32))
- throw new InvalidParamException();
- Int32 maximize = (Int32)prop;
- _fastMode = (maximize == 0);
- _maxMode = (maximize >= 2);
- */
- break;
- }
- case CoderPropID.MatchFinder:
- {
- if (!(prop is String))
- throw new InvalidParamException();
- EMatchFinderType matchFinderIndexPrev = _matchFinderType;
- int m = FindMatchFinder(((string)prop).ToUpper());
- if (m < 0)
- throw new InvalidParamException();
- _matchFinderType = (EMatchFinderType)m;
- if (_matchFinder != null && matchFinderIndexPrev != _matchFinderType)
- {
- _dictionarySizePrev = 0xFFFFFFFF;
- _matchFinder = null;
- }
- break;
- }
- case CoderPropID.DictionarySize:
- {
- const int kDicLogSizeMaxCompress = 30;
- if (!(prop is Int32))
- throw new InvalidParamException(); ;
- Int32 dictionarySize = (Int32)prop;
- if (dictionarySize < (UInt32)(1 << Base.kDicLogSizeMin) ||
- dictionarySize > (UInt32)(1 << kDicLogSizeMaxCompress))
- throw new InvalidParamException();
- _dictionarySize = (UInt32)dictionarySize;
- int dicLogSize;
- for (dicLogSize = 0; dicLogSize < (UInt32)kDicLogSizeMaxCompress; dicLogSize++)
- if (dictionarySize <= ((UInt32)(1) << dicLogSize))
- break;
- _distTableSize = (UInt32)dicLogSize * 2;
- break;
- }
- case CoderPropID.PosStateBits:
- {
- if (!(prop is Int32))
- throw new InvalidParamException();
- Int32 v = (Int32)prop;
- if (v < 0 || v > (UInt32)Base.kNumPosStatesBitsEncodingMax)
- throw new InvalidParamException();
- _posStateBits = (int)v;
- _posStateMask = (((UInt32)1) << (int)_posStateBits) - 1;
- break;
- }
- case CoderPropID.LitPosBits:
- {
- if (!(prop is Int32))
- throw new InvalidParamException();
- Int32 v = (Int32)prop;
- if (v < 0 || v > (UInt32)Base.kNumLitPosStatesBitsEncodingMax)
- throw new InvalidParamException();
- _numLiteralPosStateBits = (int)v;
- break;
- }
- case CoderPropID.LitContextBits:
- {
- if (!(prop is Int32))
- throw new InvalidParamException();
- Int32 v = (Int32)prop;
- if (v < 0 || v > (UInt32)Base.kNumLitContextBitsMax)
- throw new InvalidParamException(); ;
- _numLiteralContextBits = (int)v;
- break;
- }
- case CoderPropID.EndMarker:
- {
- if (!(prop is Boolean))
- throw new InvalidParamException();
- SetWriteEndMarkerMode((Boolean)prop);
- break;
- }
- default:
- throw new InvalidParamException();
- }
- }
- }
-
- uint _trainSize = 0;
- public void SetTrainSize(uint trainSize)
- {
- _trainSize = trainSize;
- }
-
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoder.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoder.cs
deleted file mode 100644
index d9c2e30ce..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoder.cs
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace SevenZip.Compression.RangeCoder
-{
- class Encoder
- {
- public const uint kTopValue = (1 << 24);
-
- System.IO.Stream Stream;
-
- public UInt64 Low;
- public uint Range;
- uint _cacheSize;
- byte _cache;
-
- long StartPosition;
-
- public void SetStream(System.IO.Stream stream)
- {
- Stream = stream;
- }
-
- public void ReleaseStream()
- {
- Stream = null;
- }
-
- public void Init()
- {
- StartPosition = Stream.Position;
-
- Low = 0;
- Range = 0xFFFFFFFF;
- _cacheSize = 1;
- _cache = 0;
- }
-
- public void FlushData()
- {
- for (int i = 0; i < 5; i++)
- ShiftLow();
- }
-
- public void FlushStream()
- {
- Stream.Flush();
- }
-
- public void CloseStream()
- {
- Stream.Dispose();
- }
-
- public void Encode(uint start, uint size, uint total)
- {
- Low += start * (Range /= total);
- Range *= size;
- while (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
-
- public void ShiftLow()
- {
- if ((uint)Low < (uint)0xFF000000 || (uint)(Low >> 32) == 1)
- {
- byte temp = _cache;
- do
- {
- Stream.WriteByte((byte)(temp + (Low >> 32)));
- temp = 0xFF;
- }
- while (--_cacheSize != 0);
- _cache = (byte)(((uint)Low) >> 24);
- }
- _cacheSize++;
- Low = ((uint)Low) << 8;
- }
-
- public void EncodeDirectBits(uint v, int numTotalBits)
- {
- for (int i = numTotalBits - 1; i >= 0; i--)
- {
- Range >>= 1;
- if (((v >> i) & 1) == 1)
- Low += Range;
- if (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
- }
-
- public void EncodeBit(uint size0, int numTotalBits, uint symbol)
- {
- uint newBound = (Range >> numTotalBits) * size0;
- if (symbol == 0)
- Range = newBound;
- else
- {
- Low += newBound;
- Range -= newBound;
- }
- while (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
-
- public long GetProcessedSizeAdd()
- {
- return _cacheSize +
- Stream.Position - StartPosition + 4;
- // (long)Stream.GetProcessedSize();
- }
- }
-
- class Decoder
- {
- public const uint kTopValue = (1 << 24);
- public uint Range;
- public uint Code;
- // public Buffer.InBuffer Stream = new Buffer.InBuffer(1 << 16);
- public System.IO.Stream Stream;
-
- public void Init(System.IO.Stream stream)
- {
- // Stream.Init(stream);
- Stream = stream;
-
- Code = 0;
- Range = 0xFFFFFFFF;
- for (int i = 0; i < 5; i++)
- Code = (Code << 8) | (byte)Stream.ReadByte();
- }
-
- public void ReleaseStream()
- {
- // Stream.ReleaseStream();
- Stream = null;
- }
-
- public void CloseStream()
- {
- Stream.Dispose();
- }
-
- public void Normalize()
- {
- while (Range < kTopValue)
- {
- Code = (Code << 8) | (byte)Stream.ReadByte();
- Range <<= 8;
- }
- }
-
- public void Normalize2()
- {
- if (Range < kTopValue)
- {
- Code = (Code << 8) | (byte)Stream.ReadByte();
- Range <<= 8;
- }
- }
-
- public uint GetThreshold(uint total)
- {
- return Code / (Range /= total);
- }
-
- public void Decode(uint start, uint size, uint total)
- {
- Code -= start * Range;
- Range *= size;
- Normalize();
- }
-
- public uint DecodeDirectBits(int numTotalBits)
- {
- uint range = Range;
- uint code = Code;
- uint result = 0;
- for (int i = numTotalBits; i > 0; i--)
- {
- range >>= 1;
- /*
- result <<= 1;
- if (code >= range)
- {
- code -= range;
- result |= 1;
- }
- */
- uint t = (code - range) >> 31;
- code -= range & (t - 1);
- result = (result << 1) | (1 - t);
-
- if (range < kTopValue)
- {
- code = (code << 8) | (byte)Stream.ReadByte();
- range <<= 8;
- }
- }
- Range = range;
- Code = code;
- return result;
- }
-
- public uint DecodeBit(uint size0, int numTotalBits)
- {
- uint newBound = (Range >> numTotalBits) * size0;
- uint symbol;
- if (Code < newBound)
- {
- symbol = 0;
- Range = newBound;
- }
- else
- {
- symbol = 1;
- Code -= newBound;
- Range -= newBound;
- }
- Normalize();
- return symbol;
- }
-
- // ulong GetProcessedSize() {return Stream.GetProcessedSize(); }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoderBit.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoderBit.cs
deleted file mode 100644
index 46d27ed0f..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoderBit.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace SevenZip.Compression.RangeCoder
-{
- struct BitEncoder
- {
- public const int kNumBitModelTotalBits = 11;
- public const uint kBitModelTotal = (1 << kNumBitModelTotalBits);
- const int kNumMoveBits = 5;
- const int kNumMoveReducingBits = 2;
- public const int kNumBitPriceShiftBits = 6;
-
- uint Prob;
-
- public void Init() { Prob = kBitModelTotal >> 1; }
-
- public void UpdateModel(uint symbol)
- {
- if (symbol == 0)
- Prob += (kBitModelTotal - Prob) >> kNumMoveBits;
- else
- Prob -= (Prob) >> kNumMoveBits;
- }
-
- public void Encode(Encoder encoder, uint symbol)
- {
- // encoder.EncodeBit(Prob, kNumBitModelTotalBits, symbol);
- // UpdateModel(symbol);
- uint newBound = (encoder.Range >> kNumBitModelTotalBits) * Prob;
- if (symbol == 0)
- {
- encoder.Range = newBound;
- Prob += (kBitModelTotal - Prob) >> kNumMoveBits;
- }
- else
- {
- encoder.Low += newBound;
- encoder.Range -= newBound;
- Prob -= (Prob) >> kNumMoveBits;
- }
- if (encoder.Range < Encoder.kTopValue)
- {
- encoder.Range <<= 8;
- encoder.ShiftLow();
- }
- }
-
- private static UInt32[] ProbPrices = new UInt32[kBitModelTotal >> kNumMoveReducingBits];
-
- static BitEncoder()
- {
- const int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits);
- for (int i = kNumBits - 1; i >= 0; i--)
- {
- UInt32 start = (UInt32)1 << (kNumBits - i - 1);
- UInt32 end = (UInt32)1 << (kNumBits - i);
- for (UInt32 j = start; j < end; j++)
- ProbPrices[j] = ((UInt32)i << kNumBitPriceShiftBits) +
- (((end - j) << kNumBitPriceShiftBits) >> (kNumBits - i - 1));
- }
- }
-
- public uint GetPrice(uint symbol)
- {
- return ProbPrices[(((Prob - symbol) ^ ((-(int)symbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits];
- }
- public uint GetPrice0() { return ProbPrices[Prob >> kNumMoveReducingBits]; }
- public uint GetPrice1() { return ProbPrices[(kBitModelTotal - Prob) >> kNumMoveReducingBits]; }
- }
-
- struct BitDecoder
- {
- public const int kNumBitModelTotalBits = 11;
- public const uint kBitModelTotal = (1 << kNumBitModelTotalBits);
- const int kNumMoveBits = 5;
-
- uint Prob;
-
- public void UpdateModel(int numMoveBits, uint symbol)
- {
- if (symbol == 0)
- Prob += (kBitModelTotal - Prob) >> numMoveBits;
- else
- Prob -= (Prob) >> numMoveBits;
- }
-
- public void Init() { Prob = kBitModelTotal >> 1; }
-
- public uint Decode(RangeCoder.Decoder rangeDecoder)
- {
- uint newBound = (uint)(rangeDecoder.Range >> kNumBitModelTotalBits) * (uint)Prob;
- if (rangeDecoder.Code < newBound)
- {
- rangeDecoder.Range = newBound;
- Prob += (kBitModelTotal - Prob) >> kNumMoveBits;
- if (rangeDecoder.Range < Decoder.kTopValue)
- {
- rangeDecoder.Code = (rangeDecoder.Code << 8) | (byte)rangeDecoder.Stream.ReadByte();
- rangeDecoder.Range <<= 8;
- }
- return 0;
- }
- else
- {
- rangeDecoder.Range -= newBound;
- rangeDecoder.Code -= newBound;
- Prob -= (Prob) >> kNumMoveBits;
- if (rangeDecoder.Range < Decoder.kTopValue)
- {
- rangeDecoder.Code = (rangeDecoder.Code << 8) | (byte)rangeDecoder.Stream.ReadByte();
- rangeDecoder.Range <<= 8;
- }
- return 1;
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoderBitTree.cs b/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoderBitTree.cs
deleted file mode 100644
index f7985c47b..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/Compress/RangeCoder/RangeCoderBitTree.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace SevenZip.Compression.RangeCoder
-{
- struct BitTreeEncoder
- {
- BitEncoder[] Models;
- int NumBitLevels;
-
- public BitTreeEncoder(int numBitLevels)
- {
- NumBitLevels = numBitLevels;
- Models = new BitEncoder[1 << numBitLevels];
- }
-
- public void Init()
- {
- for (uint i = 1; i < (1 << NumBitLevels); i++)
- Models[i].Init();
- }
-
- public void Encode(Encoder rangeEncoder, UInt32 symbol)
- {
- UInt32 m = 1;
- for (int bitIndex = NumBitLevels; bitIndex > 0; )
- {
- bitIndex--;
- UInt32 bit = (symbol >> bitIndex) & 1;
- Models[m].Encode(rangeEncoder, bit);
- m = (m << 1) | bit;
- }
- }
-
- public void ReverseEncode(Encoder rangeEncoder, UInt32 symbol)
- {
- UInt32 m = 1;
- for (UInt32 i = 0; i < NumBitLevels; i++)
- {
- UInt32 bit = symbol & 1;
- Models[m].Encode(rangeEncoder, bit);
- m = (m << 1) | bit;
- symbol >>= 1;
- }
- }
-
- public UInt32 GetPrice(UInt32 symbol)
- {
- UInt32 price = 0;
- UInt32 m = 1;
- for (int bitIndex = NumBitLevels; bitIndex > 0; )
- {
- bitIndex--;
- UInt32 bit = (symbol >> bitIndex) & 1;
- price += Models[m].GetPrice(bit);
- m = (m << 1) + bit;
- }
- return price;
- }
-
- public UInt32 ReverseGetPrice(UInt32 symbol)
- {
- UInt32 price = 0;
- UInt32 m = 1;
- for (int i = NumBitLevels; i > 0; i--)
- {
- UInt32 bit = symbol & 1;
- symbol >>= 1;
- price += Models[m].GetPrice(bit);
- m = (m << 1) | bit;
- }
- return price;
- }
-
- public static UInt32 ReverseGetPrice(BitEncoder[] Models, UInt32 startIndex,
- int NumBitLevels, UInt32 symbol)
- {
- UInt32 price = 0;
- UInt32 m = 1;
- for (int i = NumBitLevels; i > 0; i--)
- {
- UInt32 bit = symbol & 1;
- symbol >>= 1;
- price += Models[startIndex + m].GetPrice(bit);
- m = (m << 1) | bit;
- }
- return price;
- }
-
- public static void ReverseEncode(BitEncoder[] Models, UInt32 startIndex,
- Encoder rangeEncoder, int NumBitLevels, UInt32 symbol)
- {
- UInt32 m = 1;
- for (int i = 0; i < NumBitLevels; i++)
- {
- UInt32 bit = symbol & 1;
- Models[startIndex + m].Encode(rangeEncoder, bit);
- m = (m << 1) | bit;
- symbol >>= 1;
- }
- }
- }
-
- struct BitTreeDecoder
- {
- BitDecoder[] Models;
- int NumBitLevels;
-
- public BitTreeDecoder(int numBitLevels)
- {
- NumBitLevels = numBitLevels;
- Models = new BitDecoder[1 << numBitLevels];
- }
-
- public void Init()
- {
- for (uint i = 1; i < (1 << NumBitLevels); i++)
- Models[i].Init();
- }
-
- public uint Decode(RangeCoder.Decoder rangeDecoder)
- {
- uint m = 1;
- for (int bitIndex = NumBitLevels; bitIndex > 0; bitIndex--)
- m = (m << 1) + Models[m].Decode(rangeDecoder);
- return m - ((uint)1 << NumBitLevels);
- }
-
- public uint ReverseDecode(RangeCoder.Decoder rangeDecoder)
- {
- uint m = 1;
- uint symbol = 0;
- for (int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)
- {
- uint bit = Models[m].Decode(rangeDecoder);
- m <<= 1;
- m += bit;
- symbol |= (bit << bitIndex);
- }
- return symbol;
- }
-
- public static uint ReverseDecode(BitDecoder[] Models, UInt32 startIndex,
- RangeCoder.Decoder rangeDecoder, int NumBitLevels)
- {
- uint m = 1;
- uint symbol = 0;
- for (int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)
- {
- uint bit = Models[startIndex + m].Decode(rangeDecoder);
- m <<= 1;
- m += bit;
- symbol |= (bit << bitIndex);
- }
- return symbol;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/ICoder.cs b/src/Microsoft.DotNet.Archive/LZMA/ICoder.cs
deleted file mode 100644
index 992f6823f..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/ICoder.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// ICoder.h
-
-using System;
-
-namespace SevenZip
-{
- ///
- /// The exception that is thrown when an error in input stream occurs during decoding.
- ///
- class DataErrorException : Exception
- {
- public DataErrorException(): base("Data Error") { }
- }
-
- ///
- /// The exception that is thrown when the value of an argument is outside the allowable range.
- ///
- class InvalidParamException : Exception
- {
- public InvalidParamException(): base("Invalid Parameter") { }
- }
-
- public interface ICodeProgress
- {
- ///
- /// Callback progress.
- ///
- ///
- /// input size. -1 if unknown.
- ///
- ///
- /// output size. -1 if unknown.
- ///
- void SetProgress(Int64 inSize, Int64 outSize);
- };
-
- public interface ICoder
- {
- ///
- /// Codes streams.
- ///
- ///
- /// input Stream.
- ///
- ///
- /// output Stream.
- ///
- ///
- /// input Size. -1 if unknown.
- ///
- ///
- /// output Size. -1 if unknown.
- ///
- ///
- /// callback progress reference.
- ///
- ///
- /// if input stream is not valid
- ///
- void Code(System.IO.Stream inStream, System.IO.Stream outStream,
- Int64 inSize, Int64 outSize, ICodeProgress progress);
- };
-
- /*
- public interface ICoder2
- {
- void Code(ISequentialInStream []inStreams,
- const UInt64 []inSizes,
- ISequentialOutStream []outStreams,
- UInt64 []outSizes,
- ICodeProgress progress);
- };
- */
-
- ///
- /// Provides the fields that represent properties idenitifiers for compressing.
- ///
- public enum CoderPropID
- {
- ///
- /// Specifies default property.
- ///
- DefaultProp = 0,
- ///
- /// Specifies size of dictionary.
- ///
- DictionarySize,
- ///
- /// Specifies size of memory for PPM*.
- ///
- UsedMemorySize,
- ///
- /// Specifies order for PPM methods.
- ///
- Order,
- ///
- /// Specifies Block Size.
- ///
- BlockSize,
- ///
- /// Specifies number of postion state bits for LZMA (0 <= x <= 4).
- ///
- PosStateBits,
- ///
- /// Specifies number of literal context bits for LZMA (0 <= x <= 8).
- ///
- LitContextBits,
- ///
- /// Specifies number of literal position bits for LZMA (0 <= x <= 4).
- ///
- LitPosBits,
- ///
- /// Specifies number of fast bytes for LZ*.
- ///
- NumFastBytes,
- ///
- /// Specifies match finder. LZMA: "BT2", "BT4" or "BT4B".
- ///
- MatchFinder,
- ///
- /// Specifies the number of match finder cyckes.
- ///
- MatchFinderCycles,
- ///
- /// Specifies number of passes.
- ///
- NumPasses,
- ///
- /// Specifies number of algorithm.
- ///
- Algorithm,
- ///
- /// Specifies the number of threads.
- ///
- NumThreads,
- ///
- /// Specifies mode with end marker.
- ///
- EndMarker
- };
-
-
- public interface ISetCoderProperties
- {
- void SetCoderProperties(CoderPropID[] propIDs, object[] properties);
- };
-
- public interface IWriteCoderProperties
- {
- void WriteCoderProperties(System.IO.Stream outStream);
- }
-
- public interface ISetDecoderProperties
- {
- void SetDecoderProperties(byte[] properties);
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/LZMA/README.md b/src/Microsoft.DotNet.Archive/LZMA/README.md
deleted file mode 100644
index 74e275852..000000000
--- a/src/Microsoft.DotNet.Archive/LZMA/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-## LZMA SDK
-This source came from the C# implementation of LZMA from the LZMA SDK, version 16.02, from http://www.7-zip.org/sdk.html.
-
-## License
-LZMA SDK is placed in the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original LZMA SDK code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
-
-## Thanks!
-Thanks goes to Igor Pavlov for making this available.
diff --git a/src/Microsoft.DotNet.Archive/LocalizableStrings.resx b/src/Microsoft.DotNet.Archive/LocalizableStrings.resx
deleted file mode 100644
index 9f9b5a9e7..000000000
--- a/src/Microsoft.DotNet.Archive/LocalizableStrings.resx
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Expanding
-
-
- Decompressing
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj
deleted file mode 100644
index 0fec393cb..000000000
--- a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- Archive and compression types.
- $(CliVersionPrefix)
- netstandard1.3
- ../../tools/Key.snk
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/ProgressReport.cs b/src/Microsoft.DotNet.Archive/ProgressReport.cs
deleted file mode 100644
index 6eb955563..000000000
--- a/src/Microsoft.DotNet.Archive/ProgressReport.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Microsoft.DotNet.Archive
-{
- public struct ProgressReport
- {
- public ProgressReport(string phase, long ticks, long total)
- {
- Phase = phase;
- Ticks = ticks;
- Total = total;
- }
- public string Phase { get; }
- public long Ticks { get; }
- public long Total { get; }
- }
-
- public static class ProgressReportExtensions
- {
- public static void Report(this IProgress progress, string phase, long ticks, long total)
- {
- progress.Report(new ProgressReport(phase, ticks, total));
- }
- }
-
-}
diff --git a/src/Microsoft.DotNet.Archive/ThreadLocalZipArchive.cs b/src/Microsoft.DotNet.Archive/ThreadLocalZipArchive.cs
deleted file mode 100644
index 7f61207cb..000000000
--- a/src/Microsoft.DotNet.Archive/ThreadLocalZipArchive.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.IO;
-using System.IO.Compression;
-using System.Threading;
-
-namespace Microsoft.DotNet.Archive
-{
- ///
- /// Wraps ThreadLocal and exposes Dispose semantics that dispose all archives
- ///
- internal class ThreadLocalZipArchive : IDisposable
- {
- private ThreadLocal _archive;
- private bool _disposed = false;
-
- public ThreadLocalZipArchive(string archivePath, ZipArchive local = null)
- {
- _archive = new ThreadLocal(() =>
- new ZipArchive(File.Open(archivePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete), ZipArchiveMode.Read),
- trackAllValues:true);
-
- if (local != null)
- {
- // reuse provided one for current thread
- _archive.Value = local;
- }
- }
-
- public ZipArchive Archive { get { return _archive.Value; } }
-
- public void Dispose()
- {
- if (!_disposed)
- {
- if (_archive != null)
- {
- // dispose all archives
- if (_archive.Values != null)
- {
- foreach (var value in _archive.Values)
- {
- if (value != null)
- {
- value.Dispose();
- }
- }
- }
-
- // dispose ThreadLocal
- _archive.Dispose();
- _archive = null;
- }
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.cs.xlf
deleted file mode 100644
index 50f4e8538..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.cs.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Rozbalení
-
-
-
-
- Dekomprese
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.de.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.de.xlf
deleted file mode 100644
index 137ac4d1e..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.de.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Aufklappen
-
-
-
-
- Dekomprimieren
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.es.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.es.xlf
deleted file mode 100644
index 0fd56bad0..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.es.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Expandiendo
-
-
-
-
- Descomprimiendo
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.fr.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.fr.xlf
deleted file mode 100644
index c39aba992..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.fr.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Développement
-
-
-
-
- Décompression
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.it.xlf
deleted file mode 100644
index be414bd1a..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.it.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Espansione
-
-
-
-
- Decompressione
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ja.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ja.xlf
deleted file mode 100644
index f70a95565..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ja.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- 展開中
-
-
-
-
- 圧縮解除中
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ko.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ko.xlf
deleted file mode 100644
index bf7de8172..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ko.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- 확장하는 중
-
-
-
-
- 압축을 푸는 중
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pl.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pl.xlf
deleted file mode 100644
index 9772365f1..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pl.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Rozwijanie
-
-
-
-
- Dekompresja
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pt-BR.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pt-BR.xlf
deleted file mode 100644
index 1b3fad0d8..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pt-BR.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Expandindo
-
-
-
-
- Descompactando
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ru.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ru.xlf
deleted file mode 100644
index 2a8c6091d..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ru.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Идет расширение
-
-
-
-
- Идет извлечение
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.tr.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.tr.xlf
deleted file mode 100644
index f1fde5d99..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.tr.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- Genişletme
-
-
-
-
- Daraltma
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hans.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hans.xlf
deleted file mode 100644
index 65ab99d0b..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hans.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- 正在扩展
-
-
-
-
- 正在解压缩
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hant.xlf b/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hant.xlf
deleted file mode 100644
index b5c24cae7..000000000
--- a/src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.zh-Hant.xlf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
- 正在展開
-
-
-
-
- 正在解壓縮
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/FileManipulation/FileUtil.cs b/src/Microsoft.DotNet.Cli.Sln.Internal/FileManipulation/FileUtil.cs
deleted file mode 100644
index ce4329199..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/FileManipulation/FileUtil.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-//
-// FileUtil.cs
-//
-// Author:
-// Lluis Sanchez Gual
-//
-// Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.IO;
-using System.Text;
-
-namespace Microsoft.DotNet.Cli.Sln.Internal.FileManipulation
-{
- static internal class FileUtil
- {
- internal static TextFormatInfo GetTextFormatInfo(string file)
- {
- var info = new TextFormatInfo();
-
- string newLine = null;
- Encoding encoding;
-
- using (FileStream fs = File.OpenRead(file))
- {
- byte[] buf = new byte[1024];
- int nread, i;
-
- if ((nread = fs.Read(buf, 0, buf.Length)) <= 0)
- {
- return info;
- }
-
- if (TryParse(buf, nread, out encoding))
- {
- i = encoding.GetPreamble().Length;
- }
- else
- {
- encoding = null;
- i = 0;
- }
-
- do
- {
- while (i < nread)
- {
- if (buf[i] == '\r')
- {
- newLine = "\r\n";
- break;
- }
- else if (buf[i] == '\n')
- {
- newLine = "\n";
- break;
- }
-
- i++;
- }
-
- if (newLine == null)
- {
- if ((nread = fs.Read(buf, 0, buf.Length)) <= 0)
- {
- newLine = "\n";
- break;
- }
-
- i = 0;
- }
- } while (newLine == null);
-
- info.EndsWithEmptyLine = fs.Seek(-1, SeekOrigin.End) > 0 && fs.ReadByte() == (int)'\n';
- info.NewLine = newLine;
- info.Encoding = encoding;
- return info;
- }
- }
-
- private static bool TryParse(byte[] buffer, int available, out Encoding encoding)
- {
- if (buffer.Length >= 2)
- {
- for (int i = 0; i < table.Length; i++)
- {
- bool matched = true;
-
- if (available < table[i].GetPreamble().Length)
- {
- continue;
- }
-
- for (int j = 0; j < table[i].GetPreamble().Length; j++)
- {
- if (buffer[j] != table[i].GetPreamble()[j])
- {
- matched = false;
- break;
- }
- }
-
- if (matched)
- {
- encoding = table[i];
- return true;
- }
- }
- }
-
- encoding = null;
-
- return false;
- }
-
- private static readonly Encoding[] table = new[] {
- Encoding.UTF7,
- Encoding.UTF8,
- Encoding.UTF32,
- Encoding.ASCII,
- };
- }
-
- internal class TextFormatInfo
- {
- public TextFormatInfo()
- {
- NewLine = Environment.NewLine;
- Encoding = null;
- EndsWithEmptyLine = true;
- }
-
- public string NewLine { get; set; }
- public Encoding Encoding { get; set; }
- public bool EndsWithEmptyLine { get; set; }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/LocalizableStrings.resx b/src/Microsoft.DotNet.Cli.Sln.Internal/LocalizableStrings.resx
deleted file mode 100644
index 205037931..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/LocalizableStrings.resx
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Invalid format in line {0}: {1}
-
-
- Project section is missing '{0}' when parsing the line starting at position {1}
-
-
- Property set is missing '{0}'
-
-
- Global section specified more than once
-
-
- Global section not closed
-
-
- File header is missing version
-
-
- Expected file header not found
-
-
- Project section not closed
-
-
- Invalid section type: {0}
-
-
- Section id missing
-
-
- Closing section tag not found
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj b/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj
deleted file mode 100644
index 8f76e2e04..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- SLN file reader/writer
- $(CliVersionPrefix)
- netstandard1.6
- portable
- Microsoft.DotNet.Cli.Sln.Internal
- ../../tools/Key.snk
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/ProjectTypeGuids.cs b/src/Microsoft.DotNet.Cli.Sln.Internal/ProjectTypeGuids.cs
deleted file mode 100644
index 547e93eef..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/ProjectTypeGuids.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Sln.Internal
-{
- public static class ProjectTypeGuids
- {
- public const string CSharpProjectTypeGuid = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}";
- public const string SolutionFolderGuid = "{2150E333-8FDC-42A3-9474-1A3956D46DE8}";
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.Cli.Sln.Internal/Properties/AssemblyInfo.cs
deleted file mode 100644
index b67942279..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: InternalsVisibleTo("Microsoft.DotNet.Cli.Sln.Internal.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100039ac461fa5c82c7dd2557400c4fd4e9dcdf7ac47e3d572548c04cd4673e004916610f4ea5cbf86f2b1ca1cb824f2a7b3976afecfcf4eb72d9a899aa6786effa10c30399e6580ed848231fec48374e41b3acf8811931343fc2f73acf72dae745adbcb7063cc4b50550618383202875223fc75401351cd89c44bf9b50e7fa3796")]
-[assembly: InternalsVisibleTo("dotnet-sln-add.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
-[assembly: InternalsVisibleTo("dotnet-sln-list.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
-[assembly: InternalsVisibleTo("dotnet-sln-remove.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
-
-
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/SlnFile.cs b/src/Microsoft.DotNet.Cli.Sln.Internal/SlnFile.cs
deleted file mode 100644
index 87fad297e..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/SlnFile.cs
+++ /dev/null
@@ -1,1185 +0,0 @@
-//
-// SlnFile.cs
-//
-// Author:
-// Lluis Sanchez Gual
-//
-// Copyright (c) 2016 Xamarin, Inc (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.IO;
-using System.Collections;
-using System.Globalization;
-using System.Reflection;
-using Microsoft.DotNet.Cli.Sln.Internal.FileManipulation;
-using Microsoft.DotNet.Tools.Common;
-
-namespace Microsoft.DotNet.Cli.Sln.Internal
-{
- public class SlnFile
- {
- private SlnProjectCollection _projects = new SlnProjectCollection();
- private SlnSectionCollection _sections = new SlnSectionCollection();
- private SlnPropertySet _metadata = new SlnPropertySet(true);
- private int _prefixBlankLines = 1;
- private TextFormatInfo _format = new TextFormatInfo();
-
- public string FormatVersion { get; set; }
- public string ProductDescription { get; set; }
-
- public string VisualStudioVersion
- {
- get { return _metadata.GetValue("VisualStudioVersion"); }
- set { _metadata.SetValue("VisualStudioVersion", value); }
- }
-
- public string MinimumVisualStudioVersion
- {
- get { return _metadata.GetValue("MinimumVisualStudioVersion"); }
- set { _metadata.SetValue("MinimumVisualStudioVersion", value); }
- }
-
- public string BaseDirectory
- {
- get { return Path.GetDirectoryName(FullPath); }
- }
-
- public string FullPath { get; set; }
-
- public SlnPropertySet SolutionConfigurationsSection
- {
- get
- {
- return _sections
- .GetOrCreateSection("SolutionConfigurationPlatforms", SlnSectionType.PreProcess)
- .Properties;
- }
- }
-
- public SlnPropertySetCollection ProjectConfigurationsSection
- {
- get
- {
- return _sections
- .GetOrCreateSection("ProjectConfigurationPlatforms", SlnSectionType.PostProcess)
- .NestedPropertySets;
- }
- }
-
- public SlnSectionCollection Sections
- {
- get { return _sections; }
- }
-
- public SlnProjectCollection Projects
- {
- get { return _projects; }
- }
-
- public SlnFile()
- {
- _projects.ParentFile = this;
- _sections.ParentFile = this;
- }
-
- public static SlnFile Read(string file)
- {
- SlnFile slnFile = new SlnFile();
- slnFile.FullPath = Path.GetFullPath(file);
- slnFile._format = FileUtil.GetTextFormatInfo(file);
-
- using (var sr = new StreamReader(new FileStream(file, FileMode.Open)))
- {
- slnFile.Read(sr);
- }
-
- return slnFile;
- }
-
- private void Read(TextReader reader)
- {
- const string HeaderPrefix = "Microsoft Visual Studio Solution File, Format Version";
-
- string line;
- int curLineNum = 0;
- bool globalFound = false;
- bool productRead = false;
-
- while ((line = reader.ReadLine()) != null)
- {
- curLineNum++;
- line = line.Trim();
- if (line.StartsWith(HeaderPrefix, StringComparison.Ordinal))
- {
- if (line.Length <= HeaderPrefix.Length)
- {
- throw new InvalidSolutionFormatException(
- curLineNum,
- LocalizableStrings.FileHeaderMissingVersionError);
- }
-
- FormatVersion = line.Substring(HeaderPrefix.Length).Trim();
- _prefixBlankLines = curLineNum - 1;
- }
- if (line.StartsWith("# ", StringComparison.Ordinal))
- {
- if (!productRead)
- {
- productRead = true;
- ProductDescription = line.Substring(2);
- }
- }
- else if (line.StartsWith("Project", StringComparison.Ordinal))
- {
- SlnProject p = new SlnProject();
- p.Read(reader, line, ref curLineNum);
- _projects.Add(p);
- }
- else if (line == "Global")
- {
- if (globalFound)
- {
- throw new InvalidSolutionFormatException(
- curLineNum,
- LocalizableStrings.GlobalSectionMoreThanOnceError);
- }
- globalFound = true;
- while ((line = reader.ReadLine()) != null)
- {
- curLineNum++;
- line = line.Trim();
- if (line == "EndGlobal")
- {
- break;
- }
- else if (line.StartsWith("GlobalSection", StringComparison.Ordinal))
- {
- var sec = new SlnSection();
- sec.Read(reader, line, ref curLineNum);
- _sections.Add(sec);
- }
- else // Ignore text that's out of place
- {
- continue;
- }
- }
- if (line == null)
- {
- throw new InvalidSolutionFormatException(
- curLineNum,
- LocalizableStrings.GlobalSectionNotClosedError);
- }
- }
- else if (line.IndexOf('=') != -1)
- {
- _metadata.ReadLine(line, curLineNum);
- }
- }
- if (FormatVersion == null)
- {
- throw new InvalidSolutionFormatException(LocalizableStrings.FileHeaderMissingError);
- }
- }
-
- public void Write(string file = null)
- {
- if (!string.IsNullOrEmpty(file))
- {
- FullPath = Path.GetFullPath(file);
- }
- var sw = new StringWriter();
- Write(sw);
- File.WriteAllText(FullPath, sw.ToString());
- }
-
- private void Write(TextWriter writer)
- {
- writer.NewLine = _format.NewLine;
- for (int n = 0; n < _prefixBlankLines; n++)
- {
- writer.WriteLine();
- }
- writer.WriteLine("Microsoft Visual Studio Solution File, Format Version " + FormatVersion);
- writer.WriteLine("# " + ProductDescription);
-
- _metadata.Write(writer);
-
- foreach (var p in _projects)
- {
- p.Write(writer);
- }
-
- writer.WriteLine("Global");
- foreach (SlnSection s in _sections)
- {
- s.Write(writer, "GlobalSection");
- }
- writer.WriteLine("EndGlobal");
- }
- }
-
- public class SlnProject
- {
- private SlnSectionCollection _sections = new SlnSectionCollection();
-
- private SlnFile _parentFile;
-
- public SlnFile ParentFile
- {
- get
- {
- return _parentFile;
- }
- internal set
- {
- _parentFile = value;
- _sections.ParentFile = _parentFile;
- }
- }
-
- public string Id { get; set; }
- public string TypeGuid { get; set; }
- public string Name { get; set; }
-
- private string _filePath;
- public string FilePath
- {
- get
- {
- return _filePath;
- }
- set
- {
- _filePath = PathUtility.RemoveExtraPathSeparators(
- PathUtility.GetPathWithDirectorySeparator(value));
- }
- }
-
- public int Line { get; private set; }
- internal bool Processed { get; set; }
-
- public SlnSectionCollection Sections
- {
- get { return _sections; }
- }
-
- internal void Read(TextReader reader, string line, ref int curLineNum)
- {
- Line = curLineNum;
-
- int n = 0;
- FindNext(curLineNum, line, ref n, '(');
- n++;
- FindNext(curLineNum, line, ref n, '"');
- int n2 = n + 1;
- FindNext(curLineNum, line, ref n2, '"');
- TypeGuid = line.Substring(n + 1, n2 - n - 1);
-
- n = n2 + 1;
- FindNext(curLineNum, line, ref n, ')');
- FindNext(curLineNum, line, ref n, '=');
-
- FindNext(curLineNum, line, ref n, '"');
- n2 = n + 1;
- FindNext(curLineNum, line, ref n2, '"');
- Name = line.Substring(n + 1, n2 - n - 1);
-
- n = n2 + 1;
- FindNext(curLineNum, line, ref n, ',');
- FindNext(curLineNum, line, ref n, '"');
- n2 = n + 1;
- FindNext(curLineNum, line, ref n2, '"');
- FilePath = line.Substring(n + 1, n2 - n - 1);
-
- n = n2 + 1;
- FindNext(curLineNum, line, ref n, ',');
- FindNext(curLineNum, line, ref n, '"');
- n2 = n + 1;
- FindNext(curLineNum, line, ref n2, '"');
- Id = line.Substring(n + 1, n2 - n - 1);
-
- while ((line = reader.ReadLine()) != null)
- {
- curLineNum++;
- line = line.Trim();
- if (line == "EndProject")
- {
- return;
- }
- if (line.StartsWith("ProjectSection", StringComparison.Ordinal))
- {
- if (_sections == null)
- {
- _sections = new SlnSectionCollection();
- }
- var sec = new SlnSection();
- _sections.Add(sec);
- sec.Read(reader, line, ref curLineNum);
- }
- }
-
- throw new InvalidSolutionFormatException(
- curLineNum,
- LocalizableStrings.ProjectSectionNotClosedError);
- }
-
- private void FindNext(int ln, string line, ref int i, char c)
- {
- var inputIndex = i;
- i = line.IndexOf(c, i);
- if (i == -1)
- {
- throw new InvalidSolutionFormatException(
- ln,
- string.Format(LocalizableStrings.ProjectParsingErrorFormatString, c, inputIndex));
- }
- }
-
- internal void Write(TextWriter writer)
- {
- writer.Write("Project(\"");
- writer.Write(TypeGuid);
- writer.Write("\") = \"");
- writer.Write(Name);
- writer.Write("\", \"");
- writer.Write(PathUtility.GetPathWithBackSlashes(FilePath));
- writer.Write("\", \"");
- writer.Write(Id);
- writer.WriteLine("\"");
- if (_sections != null)
- {
- foreach (SlnSection s in _sections)
- {
- s.Write(writer, "ProjectSection");
- }
- }
- writer.WriteLine("EndProject");
- }
- }
-
- public class SlnSection
- {
- private SlnPropertySetCollection _nestedPropertySets;
- private SlnPropertySet _properties;
- private List _sectionLines;
- private int _baseIndex;
-
- public string Id { get; set; }
- public int Line { get; private set; }
-
- internal bool Processed { get; set; }
-
- public SlnFile ParentFile { get; internal set; }
-
- public bool IsEmpty
- {
- get
- {
- return (_properties == null || _properties.Count == 0) &&
- (_nestedPropertySets == null || _nestedPropertySets.All(t => t.IsEmpty)) &&
- (_sectionLines == null || _sectionLines.Count == 0);
- }
- }
-
- ///
- /// If true, this section won't be written to the file if it is empty
- ///
- /// true if skip if empty; otherwise, false.
- public bool SkipIfEmpty { get; set; }
-
- public void Clear()
- {
- _properties = null;
- _nestedPropertySets = null;
- _sectionLines = null;
- }
-
- public SlnPropertySet Properties
- {
- get
- {
- if (_properties == null)
- {
- _properties = new SlnPropertySet();
- _properties.ParentSection = this;
- if (_sectionLines != null)
- {
- foreach (var line in _sectionLines)
- {
- _properties.ReadLine(line, Line);
- }
- _sectionLines = null;
- }
- }
- return _properties;
- }
- }
-
- public SlnPropertySetCollection NestedPropertySets
- {
- get
- {
- if (_nestedPropertySets == null)
- {
- _nestedPropertySets = new SlnPropertySetCollection(this);
- if (_sectionLines != null)
- {
- LoadPropertySets();
- }
- }
- return _nestedPropertySets;
- }
- }
-
- public void SetContent(IEnumerable> lines)
- {
- _sectionLines = new List(lines.Select(p => p.Key + " = " + p.Value));
- _properties = null;
- _nestedPropertySets = null;
- }
-
- public IEnumerable> GetContent()
- {
- if (_sectionLines != null)
- {
- return _sectionLines.Select(li =>
- {
- int i = li.IndexOf('=');
- if (i != -1)
- {
- return new KeyValuePair(li.Substring(0, i).Trim(), li.Substring(i + 1).Trim());
- }
- else
- {
- return new KeyValuePair(li.Trim(), "");
- }
- });
- }
- else
- {
- return new KeyValuePair[0];
- }
- }
-
- public SlnSectionType SectionType { get; set; }
-
- private SlnSectionType ToSectionType(int curLineNum, string s)
- {
- if (s == "preSolution" || s == "preProject")
- {
- return SlnSectionType.PreProcess;
- }
- if (s == "postSolution" || s == "postProject")
- {
- return SlnSectionType.PostProcess;
- }
- throw new InvalidSolutionFormatException(
- curLineNum,
- String.Format(LocalizableStrings.InvalidSectionTypeError, s));
- }
-
- private string FromSectionType(bool isProjectSection, SlnSectionType type)
- {
- if (type == SlnSectionType.PreProcess)
- {
- return isProjectSection ? "preProject" : "preSolution";
- }
- else
- {
- return isProjectSection ? "postProject" : "postSolution";
- }
- }
-
- internal void Read(TextReader reader, string line, ref int curLineNum)
- {
- Line = curLineNum;
- int k = line.IndexOf('(');
- if (k == -1)
- {
- throw new InvalidSolutionFormatException(
- curLineNum,
- LocalizableStrings.SectionIdMissingError);
- }
- var tag = line.Substring(0, k).Trim();
- var k2 = line.IndexOf(')', k);
- if (k2 == -1)
- {
- throw new InvalidSolutionFormatException(
- curLineNum,
- LocalizableStrings.SectionIdMissingError);
- }
- Id = line.Substring(k + 1, k2 - k - 1);
-
- k = line.IndexOf('=', k2);
- SectionType = ToSectionType(curLineNum, line.Substring(k + 1).Trim());
-
- var endTag = "End" + tag;
-
- _sectionLines = new List();
- _baseIndex = ++curLineNum;
- while ((line = reader.ReadLine()) != null)
- {
- curLineNum++;
- line = line.Trim();
- if (line == endTag)
- {
- break;
- }
- _sectionLines.Add(line);
- }
- if (line == null)
- {
- throw new InvalidSolutionFormatException(
- curLineNum,
- LocalizableStrings.ClosingSectionTagNotFoundError);
- }
- }
-
- private void LoadPropertySets()
- {
- if (_sectionLines != null)
- {
- SlnPropertySet curSet = null;
- for (int n = 0; n < _sectionLines.Count; n++)
- {
- var line = _sectionLines[n];
- if (string.IsNullOrEmpty(line.Trim()))
- {
- continue;
- }
- var i = line.IndexOf('.');
- if (i == -1)
- {
- throw new InvalidSolutionFormatException(
- _baseIndex + n,
- string.Format(LocalizableStrings.InvalidPropertySetFormatString, '.'));
- }
- var id = line.Substring(0, i);
- if (curSet == null || id != curSet.Id)
- {
- curSet = new SlnPropertySet(id);
- _nestedPropertySets.Add(curSet);
- }
- curSet.ReadLine(line.Substring(i + 1), _baseIndex + n);
- }
- _sectionLines = null;
- }
- }
-
- internal void Write(TextWriter writer, string sectionTag)
- {
- if (SkipIfEmpty && IsEmpty)
- {
- return;
- }
-
- writer.Write("\t");
- writer.Write(sectionTag);
- writer.Write('(');
- writer.Write(Id);
- writer.Write(") = ");
- writer.WriteLine(FromSectionType(sectionTag == "ProjectSection", SectionType));
- if (_sectionLines != null)
- {
- foreach (var l in _sectionLines)
- {
- writer.WriteLine("\t\t" + l);
- }
- }
- else if (_properties != null)
- {
- _properties.Write(writer);
- }
- else if (_nestedPropertySets != null)
- {
- foreach (var ps in _nestedPropertySets)
- {
- ps.Write(writer);
- }
- }
- writer.WriteLine("\tEnd" + sectionTag);
- }
- }
-
- ///
- /// A collection of properties
- ///
- public class SlnPropertySet : IDictionary
- {
- private OrderedDictionary _values = new OrderedDictionary();
- private bool _isMetadata;
-
- internal bool Processed { get; set; }
-
- public SlnFile ParentFile
- {
- get { return ParentSection != null ? ParentSection.ParentFile : null; }
- }
-
- public SlnSection ParentSection { get; set; }
-
- ///
- /// Text file line of this section in the original file
- ///
- /// The line.
- public int Line { get; private set; }
-
- internal SlnPropertySet()
- {
- }
-
- ///
- /// Creates a new property set with the specified ID
- ///
- /// Identifier.
- public SlnPropertySet(string id)
- {
- Id = id;
- }
-
- internal SlnPropertySet(bool isMetadata)
- {
- _isMetadata = isMetadata;
- }
-
- public bool IsEmpty
- {
- get
- {
- return _values.Count == 0;
- }
- }
-
- internal void ReadLine(string line, int currentLine)
- {
- if (Line == 0)
- {
- Line = currentLine;
- }
- int k = line.IndexOf('=');
- if (k != -1)
- {
- var name = line.Substring(0, k).Trim();
- var val = line.Substring(k + 1).Trim();
- _values[name] = val;
- }
- else
- {
- line = line.Trim();
- if (!string.IsNullOrWhiteSpace(line))
- {
- _values.Add(line, null);
- }
- }
- }
-
- internal void Write(TextWriter writer)
- {
- foreach (DictionaryEntry e in _values)
- {
- if (!_isMetadata)
- {
- writer.Write("\t\t");
- }
- if (Id != null)
- {
- writer.Write(Id + ".");
- }
- writer.WriteLine(e.Key + " = " + e.Value);
- }
- }
-
- public string Id { get; private set; }
-
- public string GetValue(string name, string defaultValue = null)
- {
- string res;
- if (TryGetValue(name, out res))
- {
- return res;
- }
- else
- {
- return defaultValue;
- }
- }
-
- public T GetValue(string name)
- {
- return (T)GetValue(name, typeof(T), default(T));
- }
-
- public T GetValue(string name, T defaultValue)
- {
- return (T)GetValue(name, typeof(T), defaultValue);
- }
-
- public object GetValue(string name, Type t, object defaultValue)
- {
- string val;
- if (TryGetValue(name, out val))
- {
- if (t == typeof(bool))
- {
- return (object)val.Equals("true", StringComparison.OrdinalIgnoreCase);
- }
- if (t.GetTypeInfo().IsEnum)
- {
- return Enum.Parse(t, val, true);
- }
- if (t.GetTypeInfo().IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>))
- {
- var at = t.GetTypeInfo().GetGenericArguments()[0];
- if (string.IsNullOrEmpty(val))
- {
- return null;
- }
- return Convert.ChangeType(val, at, CultureInfo.InvariantCulture);
-
- }
- return Convert.ChangeType(val, t, CultureInfo.InvariantCulture);
- }
- else
- {
- return defaultValue;
- }
- }
-
- public void SetValue(string name, string value, string defaultValue = null, bool preserveExistingCase = false)
- {
- if (value == null && defaultValue == "")
- {
- value = "";
- }
- if (value == defaultValue)
- {
- // if the value is default, only remove the property if it was not already the default
- // to avoid unnecessary project file churn
- string res;
- if (TryGetValue(name, out res) &&
- !string.Equals(defaultValue ?? "",
- res, preserveExistingCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal))
- {
- Remove(name);
- }
- return;
- }
- string currentValue;
- if (preserveExistingCase && TryGetValue(name, out currentValue) &&
- string.Equals(value, currentValue, StringComparison.OrdinalIgnoreCase))
- {
- return;
- }
- _values[name] = value;
- }
-
- public void SetValue(string name, object value, object defaultValue = null)
- {
- var isDefault = object.Equals(value, defaultValue);
- if (isDefault)
- {
- // if the value is default, only remove the property if it was not already the default
- // to avoid unnecessary project file churn
- if (ContainsKey(name) && (defaultValue == null ||
- !object.Equals(defaultValue, GetValue(name, defaultValue.GetType(), null))))
- {
- Remove(name);
- }
- return;
- }
-
- if (value is bool)
- {
- _values[name] = (bool)value ? "TRUE" : "FALSE";
- }
- else
- {
- _values[name] = Convert.ToString(value, CultureInfo.InvariantCulture);
- }
- }
-
- void IDictionary.Add(string key, string value)
- {
- SetValue(key, value);
- }
-
- public bool ContainsKey(string key)
- {
- return _values.Contains(key);
- }
-
- public bool Remove(string key)
- {
- var wasThere = _values.Contains(key);
- _values.Remove(key);
- return wasThere;
- }
-
- public bool TryGetValue(string key, out string value)
- {
- value = (string)_values[key];
- return value != null;
- }
-
- public string this[string index]
- {
- get
- {
- return (string)_values[index];
- }
- set
- {
- _values[index] = value;
- }
- }
-
- public ICollection Values
- {
- get
- {
- return _values.Values.Cast().ToList();
- }
- }
-
- public ICollection Keys
- {
- get { return _values.Keys.Cast().ToList(); }
- }
-
- void ICollection>.Add(KeyValuePair item)
- {
- SetValue(item.Key, item.Value);
- }
-
- public void Clear()
- {
- _values.Clear();
- }
-
- internal void ClearExcept(HashSet keys)
- {
- foreach (var k in _values.Keys.Cast().Except(keys).ToArray())
- {
- _values.Remove(k);
- }
- }
-
- bool ICollection>.Contains(KeyValuePair item)
- {
- var val = GetValue(item.Key);
- return val == item.Value;
- }
-
- public void CopyTo(KeyValuePair[] array, int arrayIndex)
- {
- foreach (DictionaryEntry de in _values)
- {
- array[arrayIndex++] = new KeyValuePair((string)de.Key, (string)de.Value);
- }
- }
-
- bool ICollection>.Remove(KeyValuePair item)
- {
- if (((ICollection>)this).Contains(item))
- {
- Remove(item.Key);
- return true;
- }
- else
- {
- return false;
- }
- }
-
- public int Count
- {
- get
- {
- return _values.Count;
- }
- }
-
- internal void SetLines(IEnumerable> lines)
- {
- _values.Clear();
- foreach (var line in lines)
- {
- _values[line.Key] = line.Value;
- }
- }
-
- bool ICollection>.IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- public IEnumerator> GetEnumerator()
- {
- foreach (DictionaryEntry de in _values)
- {
- yield return new KeyValuePair((string)de.Key, (string)de.Value);
- }
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- foreach (DictionaryEntry de in _values)
- {
- yield return new KeyValuePair((string)de.Key, (string)de.Value);
- }
- }
- }
-
- public class SlnProjectCollection : Collection
- {
- private SlnFile _parentFile;
-
- internal SlnFile ParentFile
- {
- get
- {
- return _parentFile;
- }
- set
- {
- _parentFile = value;
- foreach (var it in this)
- {
- it.ParentFile = _parentFile;
- }
- }
- }
-
- public SlnProject GetProject(string id)
- {
- return this.FirstOrDefault(s => s.Id == id);
- }
-
- public SlnProject GetOrCreateProject(string id)
- {
- var p = this.FirstOrDefault(s => s.Id.Equals(id, StringComparison.OrdinalIgnoreCase));
- if (p == null)
- {
- p = new SlnProject { Id = id };
- Add(p);
- }
- return p;
- }
-
- protected override void InsertItem(int index, SlnProject item)
- {
- base.InsertItem(index, item);
- item.ParentFile = ParentFile;
- }
-
- protected override void SetItem(int index, SlnProject item)
- {
- base.SetItem(index, item);
- item.ParentFile = ParentFile;
- }
-
- protected override void RemoveItem(int index)
- {
- var it = this[index];
- it.ParentFile = null;
- base.RemoveItem(index);
- }
-
- protected override void ClearItems()
- {
- foreach (var it in this)
- {
- it.ParentFile = null;
- }
- base.ClearItems();
- }
- }
-
- public class SlnSectionCollection : Collection
- {
- private SlnFile _parentFile;
-
- internal SlnFile ParentFile
- {
- get
- {
- return _parentFile;
- }
- set
- {
- _parentFile = value;
- foreach (var it in this)
- {
- it.ParentFile = _parentFile;
- }
- }
- }
-
- public SlnSection GetSection(string id)
- {
- return this.FirstOrDefault(s => s.Id == id);
- }
-
- public SlnSection GetSection(string id, SlnSectionType sectionType)
- {
- return this.FirstOrDefault(s => s.Id == id && s.SectionType == sectionType);
- }
-
- public SlnSection GetOrCreateSection(string id, SlnSectionType sectionType)
- {
- if (id == null)
- {
- throw new ArgumentNullException("id");
- }
- var sec = this.FirstOrDefault(s => s.Id == id);
- if (sec == null)
- {
- sec = new SlnSection { Id = id };
- sec.SectionType = sectionType;
- Add(sec);
- }
- return sec;
- }
-
- public void RemoveSection(string id)
- {
- if (id == null)
- {
- throw new ArgumentNullException("id");
- }
- var s = GetSection(id);
- if (s != null)
- {
- Remove(s);
- }
- }
-
- protected override void InsertItem(int index, SlnSection item)
- {
- base.InsertItem(index, item);
- item.ParentFile = ParentFile;
- }
-
- protected override void SetItem(int index, SlnSection item)
- {
- base.SetItem(index, item);
- item.ParentFile = ParentFile;
- }
-
- protected override void RemoveItem(int index)
- {
- var it = this[index];
- it.ParentFile = null;
- base.RemoveItem(index);
- }
-
- protected override void ClearItems()
- {
- foreach (var it in this)
- {
- it.ParentFile = null;
- }
- base.ClearItems();
- }
- }
-
- public class SlnPropertySetCollection : Collection
- {
- private SlnSection _parentSection;
-
- internal SlnPropertySetCollection(SlnSection parentSection)
- {
- _parentSection = parentSection;
- }
-
- public SlnPropertySet GetPropertySet(string id, bool ignoreCase = false)
- {
- var sc = ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
- return this.FirstOrDefault(s => s.Id.Equals(id, sc));
- }
-
- public SlnPropertySet GetOrCreatePropertySet(string id, bool ignoreCase = false)
- {
- var ps = GetPropertySet(id, ignoreCase);
- if (ps == null)
- {
- ps = new SlnPropertySet(id);
- Add(ps);
- }
- return ps;
- }
-
- protected override void InsertItem(int index, SlnPropertySet item)
- {
- base.InsertItem(index, item);
- item.ParentSection = _parentSection;
- }
-
- protected override void SetItem(int index, SlnPropertySet item)
- {
- base.SetItem(index, item);
- item.ParentSection = _parentSection;
- }
-
- protected override void RemoveItem(int index)
- {
- var it = this[index];
- it.ParentSection = null;
- base.RemoveItem(index);
- }
-
- protected override void ClearItems()
- {
- foreach (var it in this)
- {
- it.ParentSection = null;
- }
- base.ClearItems();
- }
- }
-
- public class InvalidSolutionFormatException : Exception
- {
- public InvalidSolutionFormatException(string details)
- : base(details)
- {
- }
-
- public InvalidSolutionFormatException(int line, string details)
- : base(string.Format(LocalizableStrings.ErrorMessageFormatString, line, details))
- {
- }
- }
-
- public enum SlnSectionType
- {
- PreProcess,
- PostProcess
- }
-}
-
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.cs.xlf
deleted file mode 100644
index 5d973eb64..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.cs.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Několikrát zadaný globální oddíl
-
-
-
-
- Neuzavřený globální oddíl
-
-
-
-
-
- Neuzavřený oddíl projektu
-
-
-
-
- Neplatný typ oddílu: {0}
-
-
-
-
- Chybí ID oddílu
-
-
-
-
- Nenalezena koncová značka oddílu
-
-
-
-
- Neplatný formát na řádku {0}: {1}
-
-
-
-
- V oddíle projektu chybí {0}, když analýza řádku začíná na pozici {1}.
-
-
-
-
- V sadě vlastností chybí {0}.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.de.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.de.xlf
deleted file mode 100644
index 5e6f48830..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.de.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Globaler Abschnitt mehrmals angegeben
-
-
-
-
- Globaler Abschnitt nicht geschlossen
-
-
-
-
-
- Projektabschnitt nicht geschlossen
-
-
-
-
- Ungültiger Abschnittstyp: {0}
-
-
-
-
- Abschnitts-ID fehlt
-
-
-
-
- Schließendes Abschnittstag nicht gefunden
-
-
-
-
- Ungültiges Format in Zeile {0}: {1}
-
-
-
-
- Im Projektabschnitt fehlt "{0}" beim Analysieren des Zeilenbeginns in Position {1}
-
-
-
-
- Im Eigenschaftensatz fehlt "{0}"
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.es.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.es.xlf
deleted file mode 100644
index 365664c20..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.es.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Sección global especificada más de una vez
-
-
-
-
- Sección global no cerrada
-
-
-
-
-
- Sección de proyecto no cerrada
-
-
-
-
- Tipo de sección no válido: {0}
-
-
-
-
- Id. de sección omitido
-
-
-
-
- No se encuentra la etiqueta de cierre de la sección
-
-
-
-
- Formato no válido en línea {0}: {1}
-
-
-
-
- Falta la sección del proyecto "{0}" al analizar la línea que inicia en la posición {1}
-
-
-
-
- A la propiedad establecida le falta "{0}"
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.fr.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.fr.xlf
deleted file mode 100644
index dd00afbe0..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.fr.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Section Global spécifiée plusieurs fois
-
-
-
-
- Section Global non fermée
-
-
-
-
-
- Section Project non fermée
-
-
-
-
- Type de section non valide : {0}
-
-
-
-
- ID de section manquant
-
-
-
-
- Balise de fermeture de section introuvable
-
-
-
-
- Format non valide dans la ligne {0} : {1}
-
-
-
-
- '{0}' est manquant dans la section de projet lors de l'analyse de la ligne à partir de la position {1}
-
-
-
-
- '{0}' est manquant dans le jeu de propriétés
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.it.xlf
deleted file mode 100644
index a19ec0313..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.it.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- La sezione Global è stata specificata più di una volta
-
-
-
-
- La sezione Global non è stata chiusa
-
-
-
-
-
- La sezione Project non è stata chiusa
-
-
-
-
- Tipo di sezione non valido: {0}
-
-
-
-
- Manca l'ID sezione
-
-
-
-
- Il tag di chiusura sessione non è stato trovato
-
-
-
-
- Formato non valido alla riga {0}: {1}
-
-
-
-
- Nella sezione del progetto manca '{0}' quando si analizza la riga a partire dalla posizione {1}
-
-
-
-
- Nel set di proprietà manca '{0}'
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ja.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ja.xlf
deleted file mode 100644
index 0f7670d89..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ja.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- グローバル セクションが 2 回以上指定されています
-
-
-
-
- グローバル セクションが閉じられていません
-
-
-
-
-
- プロジェクト セクションが閉じられていません
-
-
-
-
- 無効なセクションの種類: {0}
-
-
-
-
- セクション ID がありません
-
-
-
-
- 終了セクション タグが見つかりません
-
-
-
-
- 行 {0} の形式が無効です: {1}
-
-
-
-
- 位置 {1} から始まる行の解析中にプロジェクト セクションが見つかりません '{0}'
-
-
-
-
- プロパティ セットが見つかりません '{0}'
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ko.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ko.xlf
deleted file mode 100644
index 7d8766ad5..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ko.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- 전역 섹션이 두 번 이상 지정됨
-
-
-
-
- 전역 섹션이 닫히지 않음
-
-
-
-
-
- 프로젝트 섹션이 닫히지 않음
-
-
-
-
- 잘못된 섹션 유형: {0}
-
-
-
-
- 섹션 ID가 누락됨
-
-
-
-
- 닫기 섹션 태그를 찾을 수 없음
-
-
-
-
- {0} 줄에 잘못된 형식: {1}
-
-
-
-
- {1} 위치에서 시작하는 줄을 구문 분석할 때 프로젝트 섹션에 '{0}'이(가) 없습니다.
-
-
-
-
- 속성 설정에 '{0}'이(가) 없습니다.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.pl.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.pl.xlf
deleted file mode 100644
index 957ee2041..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.pl.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Sekcja globalna została określona więcej niż raz
-
-
-
-
- Nie zamknięto sekcji globalnej
-
-
-
-
-
- Nie zamknięto sekcji projektu
-
-
-
-
- Nieprawidłowy typ sekcji: {0}
-
-
-
-
- Brak identyfikatora sekcji
-
-
-
-
- Nie odnaleziono tagu zamykającego sekcję
-
-
-
-
- Nieprawidłowy format w wierszu {0}: {1}
-
-
-
-
- W sekcji projektu brakuje elementu „{0}” podczas analizowania wiersza, począwszy od pozycji {1}
-
-
-
-
- W zestawie właściwości brakuje elementu „{0}”
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.pt-BR.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.pt-BR.xlf
deleted file mode 100644
index 877faf844..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.pt-BR.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Seção global especificada mais de uma vez
-
-
-
-
- Seção global não fechada
-
-
-
-
-
- Seção de projeto não fechada
-
-
-
-
- Tipo de seção inválido: {0}
-
-
-
-
- ID de sessão ausente
-
-
-
-
- Marca de fechamento de seção não encontrada
-
-
-
-
- Formato inválido na linha {0}: {1}
-
-
-
-
- A seção do projeto está sem o '{0}' ao analisar a linha na posição {1}
-
-
-
-
- O conjunto de propriedade está sem '{0}'
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ru.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ru.xlf
deleted file mode 100644
index 7caa01a43..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.ru.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Глобальный раздел указан более одного раза.
-
-
-
-
- Глобальный раздел не закрыт.
-
-
-
-
-
- Раздел проекта не закрыт.
-
-
-
-
- Недопустимый тип раздела: {0}
-
-
-
-
- Отсутствует идентификатор раздела.
-
-
-
-
- Закрывающий тег раздела не найден.
-
-
-
-
- Формат в строке {0} недопустим: {1}
-
-
-
-
- В разделе проекта отсутствует "{0}" при анализе строки с начальной позицией {1}
-
-
-
-
- В наборе свойств отсутствует "{0}"
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.tr.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.tr.xlf
deleted file mode 100644
index a7c5cba6b..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.tr.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- Genel bölüm birden çok kez belirtilmiş
-
-
-
-
- Genel bölüm kapatılmadı
-
-
-
-
-
- Proje bölümü kapatılmadı
-
-
-
-
- Geçersiz bölüm türü: {0}
-
-
-
-
- Bölüm kimliği eksik
-
-
-
-
- Kapatma bölümü etiketi bulunamadı
-
-
-
-
- {0}. satırda geçersiz biçim: {1}
-
-
-
-
- {1}. konumdan başlayan satır ayrıştırılırken proje bölümünde '{0}' eksik
-
-
-
-
- Özellik kümesinde '{0}' eksik
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.xlf
deleted file mode 100644
index 743ec3778..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.xlf
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.zh-Hans.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.zh-Hans.xlf
deleted file mode 100644
index b353d1247..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.zh-Hans.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- 多次指定了全局节
-
-
-
-
- 未关闭全局节
-
-
-
-
-
- 未关闭项目节
-
-
-
-
- 无效的节类型: {0}
-
-
-
-
- 缺少节 ID
-
-
-
-
- 未找到结束节标记
-
-
-
-
- 行 {0} 存在无效格式: {1}
-
-
-
-
- 分析从位置 {1} 开始的行时,项目节缺少“{0}”
-
-
-
-
- 属性集缺少“{0}”
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.zh-Hant.xlf b/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.zh-Hant.xlf
deleted file mode 100644
index 7fef8a4f8..000000000
--- a/src/Microsoft.DotNet.Cli.Sln.Internal/xlf/LocalizableStrings.zh-Hant.xlf
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
- 全域區段指定了一次以上
-
-
-
-
- 全域區段未關閉
-
-
-
-
-
- 專案區段未關閉
-
-
-
-
- 區段類型無效: {0}
-
-
-
-
- 遺漏區段識別碼
-
-
-
-
- 找不到關閉區段標記
-
-
-
-
- 第 {0} 行的格式不正確: {1}
-
-
-
-
- 從位置 {1} 開始剖析程式行時,專案區段缺少 '{0}'
-
-
-
-
- 屬性集缺少 '{0}'
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Cli.Utils/AnsiColorExtensions.cs b/src/Microsoft.DotNet.Cli.Utils/AnsiColorExtensions.cs
deleted file mode 100644
index 08c617e87..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/AnsiColorExtensions.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public static class AnsiColorExtensions
- {
- public static string Black(this string text)
- {
- return "\x1B[30m" + text + "\x1B[39m";
- }
-
- public static string Red(this string text)
- {
- return "\x1B[31m" + text + "\x1B[39m";
- }
- public static string Green(this string text)
- {
- return "\x1B[32m" + text + "\x1B[39m";
- }
-
- public static string Yellow(this string text)
- {
- return "\x1B[33m" + text + "\x1B[39m";
- }
-
- public static string Blue(this string text)
- {
- return "\x1B[34m" + text + "\x1B[39m";
- }
-
- public static string Magenta(this string text)
- {
- return "\x1B[35m" + text + "\x1B[39m";
- }
-
- public static string Cyan(this string text)
- {
- return "\x1B[36m" + text + "\x1B[39m";
- }
-
- public static string White(this string text)
- {
- return "\x1B[37m" + text + "\x1B[39m";
- }
-
- public static string Bold(this string text)
- {
- return "\x1B[1m" + text + "\x1B[22m";
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/AnsiConsole.cs b/src/Microsoft.DotNet.Cli.Utils/AnsiConsole.cs
deleted file mode 100644
index 0cb60923f..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/AnsiConsole.cs
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.IO;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class AnsiConsole
- {
- private const int Light = 0x08;
-
- private AnsiConsole(TextWriter writer)
- {
- Writer = writer;
-
- OriginalForegroundColor = Console.ForegroundColor;
- _boldRecursion = ((int)OriginalForegroundColor & Light) != 0 ? 1 : 0;
- }
-
- private int _boldRecursion;
-
- public static AnsiConsole GetOutput()
- {
- return new AnsiConsole(Console.Out);
- }
-
- public static AnsiConsole GetError()
- {
- return new AnsiConsole(Console.Error);
- }
-
- public TextWriter Writer { get; }
-
- public ConsoleColor OriginalForegroundColor { get; }
-
- private void SetColor(ConsoleColor color)
- {
- int c = (int)color;
-
- Console.ForegroundColor =
- c < 0 ? color : // unknown, just use it
- _boldRecursion > 0 ? (ConsoleColor)(c | Light) : // ensure color is light
- (ConsoleColor)(c & ~Light); // ensure color is dark
- }
-
- private void SetBold(bool bold)
- {
- _boldRecursion += bold ? 1 : -1;
- if (_boldRecursion > 1 || (_boldRecursion == 1 && !bold))
- {
- return;
- }
-
- // switches on _boldRecursion to handle boldness
- SetColor(Console.ForegroundColor);
- }
-
- public void WriteLine(string message)
- {
- Write(message);
- Writer.WriteLine();
- }
-
-
- public void Write(string message)
- {
- var escapeScan = 0;
- for (;;)
- {
- var escapeIndex = message.IndexOf("\x1b[", escapeScan, StringComparison.Ordinal);
- if (escapeIndex == -1)
- {
- var text = message.Substring(escapeScan);
- Writer.Write(text);
- break;
- }
- else
- {
- var startIndex = escapeIndex + 2;
- var endIndex = startIndex;
- while (endIndex != message.Length &&
- message[endIndex] >= 0x20 &&
- message[endIndex] <= 0x3f)
- {
- endIndex += 1;
- }
-
- var text = message.Substring(escapeScan, escapeIndex - escapeScan);
- Writer.Write(text);
- if (endIndex == message.Length)
- {
- break;
- }
-
- switch (message[endIndex])
- {
- case 'm':
- int value;
- if (int.TryParse(message.Substring(startIndex, endIndex - startIndex), out value))
- {
- switch (value)
- {
- case 1:
- SetBold(true);
- break;
- case 22:
- SetBold(false);
- break;
- case 30:
- SetColor(ConsoleColor.Black);
- break;
- case 31:
- SetColor(ConsoleColor.Red);
- break;
- case 32:
- SetColor(ConsoleColor.Green);
- break;
- case 33:
- SetColor(ConsoleColor.Yellow);
- break;
- case 34:
- SetColor(ConsoleColor.Blue);
- break;
- case 35:
- SetColor(ConsoleColor.Magenta);
- break;
- case 36:
- SetColor(ConsoleColor.Cyan);
- break;
- case 37:
- SetColor(ConsoleColor.Gray);
- break;
- case 39:
- Console.ForegroundColor = OriginalForegroundColor;
- break;
- }
- }
- break;
- }
-
- escapeScan = endIndex + 1;
- }
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs b/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs
deleted file mode 100644
index c8469a9ac..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/ArgumentEscaper.cs
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public static class ArgumentEscaper
- {
- ///
- /// Undo the processing which took place to create string[] args in Main,
- /// so that the next process will receive the same string[] args
- ///
- /// See here for more info:
- /// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
- ///
- ///
- ///
- public static string EscapeAndConcatenateArgArrayForProcessStart(IEnumerable args)
- {
- return string.Join(" ", EscapeArgArray(args));
- }
-
- ///
- /// Undo the processing which took place to create string[] args in Main,
- /// so that the next process will receive the same string[] args
- ///
- /// See here for more info:
- /// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
- ///
- ///
- ///
- public static string EscapeAndConcatenateArgArrayForCmdProcessStart(IEnumerable args)
- {
- return string.Join(" ", EscapeArgArrayForCmd(args));
- }
-
- ///
- /// Undo the processing which took place to create string[] args in Main,
- /// so that the next process will receive the same string[] args
- ///
- /// See here for more info:
- /// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
- ///
- ///
- ///
- private static IEnumerable EscapeArgArray(IEnumerable args)
- {
- var escapedArgs = new List();
-
- foreach (var arg in args)
- {
- escapedArgs.Add(EscapeSingleArg(arg));
- }
-
- return escapedArgs;
- }
-
- ///
- /// This prefixes every character with the '^' character to force cmd to
- /// interpret the argument string literally. An alternative option would
- /// be to do this only for cmd metacharacters.
- ///
- /// See here for more info:
- /// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
- ///
- ///
- ///
- private static IEnumerable EscapeArgArrayForCmd(IEnumerable arguments)
- {
- var escapedArgs = new List();
-
- foreach (var arg in arguments)
- {
- escapedArgs.Add(EscapeArgForCmd(arg));
- }
-
- return escapedArgs;
- }
-
- public static string EscapeSingleArg(string arg)
- {
- var sb = new StringBuilder();
-
- var needsQuotes = ShouldSurroundWithQuotes(arg);
- var isQuoted = needsQuotes || IsSurroundedWithQuotes(arg);
-
- if (needsQuotes) sb.Append("\"");
-
- for (int i = 0; i < arg.Length; ++i)
- {
- var backslashCount = 0;
-
- // Consume All Backslashes
- while (i < arg.Length && arg[i] == '\\')
- {
- backslashCount++;
- i++;
- }
-
- // Escape any backslashes at the end of the arg
- // when the argument is also quoted.
- // This ensures the outside quote is interpreted as
- // an argument delimiter
- if (i == arg.Length && isQuoted)
- {
- sb.Append('\\', 2 * backslashCount);
- }
-
- // At then end of the arg, which isn't quoted,
- // just add the backslashes, no need to escape
- else if (i == arg.Length)
- {
- sb.Append('\\', backslashCount);
- }
-
- // Escape any preceding backslashes and the quote
- else if (arg[i] == '"')
- {
- sb.Append('\\', (2 * backslashCount) + 1);
- sb.Append('"');
- }
-
- // Output any consumed backslashes and the character
- else
- {
- sb.Append('\\', backslashCount);
- sb.Append(arg[i]);
- }
- }
-
- if (needsQuotes) sb.Append("\"");
-
- return sb.ToString();
- }
-
- ///
- /// Prepare as single argument to
- /// roundtrip properly through cmd.
- ///
- /// This prefixes every character with the '^' character to force cmd to
- /// interpret the argument string literally. An alternative option would
- /// be to do this only for cmd metacharacters.
- ///
- /// See here for more info:
- /// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
- ///
- ///
- ///
- private static string EscapeArgForCmd(string argument)
- {
- var sb = new StringBuilder();
-
- var quoted = ShouldSurroundWithQuotes(argument);
-
- if (quoted) sb.Append("^\"");
-
- // Prepend every character with ^
- // This is harmless when passing through cmd
- // and ensures cmd metacharacters are not interpreted
- // as such
- foreach (var character in argument)
- {
- sb.Append("^");
- sb.Append(character);
- }
-
- if (quoted) sb.Append("^\"");
-
- return sb.ToString();
- }
-
- internal static bool ShouldSurroundWithQuotes(string argument)
- {
- // Don't quote already quoted strings
- if (IsSurroundedWithQuotes(argument))
- {
- return false;
- }
-
- // Only quote if whitespace exists in the string
- return ArgumentContainsWhitespace(argument);
- }
-
- internal static bool IsSurroundedWithQuotes(string argument)
- {
- return argument.StartsWith("\"", StringComparison.Ordinal) &&
- argument.EndsWith("\"", StringComparison.Ordinal);
- }
-
- internal static bool ArgumentContainsWhitespace(string argument)
- {
- return argument.Contains(" ") || argument.Contains("\t") || argument.Contains("\n");
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/BlockingMemoryStream.cs b/src/Microsoft.DotNet.Cli.Utils/BlockingMemoryStream.cs
deleted file mode 100644
index e80061b01..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/BlockingMemoryStream.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Concurrent;
-using System.IO;
-using System.Threading;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- ///
- /// An in-memory stream that will block any read calls until something was written to it.
- ///
- public sealed class BlockingMemoryStream : Stream
- {
- private readonly BlockingCollection _buffers = new BlockingCollection();
- private ArraySegment _remaining;
-
- public override void Write(byte[] buffer, int offset, int count)
- {
- byte[] tmp = new byte[count];
- Buffer.BlockCopy(buffer, offset, tmp, 0, count);
- _buffers.Add(tmp);
- }
-
- public override int Read(byte[] buffer, int offset, int count)
- {
- if (count == 0)
- {
- return 0;
- }
-
- if (_remaining.Count == 0)
- {
- byte[] tmp;
- if (!_buffers.TryTake(out tmp, Timeout.Infinite) || tmp.Length == 0)
- {
- return 0;
- }
- _remaining = new ArraySegment(tmp, 0, tmp.Length);
- }
-
- if (_remaining.Count <= count)
- {
- count = _remaining.Count;
- Buffer.BlockCopy(_remaining.Array, _remaining.Offset, buffer, offset, count);
- _remaining = default(ArraySegment);
- }
- else
- {
- Buffer.BlockCopy(_remaining.Array, _remaining.Offset, buffer, offset, count);
- _remaining = new ArraySegment(_remaining.Array, _remaining.Offset + count, _remaining.Count - count);
- }
- return count;
- }
-
- public void DoneWriting()
- {
- _buffers.CompleteAdding();
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- _buffers.Dispose();
- }
-
- base.Dispose(disposing);
- }
-
- public override bool CanRead => true;
- public override bool CanSeek => false;
- public override bool CanWrite => true;
- public override long Length { get { throw new NotImplementedException(); } }
- public override long Position { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } }
- public override void Flush() { }
- public override long Seek(long offset, SeekOrigin origin) { throw new NotImplementedException(); }
- public override void SetLength(long value) { throw new NotImplementedException(); }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/BuiltInCommand.cs b/src/Microsoft.DotNet.Cli.Utils/BuiltInCommand.cs
deleted file mode 100644
index f862ba83d..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/BuiltInCommand.cs
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- ///
- /// A Command that is capable of running in the current process.
- ///
- public class BuiltInCommand : ICommand
- {
- private readonly IEnumerable _commandArgs;
- private readonly Func _builtInCommand;
- private readonly IBuiltInCommandEnvironment _environment;
- private readonly StreamForwarder _stdOut;
- private readonly StreamForwarder _stdErr;
- private string _workingDirectory;
-
- public string CommandName { get; }
- public string CommandArgs => string.Join(" ", _commandArgs);
-
- public BuiltInCommand(string commandName, IEnumerable commandArgs, Func builtInCommand)
- : this(commandName, commandArgs, builtInCommand, new BuiltInCommandEnvironment())
- {
- }
-
- internal BuiltInCommand(string commandName, IEnumerable commandArgs, Func builtInCommand, IBuiltInCommandEnvironment environment)
- {
- CommandName = commandName;
- _commandArgs = commandArgs;
- _builtInCommand = builtInCommand;
- _environment = environment;
-
- _stdOut = new StreamForwarder();
- _stdErr = new StreamForwarder();
- }
-
- public CommandResult Execute()
- {
- TextWriter originalConsoleOut = _environment.GetConsoleOut();
- TextWriter originalConsoleError = _environment.GetConsoleError();
- string originalWorkingDirectory = _environment.GetWorkingDirectory();
-
- try
- {
- // redirecting the standard out and error so we can forward
- // the output to the caller
- using (BlockingMemoryStream outStream = new BlockingMemoryStream())
- using (BlockingMemoryStream errorStream = new BlockingMemoryStream())
- {
- _environment.SetConsoleOut(new StreamWriter(outStream) { AutoFlush = true });
- _environment.SetConsoleError(new StreamWriter(errorStream) { AutoFlush = true });
-
- // Reset the Reporters to the new Console Out and Error.
- Reporter.Reset();
-
- if (!string.IsNullOrEmpty(_workingDirectory))
- {
- _environment.SetWorkingDirectory(_workingDirectory);
- }
-
- var taskOut = _stdOut.BeginRead(new StreamReader(outStream));
- var taskErr = _stdErr.BeginRead(new StreamReader(errorStream));
-
- int exitCode = _builtInCommand(_commandArgs.ToArray());
-
- outStream.DoneWriting();
- errorStream.DoneWriting();
-
- Task.WaitAll(taskOut, taskErr);
-
- // fake out a ProcessStartInfo using the Muxer command name, since this is a built-in command
- ProcessStartInfo startInfo = new ProcessStartInfo(new Muxer().MuxerPath, $"{CommandName} {CommandArgs}");
- return new CommandResult(startInfo, exitCode, null, null);
- }
- }
- finally
- {
- _environment.SetConsoleOut(originalConsoleOut);
- _environment.SetConsoleError(originalConsoleError);
- _environment.SetWorkingDirectory(originalWorkingDirectory);
-
- Reporter.Reset();
- }
- }
-
- public ICommand OnOutputLine(Action handler)
- {
- if (handler == null)
- {
- throw new ArgumentNullException(nameof(handler));
- }
-
- _stdOut.ForwardTo(writeLine: handler);
-
- return this;
- }
-
- public ICommand OnErrorLine(Action handler)
- {
- if (handler == null)
- {
- throw new ArgumentNullException(nameof(handler));
- }
-
- _stdErr.ForwardTo(writeLine: handler);
-
- return this;
- }
-
- public ICommand WorkingDirectory(string workingDirectory)
- {
- _workingDirectory = workingDirectory;
-
- return this;
- }
-
- private class BuiltInCommandEnvironment : IBuiltInCommandEnvironment
- {
- public TextWriter GetConsoleOut()
- {
- return Console.Out;
- }
-
- public void SetConsoleOut(TextWriter newOut)
- {
- Console.SetOut(newOut);
- }
-
- public TextWriter GetConsoleError()
- {
- return Console.Error;
- }
-
- public void SetConsoleError(TextWriter newError)
- {
- Console.SetError(newError);
- }
-
- public string GetWorkingDirectory()
- {
- return Directory.GetCurrentDirectory();
- }
-
- public void SetWorkingDirectory(string path)
- {
- Directory.SetCurrentDirectory(path);
- }
- }
-
- public CommandResolutionStrategy ResolutionStrategy
- {
- get
- {
- throw new NotImplementedException();
- }
- }
-
- public ICommand CaptureStdErr()
- {
- _stdErr.Capture();
-
- return this;
- }
-
- public ICommand CaptureStdOut()
- {
- _stdOut.Capture();
-
- return this;
- }
-
- public ICommand EnvironmentVariable(string name, string value)
- {
- throw new NotImplementedException();
- }
-
- public ICommand ForwardStdErr(TextWriter to = null, bool onlyIfVerbose = false, bool ansiPassThrough = true)
- {
- throw new NotImplementedException();
- }
-
- public ICommand ForwardStdOut(TextWriter to = null, bool onlyIfVerbose = false, bool ansiPassThrough = true)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/Command.cs b/src/Microsoft.DotNet.Cli.Utils/Command.cs
deleted file mode 100644
index 3413c1350..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/Command.cs
+++ /dev/null
@@ -1,306 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using NuGet.Frameworks;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class Command : ICommand
- {
- private readonly Process _process;
-
- private StreamForwarder _stdOut;
-
- private StreamForwarder _stdErr;
-
- private bool _running = false;
-
- private Command(CommandSpec commandSpec)
- {
- var psi = new ProcessStartInfo
- {
- FileName = commandSpec.Path,
- Arguments = commandSpec.Args,
- UseShellExecute = false
- };
-
- foreach(var environmentVariable in commandSpec.EnvironmentVariables)
- {
- if (!psi.Environment.ContainsKey(environmentVariable.Key))
- {
- psi.Environment.Add(environmentVariable.Key, environmentVariable.Value);
- }
- }
-
- _process = new Process
- {
- StartInfo = psi
- };
-
- ResolutionStrategy = commandSpec.ResolutionStrategy;
- }
-
- public static Command CreateDotNet(
- string commandName,
- IEnumerable args,
- NuGetFramework framework = null,
- string configuration = Constants.DefaultConfiguration)
- {
- return Create("dotnet",
- new[] { commandName }.Concat(args),
- framework,
- configuration: configuration);
- }
-
- ///
- /// Create a command with the specified arg array. Args will be
- /// escaped properly to ensure that exactly the strings in this
- /// array will be present in the corresponding argument array
- /// in the command's process.
- ///
- public static Command Create(
- string commandName,
- IEnumerable args,
- NuGetFramework framework = null,
- string configuration = Constants.DefaultConfiguration,
- string outputPath = null,
- string applicationName = null)
- {
- return Create(
- new DefaultCommandResolverPolicy(),
- commandName,
- args,
- framework,
- configuration,
- outputPath,
- applicationName);
- }
-
- public static Command Create(
- ICommandResolverPolicy commandResolverPolicy,
- string commandName,
- IEnumerable args,
- NuGetFramework framework = null,
- string configuration = Constants.DefaultConfiguration,
- string outputPath = null,
- string applicationName = null)
- {
- var commandSpec = CommandResolver.TryResolveCommandSpec(
- commandResolverPolicy,
- commandName,
- args,
- framework,
- configuration: configuration,
- outputPath: outputPath,
- applicationName: applicationName);
-
- if (commandSpec == null)
- {
- throw new CommandUnknownException(commandName);
- }
-
- var command = new Command(commandSpec);
-
- return command;
- }
-
- public static Command Create(CommandSpec commandSpec)
- {
- return new Command(commandSpec);
- }
-
- public CommandResult Execute()
- {
-
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.RunningFileNameArguments,
- _process.StartInfo.FileName,
- _process.StartInfo.Arguments));
-
- ThrowIfRunning();
-
- _running = true;
-
- _process.EnableRaisingEvents = true;
-
-#if DEBUG
- var sw = Stopwatch.StartNew();
-
- Reporter.Verbose.WriteLine($"> {FormatProcessInfo(_process.StartInfo)}".White());
-#endif
- using (PerfTrace.Current.CaptureTiming($"{Path.GetFileNameWithoutExtension(_process.StartInfo.FileName)} {_process.StartInfo.Arguments}"))
- {
- _process.Start();
-
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.ProcessId,
- _process.Id));
-
- var taskOut = _stdOut?.BeginRead(_process.StandardOutput);
- var taskErr = _stdErr?.BeginRead(_process.StandardError);
- _process.WaitForExit();
-
- taskOut?.Wait();
- taskErr?.Wait();
- }
-
- var exitCode = _process.ExitCode;
-
-#if DEBUG
- var message = string.Format(
- LocalizableStrings.ProcessExitedWithCode,
- FormatProcessInfo(_process.StartInfo),
- exitCode,
- sw.ElapsedMilliseconds);
- if (exitCode == 0)
- {
- Reporter.Verbose.WriteLine(message.Green());
- }
- else
- {
- Reporter.Verbose.WriteLine(message.Red().Bold());
- }
-#endif
-
- return new CommandResult(
- _process.StartInfo,
- exitCode,
- _stdOut?.CapturedOutput,
- _stdErr?.CapturedOutput);
- }
-
- public ICommand WorkingDirectory(string projectDirectory)
- {
- _process.StartInfo.WorkingDirectory = projectDirectory;
- return this;
- }
-
- public ICommand EnvironmentVariable(string name, string value)
- {
-#if NET451
- _process.StartInfo.EnvironmentVariables[name] = value;
-#else
- _process.StartInfo.Environment[name] = value;
-#endif
- return this;
- }
-
- public ICommand CaptureStdOut()
- {
- ThrowIfRunning();
- EnsureStdOut();
- _stdOut.Capture();
- return this;
- }
-
- public ICommand CaptureStdErr()
- {
- ThrowIfRunning();
- EnsureStdErr();
- _stdErr.Capture();
- return this;
- }
-
- public ICommand ForwardStdOut(TextWriter to = null, bool onlyIfVerbose = false, bool ansiPassThrough = true)
- {
- ThrowIfRunning();
- if (!onlyIfVerbose || CommandContext.IsVerbose())
- {
- EnsureStdOut();
-
- if (to == null)
- {
- _stdOut.ForwardTo(writeLine: Reporter.Output.WriteLine);
- EnvironmentVariable(CommandContext.Variables.AnsiPassThru, ansiPassThrough.ToString());
- }
- else
- {
- _stdOut.ForwardTo(writeLine: to.WriteLine);
- }
- }
- return this;
- }
-
- public ICommand ForwardStdErr(TextWriter to = null, bool onlyIfVerbose = false, bool ansiPassThrough = true)
- {
- ThrowIfRunning();
- if (!onlyIfVerbose || CommandContext.IsVerbose())
- {
- EnsureStdErr();
-
- if (to == null)
- {
- _stdErr.ForwardTo(writeLine: Reporter.Error.WriteLine);
- EnvironmentVariable(CommandContext.Variables.AnsiPassThru, ansiPassThrough.ToString());
- }
- else
- {
- _stdErr.ForwardTo(writeLine: to.WriteLine);
- }
- }
- return this;
- }
-
- public ICommand OnOutputLine(Action handler)
- {
- ThrowIfRunning();
- EnsureStdOut();
-
- _stdOut.ForwardTo(writeLine: handler);
- return this;
- }
-
- public ICommand OnErrorLine(Action handler)
- {
- ThrowIfRunning();
- EnsureStdErr();
-
- _stdErr.ForwardTo(writeLine: handler);
- return this;
- }
-
- public CommandResolutionStrategy ResolutionStrategy { get; }
-
- public string CommandName => _process.StartInfo.FileName;
-
- public string CommandArgs => _process.StartInfo.Arguments;
-
- private string FormatProcessInfo(ProcessStartInfo info)
- {
- if (string.IsNullOrWhiteSpace(info.Arguments))
- {
- return info.FileName;
- }
-
- return info.FileName + " " + info.Arguments;
- }
-
- private void EnsureStdOut()
- {
- _stdOut = _stdOut ?? new StreamForwarder();
- _process.StartInfo.RedirectStandardOutput = true;
- }
-
- private void EnsureStdErr()
- {
- _stdErr = _stdErr ?? new StreamForwarder();
- _process.StartInfo.RedirectStandardError = true;
- }
-
- private void ThrowIfRunning([CallerMemberName] string memberName = null)
- {
- if (_running)
- {
- throw new InvalidOperationException(string.Format(
- LocalizableStrings.UnableToInvokeMemberNameAfterCommand,
- memberName));
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandContext.cs b/src/Microsoft.DotNet.Cli.Utils/CommandContext.cs
deleted file mode 100644
index 9913cde73..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandContext.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public static class CommandContext
- {
- public static class Variables
- {
- private static readonly string Prefix = "DOTNET_CLI_CONTEXT_";
- public static readonly string Verbose = Prefix + "VERBOSE";
- public static readonly string AnsiPassThru = Prefix + "ANSI_PASS_THRU";
- }
-
- private static Lazy _verbose = new Lazy(() => Env.GetEnvironmentVariableAsBool(Variables.Verbose));
- private static Lazy _ansiPassThru = new Lazy(() => Env.GetEnvironmentVariableAsBool(Variables.AnsiPassThru));
-
- public static bool IsVerbose()
- {
- return _verbose.Value;
- }
-
- public static bool ShouldPassAnsiCodesThrough()
- {
- return _ansiPassThru.Value;
- }
-
- public static void SetVerbose(bool value)
- {
- _verbose = new Lazy(() => value);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandFactory.cs b/src/Microsoft.DotNet.Cli.Utils/CommandFactory.cs
deleted file mode 100644
index f4802113b..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandFactory.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-using NuGet.Frameworks;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class CommandFactory : ICommandFactory
- {
- public ICommand Create(
- string commandName,
- IEnumerable args,
- NuGetFramework framework = null,
- string configuration = Constants.DefaultConfiguration)
- {
- return Command.Create(commandName, args, framework, configuration);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Chain.cs b/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Chain.cs
deleted file mode 100644
index 5032b659f..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Chain.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils.CommandParsing
-{
- public struct Chain
- {
- public Chain(TLeft left, TDown down)
- : this()
- {
- Left = left;
- Down = down;
- }
-
- public readonly TLeft Left;
- public readonly TDown Down;
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/CommandGrammar.cs b/src/Microsoft.DotNet.Cli.Utils/CommandParsing/CommandGrammar.cs
deleted file mode 100644
index 5d682ab39..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/CommandGrammar.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.DotNet.Cli.Utils;
-
-namespace Microsoft.DotNet.Cli.Utils.CommandParsing
-{
- public class CommandGrammar : Grammar
- {
- private CommandGrammar(Func variable, bool preserveSurroundingQuotes)
- {
- var environmentVariablePiece = Ch('%').And(Rep(Ch().Not(Ch('%')))).And(Ch('%')).Left().Down().Str()
- .Build(key => variable(key) ?? "%" + key + "%");
-
- var escapeSequencePiece =
- Ch('%').And(Ch('%')).Build(_=>"%")
- .Or(Ch('^').And(Ch('^')).Build(_ => "^"))
- .Or(Ch('\\').And(Ch('\\')).Build(_ => "\\"))
- .Or(Ch('\\').And(Ch('\"')).Build(_ => "\""))
- ;
-
- var specialPiece = environmentVariablePiece.Or(escapeSequencePiece);
-
- var unquotedPiece = Rep1(Ch().Not(specialPiece).Not(Ch(' '))).Str();
-
- var quotedPiece = Rep1(Ch().Not(specialPiece).Not(Ch('\"'))).Str();
-
- var unquotedTerm = Rep1(unquotedPiece.Or(specialPiece)).Str();
-
- var quotedTerm = Ch('\"').And(Rep(quotedPiece.Or(specialPiece)).Str()).And(Ch('\"')).Left().Down();
- if (preserveSurroundingQuotes)
- {
- // Str() value assigned to quotedTerm does not include quotation marks surrounding the quoted or
- // special piece. Add those quotes back if requested.
- quotedTerm = quotedTerm.Build(str => "\"" + str + "\"");
- }
-
- var whitespace = Rep(Ch(' '));
-
- var term = whitespace.And(quotedTerm.Or(unquotedTerm)).And(whitespace).Left().Down();
-
- Parse = Rep(term);
- }
-
- public readonly Parser> Parse;
-
- public static string[] Process(string text, Func variables, bool preserveSurroundingQuotes)
- {
- var grammar = new CommandGrammar(variables, preserveSurroundingQuotes);
- var cursor = new Cursor(text, 0, text.Length);
-
- var result = grammar.Parse(cursor);
- if (!result.Remainder.IsEnd)
- {
- throw new ArgumentException(string.Format(LocalizableStrings.MalformedText, nameof(text)));
- }
- return result.Value.ToArray();
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Cursor.cs b/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Cursor.cs
deleted file mode 100644
index b46bf92e3..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Cursor.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils.CommandParsing
-{
- public struct Cursor
- {
- private readonly string _text;
- private readonly int _start;
- private readonly int _end;
-
- public Cursor(string text, int start, int end)
- {
- _text = text;
- _start = start;
- _end = end;
- }
-
- public bool IsEnd
- {
- get { return _start == _end; }
- }
-
- public char Peek(int index)
- {
- return (index + _start) >= _end ? (char)0 : _text[index + _start];
- }
-
- public Result Advance(TValue result, int length)
- {
- return new Result(result, new Cursor(_text, _start + length, _end));
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Grammar.cs b/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Grammar.cs
deleted file mode 100644
index 431e65023..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Grammar.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Microsoft.DotNet.Cli.Utils.CommandParsing
-{
- public class Grammar
- {
- protected static Parser> Rep1(Parser parser)
- {
- Parser> rep = Rep(parser);
- return pos =>
- {
- var result = rep(pos);
- return result.IsEmpty || !result.Value.Any() ? Result>.Empty : result;
- };
- }
-
- protected static Parser> Rep(Parser parser)
- {
- return pos =>
- {
- var data = new List();
- for (; ; )
- {
- var result = parser(pos);
- if (result.IsEmpty) break;
- data.Add(result.Value);
- pos = result.Remainder;
- }
- return new Result>(data, pos);
- };
- }
-
- protected static Parser Ch()
- {
- return pos => pos.IsEnd ? Result.Empty : pos.Advance(pos.Peek(0), 1);
- }
-
- private static Parser IsEnd()
- {
- return pos => pos.IsEnd ? pos.Advance(true, 0) : Result.Empty;
- }
-
- protected static Parser Ch(char ch)
- {
- return pos => pos.Peek(0) != ch ? Result.Empty : pos.Advance(ch, 1);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Parser.cs b/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Parser.cs
deleted file mode 100644
index 6be28ec40..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Parser.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils.CommandParsing
-{
- public delegate Result Parser(Cursor cursor);
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/ParserExtensions.cs b/src/Microsoft.DotNet.Cli.Utils/CommandParsing/ParserExtensions.cs
deleted file mode 100644
index 69be3968b..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/ParserExtensions.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Microsoft.DotNet.Cli.Utils.CommandParsing
-{
- public static class ParserExtensions
- {
- public static Parser> And(this Parser parser1,
- Parser parser2)
- {
- return pos =>
- {
- var result1 = parser1(pos);
- if (result1.IsEmpty) return Result>.Empty;
- var result2 = parser2(result1.Remainder);
- if (result2.IsEmpty) return Result>.Empty;
- return result2.AsValue(new Chain(result1.Value, result2.Value));
- };
- }
-
- public static Parser Or(this Parser parser1, Parser parser2)
- {
- return pos =>
- {
- var result1 = parser1(pos);
- if (!result1.IsEmpty) return result1;
- var result2 = parser2(pos);
- if (!result2.IsEmpty) return result2;
- return Result.Empty;
- };
- }
-
- public static Parser Not(this Parser parser1, Parser parser2)
- {
- return pos =>
- {
- var result2 = parser2(pos);
- if (!result2.IsEmpty) return Result.Empty;
- return parser1(pos);
- };
- }
-
- public static Parser Left(this Parser> parser)
- {
- return pos =>
- {
- var result = parser(pos);
- return result.IsEmpty ? Result.Empty : result.AsValue(result.Value.Left);
- };
- }
-
- public static Parser Down(this Parser> parser)
- {
- return pos =>
- {
- var result = parser(pos);
- return result.IsEmpty ? Result.Empty : result.AsValue(result.Value.Down);
- };
- }
-
- public static Parser Build(this Parser parser, Func builder)
- {
- return pos =>
- {
- var result = parser(pos);
- if (result.IsEmpty) return Result.Empty;
- return result.AsValue(builder(result.Value));
- };
- }
-
- public static Parser Str(this Parser> parser)
- {
- return parser.Build(x => new string(x.ToArray()));
- }
-
- public static Parser Str(this Parser> parser)
- {
- return parser.Build(x => String.Concat(x.ToArray()));
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Result.cs b/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Result.cs
deleted file mode 100644
index 26eff19e6..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandParsing/Result.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils.CommandParsing
-{
- public struct Result
- {
- public Result(TValue value, Cursor remainder)
- : this()
- {
- Value = value;
- Remainder = remainder;
- }
-
- public readonly TValue Value;
- public readonly Cursor Remainder;
-
- public bool IsEmpty
- {
- get { return Equals(this, default(Result)); }
- }
-
- public static Result Empty
- {
- get { return default(Result); }
- }
-
- public Result AsValue(TValue2 value2)
- {
- return new Result(value2, Remainder);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AbstractPathBasedCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AbstractPathBasedCommandResolver.cs
deleted file mode 100644
index 396083fbc..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AbstractPathBasedCommandResolver.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-namespace Microsoft.DotNet.Cli.Utils
-{
- public abstract class AbstractPathBasedCommandResolver : ICommandResolver
- {
- protected IEnvironmentProvider _environment;
- protected IPlatformCommandSpecFactory _commandSpecFactory;
-
- public AbstractPathBasedCommandResolver(IEnvironmentProvider environment,
- IPlatformCommandSpecFactory commandSpecFactory)
- {
- if (environment == null)
- {
- throw new ArgumentNullException(nameof(environment));
- }
-
- if (commandSpecFactory == null)
- {
- throw new ArgumentNullException(nameof(commandSpecFactory));
- }
-
- _environment = environment;
- _commandSpecFactory = commandSpecFactory;
- }
-
- public CommandSpec Resolve(CommandResolverArguments commandResolverArguments)
- {
- if (commandResolverArguments.CommandName == null)
- {
- return null;
- }
-
- var commandPath = ResolveCommandPath(commandResolverArguments);
-
- if (commandPath == null)
- {
- return null;
- }
-
- return _commandSpecFactory.CreateCommandSpec(
- commandResolverArguments.CommandName,
- commandResolverArguments.CommandArguments.OrEmptyIfNull(),
- commandPath,
- GetCommandResolutionStrategy(),
- _environment);
- }
-
- internal abstract string ResolveCommandPath(CommandResolverArguments commandResolverArguments);
- internal abstract CommandResolutionStrategy GetCommandResolutionStrategy();
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AppBaseCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AppBaseCommandResolver.cs
deleted file mode 100644
index 85192dc29..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AppBaseCommandResolver.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using Microsoft.DotNet.PlatformAbstractions;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class AppBaseCommandResolver : AbstractPathBasedCommandResolver
- {
- public AppBaseCommandResolver(IEnvironmentProvider environment,
- IPlatformCommandSpecFactory commandSpecFactory) : base(environment, commandSpecFactory) { }
-
- internal override string ResolveCommandPath(CommandResolverArguments commandResolverArguments)
- {
- return _environment.GetCommandPathFromRootPath(
- ApplicationEnvironment.ApplicationBasePath,
- commandResolverArguments.CommandName);
- }
-
- internal override CommandResolutionStrategy GetCommandResolutionStrategy()
- {
- return CommandResolutionStrategy.BaseDirectory;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AppBaseDllCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AppBaseDllCommandResolver.cs
deleted file mode 100644
index 95310fc8e..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/AppBaseDllCommandResolver.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.IO;
-using System.Linq;
-using Microsoft.DotNet.PlatformAbstractions;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class AppBaseDllCommandResolver : ICommandResolver
- {
- public CommandSpec Resolve(CommandResolverArguments commandResolverArguments)
- {
- if (commandResolverArguments.CommandName == null)
- {
- return null;
- }
- if (commandResolverArguments.CommandName.EndsWith(FileNameSuffixes.DotNet.DynamicLib))
- {
- var localPath = Path.Combine(ApplicationEnvironment.ApplicationBasePath,
- commandResolverArguments.CommandName);
- if (File.Exists(localPath))
- {
- var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(
- new[] { localPath }
- .Concat(commandResolverArguments.CommandArguments.OrEmptyIfNull()));
- return new CommandSpec(
- new Muxer().MuxerPath,
- escapedArgs,
- CommandResolutionStrategy.RootedPath);
- }
- }
- return null;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CommandResolutionStrategy.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CommandResolutionStrategy.cs
deleted file mode 100644
index da52bf31b..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CommandResolutionStrategy.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public enum CommandResolutionStrategy
- {
- // command loaded from a deps file
- DepsFile,
-
- // command loaded from project dependencies nuget package
- ProjectDependenciesPackage,
-
- // command loaded from project tools nuget package
- ProjectToolsPackage,
-
- // command loaded from the same directory as the executing assembly
- BaseDirectory,
-
- // command loaded from the same directory as a project.json file
- ProjectLocal,
-
- // command loaded from PATH environment variable
- Path,
-
- // command loaded from rooted path
- RootedPath,
-
- // command loaded from project build output path
- OutputPath,
-
- // command not found
- None
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CommandResolverArguments.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CommandResolverArguments.cs
deleted file mode 100644
index 2658dea5e..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CommandResolverArguments.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-using NuGet.Frameworks;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class CommandResolverArguments
- {
- public string CommandName { get; set; }
-
- public IEnumerable CommandArguments { get; set; }
-
- public NuGetFramework Framework { get; set; }
-
- public string OutputPath { get; set; }
-
- public string ProjectDirectory { get; set; }
-
- public string Configuration { get; set; }
-
- public IEnumerable InferredExtensions { get; set; }
-
- public string BuildBasePath { get; set; }
-
- public string DepsJsonFile { get; set; }
-
- public string ApplicationName { get; set; }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CompositeCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CompositeCommandResolver.cs
deleted file mode 100644
index 35a1ee041..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/CompositeCommandResolver.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class CompositeCommandResolver : ICommandResolver
- {
- private IList _orderedCommandResolvers;
-
- public IEnumerable OrderedCommandResolvers
- {
- get
- {
- return _orderedCommandResolvers;
- }
- }
-
- public CompositeCommandResolver()
- {
- _orderedCommandResolvers = new List();
- }
-
- public void AddCommandResolver(ICommandResolver commandResolver)
- {
- _orderedCommandResolvers.Add(commandResolver);
- }
-
- public CommandSpec Resolve(CommandResolverArguments commandResolverArguments)
- {
- foreach (var commandResolver in _orderedCommandResolvers)
- {
- var commandSpec = commandResolver.Resolve(commandResolverArguments);
-
- if (commandSpec != null)
- {
- return commandSpec;
- }
- }
-
- return null;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/DefaultCommandResolverPolicy.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/DefaultCommandResolverPolicy.cs
deleted file mode 100644
index d8a2c464b..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/DefaultCommandResolverPolicy.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using Microsoft.DotNet.PlatformAbstractions;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class DefaultCommandResolverPolicy : ICommandResolverPolicy
- {
- public CompositeCommandResolver CreateCommandResolver()
- {
- return Create();
- }
-
- public static CompositeCommandResolver Create()
- {
- var environment = new EnvironmentProvider();
- var packagedCommandSpecFactory = new PackagedCommandSpecFactoryWithCliRuntime();
- var publishedPathCommandSpecFactory = new PublishPathCommandSpecFactory();
-
- var platformCommandSpecFactory = default(IPlatformCommandSpecFactory);
- if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows)
- {
- platformCommandSpecFactory = new WindowsExePreferredCommandSpecFactory();
- }
- else
- {
- platformCommandSpecFactory = new GenericPlatformCommandSpecFactory();
- }
-
- return CreateDefaultCommandResolver(
- environment,
- packagedCommandSpecFactory,
- platformCommandSpecFactory,
- publishedPathCommandSpecFactory);
- }
-
- public static CompositeCommandResolver CreateDefaultCommandResolver(
- IEnvironmentProvider environment,
- IPackagedCommandSpecFactory packagedCommandSpecFactory,
- IPlatformCommandSpecFactory platformCommandSpecFactory,
- IPublishedPathCommandSpecFactory publishedPathCommandSpecFactory)
- {
- var compositeCommandResolver = new CompositeCommandResolver();
-
- compositeCommandResolver.AddCommandResolver(new MuxerCommandResolver());
- compositeCommandResolver.AddCommandResolver(new RootedCommandResolver());
- compositeCommandResolver.AddCommandResolver(
- new ProjectToolsCommandResolver(packagedCommandSpecFactory, environment));
- compositeCommandResolver.AddCommandResolver(new AppBaseDllCommandResolver());
- compositeCommandResolver.AddCommandResolver(
- new AppBaseCommandResolver(environment, platformCommandSpecFactory));
- compositeCommandResolver.AddCommandResolver(
- new PathCommandResolver(environment, platformCommandSpecFactory));
- compositeCommandResolver.AddCommandResolver(
- new PublishedPathCommandResolver(environment, publishedPathCommandSpecFactory));
-
- return compositeCommandResolver;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/DepsJsonCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/DepsJsonCommandResolver.cs
deleted file mode 100644
index 387dfc28f..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/DepsJsonCommandResolver.cs
+++ /dev/null
@@ -1,256 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-using Microsoft.Extensions.DependencyModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class DepsJsonCommandResolver : ICommandResolver
- {
- private static readonly string[] s_extensionPreferenceOrder = new[]
- {
- "",
- ".exe",
- ".dll"
- };
-
- private string _nugetPackageRoot;
- private Muxer _muxer;
-
- public DepsJsonCommandResolver(string nugetPackageRoot)
- : this(new Muxer(), nugetPackageRoot) { }
-
- public DepsJsonCommandResolver(Muxer muxer, string nugetPackageRoot)
- {
- _muxer = muxer;
- _nugetPackageRoot = nugetPackageRoot;
- }
-
- public CommandSpec Resolve(CommandResolverArguments commandResolverArguments)
- {
- if (commandResolverArguments.CommandName == null
- || commandResolverArguments.DepsJsonFile == null)
- {
- return null;
- }
-
- return ResolveFromDepsJsonFile(
- commandResolverArguments.CommandName,
- commandResolverArguments.CommandArguments.OrEmptyIfNull(),
- commandResolverArguments.DepsJsonFile);
- }
-
- private CommandSpec ResolveFromDepsJsonFile(
- string commandName,
- IEnumerable commandArgs,
- string depsJsonFile)
- {
- var dependencyContext = LoadDependencyContextFromFile(depsJsonFile);
-
- var commandPath = GetCommandPathFromDependencyContext(commandName, dependencyContext);
- if (commandPath == null)
- {
- return null;
- }
-
- return CreateCommandSpecUsingMuxerIfPortable(
- commandPath,
- commandArgs,
- depsJsonFile,
- CommandResolutionStrategy.DepsFile,
- _nugetPackageRoot,
- IsPortableApp(commandPath));
- }
-
- public DependencyContext LoadDependencyContextFromFile(string depsJsonFile)
- {
- DependencyContext dependencyContext = null;
- DependencyContextJsonReader contextReader = new DependencyContextJsonReader();
-
- using (var contextStream = File.OpenRead(depsJsonFile))
- {
- dependencyContext = contextReader.Read(contextStream);
- }
-
- return dependencyContext;
- }
-
- public string GetCommandPathFromDependencyContext(string commandName, DependencyContext dependencyContext)
- {
- var commandCandidates = new List();
-
- var assemblyCommandCandidates = GetCommandCandidates(
- commandName,
- dependencyContext,
- CommandCandidateType.RuntimeCommandCandidate);
- var nativeCommandCandidates = GetCommandCandidates(
- commandName,
- dependencyContext,
- CommandCandidateType.NativeCommandCandidate);
-
- commandCandidates.AddRange(assemblyCommandCandidates);
- commandCandidates.AddRange(nativeCommandCandidates);
-
- var command = ChooseCommandCandidate(commandCandidates);
-
- return command?.GetAbsoluteCommandPath(_nugetPackageRoot);
- }
-
- private IEnumerable GetCommandCandidates(
- string commandName,
- DependencyContext dependencyContext,
- CommandCandidateType commandCandidateType)
- {
- var commandCandidates = new List();
-
- foreach (var runtimeLibrary in dependencyContext.RuntimeLibraries)
- {
- IEnumerable runtimeAssetGroups = null;
-
- if (commandCandidateType == CommandCandidateType.NativeCommandCandidate)
- {
- runtimeAssetGroups = runtimeLibrary.NativeLibraryGroups;
- }
- else if (commandCandidateType == CommandCandidateType.RuntimeCommandCandidate)
- {
- runtimeAssetGroups = runtimeLibrary.RuntimeAssemblyGroups;
- }
-
- commandCandidates.AddRange(GetCommandCandidatesFromRuntimeAssetGroups(
- commandName,
- runtimeAssetGroups,
- runtimeLibrary.Name,
- runtimeLibrary.Version));
- }
-
- return commandCandidates;
- }
-
- private IEnumerable GetCommandCandidatesFromRuntimeAssetGroups(
- string commandName,
- IEnumerable runtimeAssetGroups,
- string PackageName,
- string PackageVersion)
- {
- var candidateAssetGroups = runtimeAssetGroups
- .Where(r => r.Runtime == string.Empty)
- .Where(a =>
- a.AssetPaths.Any(p =>
- Path.GetFileNameWithoutExtension(p).Equals(commandName, StringComparison.OrdinalIgnoreCase)));
-
- var commandCandidates = new List();
- foreach (var candidateAssetGroup in candidateAssetGroups)
- {
- var candidateAssetPaths = candidateAssetGroup.AssetPaths.Where(
- p => Path.GetFileNameWithoutExtension(p)
- .Equals(commandName, StringComparison.OrdinalIgnoreCase));
-
- foreach (var candidateAssetPath in candidateAssetPaths)
- {
- commandCandidates.Add(new CommandCandidate
- {
- PackageName = PackageName,
- PackageVersion = PackageVersion,
- RelativeCommandPath = candidateAssetPath
- });
- }
- }
-
- return commandCandidates;
- }
-
- private CommandCandidate ChooseCommandCandidate(IEnumerable commandCandidates)
- {
- foreach (var extension in s_extensionPreferenceOrder)
- {
- var candidate = commandCandidates
- .FirstOrDefault(p => Path.GetExtension(p.RelativeCommandPath)
- .Equals(extension, StringComparison.OrdinalIgnoreCase));
-
- if (candidate != null)
- {
- return candidate;
- }
- }
-
- return null;
- }
-
- private CommandSpec CreateCommandSpecUsingMuxerIfPortable(
- string commandPath,
- IEnumerable commandArgs,
- string depsJsonFile,
- CommandResolutionStrategy commandResolutionStrategy,
- string nugetPackagesRoot,
- bool isPortable)
- {
- var depsFileArguments = GetDepsFileArguments(depsJsonFile);
- var additionalProbingPathArguments = GetAdditionalProbingPathArguments();
-
- var muxerArgs = new List();
- muxerArgs.Add("exec");
- muxerArgs.AddRange(depsFileArguments);
- muxerArgs.AddRange(additionalProbingPathArguments);
- muxerArgs.Add(commandPath);
- muxerArgs.AddRange(commandArgs);
-
- var escapedArgString = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(muxerArgs);
-
- return new CommandSpec(_muxer.MuxerPath, escapedArgString, commandResolutionStrategy);
- }
-
- private bool IsPortableApp(string commandPath)
- {
- var commandDir = Path.GetDirectoryName(commandPath);
-
- var runtimeConfigPath = Directory.EnumerateFiles(commandDir)
- .FirstOrDefault(x => x.EndsWith("runtimeconfig.json"));
-
- if (runtimeConfigPath == null)
- {
- return false;
- }
-
- var runtimeConfig = new RuntimeConfig(runtimeConfigPath);
-
- return runtimeConfig.IsPortable;
- }
-
- private IEnumerable GetDepsFileArguments(string depsJsonFile)
- {
- return new[] { "--depsfile", depsJsonFile };
- }
-
- private IEnumerable GetAdditionalProbingPathArguments()
- {
- return new[] { "--additionalProbingPath", _nugetPackageRoot };
- }
-
- private class CommandCandidate
- {
- public string PackageName { get; set; }
- public string PackageVersion { get; set; }
- public string RelativeCommandPath { get; set; }
-
- public string GetAbsoluteCommandPath(string nugetPackageRoot)
- {
- return Path.Combine(
- nugetPackageRoot.Replace('/', Path.DirectorySeparatorChar),
- PackageName.Replace('/', Path.DirectorySeparatorChar),
- PackageVersion.Replace('/', Path.DirectorySeparatorChar),
- RelativeCommandPath.Replace('/', Path.DirectorySeparatorChar));
- }
- }
-
- private enum CommandCandidateType
- {
- NativeCommandCandidate,
- RuntimeCommandCandidate
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/GenericPlatformCommandSpecFactory.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/GenericPlatformCommandSpecFactory.cs
deleted file mode 100644
index f190699a0..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/GenericPlatformCommandSpecFactory.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class GenericPlatformCommandSpecFactory : IPlatformCommandSpecFactory
- {
- public CommandSpec CreateCommandSpec(
- string commandName,
- IEnumerable args,
- string commandPath,
- CommandResolutionStrategy resolutionStrategy,
- IEnvironmentProvider environment)
- {
- var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(args);
- return new CommandSpec(commandPath, escapedArgs, resolutionStrategy);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ICommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ICommandResolver.cs
deleted file mode 100644
index e3b05842f..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ICommandResolver.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public interface ICommandResolver
- {
- CommandSpec Resolve(CommandResolverArguments arguments);
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ICommandResolverPolicy.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ICommandResolverPolicy.cs
deleted file mode 100644
index a38b32605..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ICommandResolverPolicy.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public interface ICommandResolverPolicy
- {
- CompositeCommandResolver CreateCommandResolver();
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPackagedCommandSpecFactory.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPackagedCommandSpecFactory.cs
deleted file mode 100644
index 5f409a09f..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPackagedCommandSpecFactory.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-using NuGet.ProjectModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public interface IPackagedCommandSpecFactory
- {
- CommandSpec CreateCommandSpecFromLibrary(
- LockFileTargetLibrary toolLibrary,
- string commandName,
- IEnumerable commandArguments,
- IEnumerable allowedExtensions,
- LockFile lockFile,
- CommandResolutionStrategy commandResolutionStrategy,
- string depsFilePath,
- string runtimeConfigPath);
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPlatformCommandSpecFactory.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPlatformCommandSpecFactory.cs
deleted file mode 100644
index f91877bcf..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPlatformCommandSpecFactory.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public interface IPlatformCommandSpecFactory
- {
- CommandSpec CreateCommandSpec(
- string commandName,
- IEnumerable args,
- string commandPath,
- CommandResolutionStrategy resolutionStrategy,
- IEnvironmentProvider environment);
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IProject.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IProject.cs
deleted file mode 100644
index 534d77ebe..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IProject.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-using NuGet.Frameworks;
-using NuGet.ProjectModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- internal interface IProject
- {
- LockFile GetLockFile();
-
- bool TryGetLockFile(out LockFile lockFile);
-
- IEnumerable GetTools();
-
- string DepsJsonPath { get; }
-
- string ProjectRoot { get; }
-
- string RuntimeConfigJsonPath { get; }
-
- string FullOutputPath { get; }
-
- NuGetFramework DotnetCliToolTargetFramework { get; }
-
- Dictionary EnvironmentVariables { get; }
-
- string ToolDepsJsonGeneratorProject { get; }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPublishedPathCommandSpecFactory.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPublishedPathCommandSpecFactory.cs
deleted file mode 100644
index 115f9c352..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/IPublishedPathCommandSpecFactory.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public interface IPublishedPathCommandSpecFactory
- {
- CommandSpec CreateCommandSpecFromPublishFolder(
- string commandPath,
- IEnumerable commandArguments,
- CommandResolutionStrategy commandResolutionStrategy,
- string depsFilePath,
- string runtimeConfigPath);
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/LockFileTargetExtensions.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/LockFileTargetExtensions.cs
deleted file mode 100644
index f09b9d1f5..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/LockFileTargetExtensions.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using NuGet.Packaging.Core;
-using NuGet.ProjectModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- internal static class LockFileTargetExtensions
- {
- public static bool IsPortable(this LockFileTarget lockFileTarget)
- {
- return string.IsNullOrEmpty(lockFileTarget.RuntimeIdentifier) &&
- lockFileTarget.GetPlatformLibrary() != null;
- }
-
- public static LockFileTargetLibrary GetPlatformLibrary(this LockFileTarget lockFileTarget)
- {
- // TODO: https://github.com/dotnet/sdk/issues/17 get this from the lock file
- var platformPackageName = "Microsoft.NETCore.App";
- var platformLibrary = lockFileTarget
- .Libraries
- .FirstOrDefault(e => e.Name.Equals(platformPackageName, StringComparison.OrdinalIgnoreCase));
-
- return platformLibrary;
- }
-
- public static HashSet GetPlatformExclusionList(
- this LockFileTarget lockFileTarget,
- IDictionary libraryLookup)
- {
- var platformLibrary = lockFileTarget.GetPlatformLibrary();
- var exclusionList = new HashSet();
-
- exclusionList.Add(platformLibrary.Name);
- CollectDependencies(libraryLookup, platformLibrary.Dependencies, exclusionList);
-
- return exclusionList;
- }
-
- public static IEnumerable GetRuntimeLibraries(this LockFileTarget lockFileTarget)
- {
- IEnumerable runtimeLibraries = lockFileTarget.Libraries;
- Dictionary libraryLookup =
- runtimeLibraries.ToDictionary(e => e.Name, StringComparer.OrdinalIgnoreCase);
-
- HashSet allExclusionList = new HashSet();
-
- if (lockFileTarget.IsPortable())
- {
- allExclusionList.UnionWith(lockFileTarget.GetPlatformExclusionList(libraryLookup));
- }
-
- return runtimeLibraries.Filter(allExclusionList).ToArray();
- }
-
- public static IEnumerable GetCompileLibraries(this LockFileTarget lockFileTarget)
- {
- return lockFileTarget.Libraries;
- }
-
- public static IEnumerable Filter(
- this IEnumerable libraries,
- HashSet exclusionList)
- {
- return libraries.Where(e => !exclusionList.Contains(e.Name));
- }
-
- public static IEnumerable> GetRuntimeTargetsGroups(
- this LockFileTargetLibrary library,
- string assetType)
- {
- return library.RuntimeTargets
- .FilterPlaceHolderFiles()
- .Cast()
- .Where(t => string.Equals(t.AssetType, assetType, StringComparison.OrdinalIgnoreCase))
- .GroupBy(t => t.Runtime);
- }
-
- private static void CollectDependencies(
- IDictionary libraryLookup,
- IEnumerable dependencies,
- HashSet exclusionList)
- {
- foreach (PackageDependency dependency in dependencies)
- {
- LockFileTargetLibrary library = libraryLookup[dependency.Id];
- if (library.Version.Equals(dependency.VersionRange.MinVersion))
- {
- if (exclusionList.Add(library.Name))
- {
- CollectDependencies(libraryLookup, library.Dependencies, exclusionList);
- }
- }
- }
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MSBuildProject.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MSBuildProject.cs
deleted file mode 100644
index f5473c278..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MSBuildProject.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using Microsoft.Build.Evaluation;
-using NuGet.Frameworks;
-using NuGet.ProjectModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- internal class MSBuildProject : IProject
- {
- private static readonly NuGetFramework s_toolPackageFramework = FrameworkConstants.CommonFrameworks.NetCoreApp10;
-
- private Project _project;
-
- private string _projectRoot;
-
- private string _msBuildExePath;
-
- public string DepsJsonPath
- {
- get
- {
- return _project
- .AllEvaluatedProperties
- .FirstOrDefault(p => p.Name.Equals("ProjectDepsFilePath"))
- .EvaluatedValue;
- }
- }
-
- public string RuntimeConfigJsonPath
- {
- get
- {
- return _project
- .AllEvaluatedProperties
- .FirstOrDefault(p => p.Name.Equals("ProjectRuntimeConfigFilePath"))
- .EvaluatedValue;
- }
- }
-
- public string FullOutputPath
- {
- get
- {
- return _project
- .AllEvaluatedProperties
- .FirstOrDefault(p => p.Name.Equals("TargetDir"))
- .EvaluatedValue;
- }
- }
-
- public string ProjectRoot
- {
- get
- {
- return _projectRoot;
- }
- }
-
- public NuGetFramework DotnetCliToolTargetFramework
- {
- get
- {
- var frameworkString = _project
- .AllEvaluatedProperties
- .FirstOrDefault(p => p.Name.Equals("DotnetCliToolTargetFramework"))
- ?.EvaluatedValue;
-
- if (string.IsNullOrEmpty(frameworkString))
- {
- return s_toolPackageFramework;
- }
-
- return NuGetFramework.Parse(frameworkString);
- }
- }
-
-
- public Dictionary EnvironmentVariables
- {
- get
- {
- return new Dictionary
- {
- { Constants.MSBUILD_EXE_PATH, _msBuildExePath }
- };
- }
- }
-
- public string ToolDepsJsonGeneratorProject
- {
- get
- {
- var generatorProject = _project
- .AllEvaluatedProperties
- .FirstOrDefault(p => p.Name.Equals("ToolDepsJsonGeneratorProject"))
- ?.EvaluatedValue;
-
- return generatorProject;
- }
- }
-
- public MSBuildProject(
- string msBuildProjectPath,
- NuGetFramework framework,
- string configuration,
- string outputPath,
- string msBuildExePath)
- {
- _projectRoot = msBuildExePath;
-
- var globalProperties = new Dictionary()
- {
- { "MSBuildExtensionsPath", Path.GetDirectoryName(msBuildExePath) }
- };
-
- if(framework != null)
- {
- globalProperties.Add("TargetFramework", framework.GetShortFolderName());
- }
-
- if(outputPath != null)
- {
- globalProperties.Add("OutputPath", outputPath);
- }
-
- if(configuration != null)
- {
- globalProperties.Add("Configuration", configuration);
- }
-
- _project = ProjectCollection.GlobalProjectCollection.LoadProject(
- msBuildProjectPath,
- globalProperties,
- null);
-
- _msBuildExePath = msBuildExePath;
- }
-
- public IEnumerable GetTools()
- {
- var toolsReferences = _project.AllEvaluatedItems.Where(i => i.ItemType.Equals("DotNetCliToolReference"));
- var tools = toolsReferences.Select(t => new SingleProjectInfo(
- t.EvaluatedInclude,
- t.GetMetadataValue("Version"),
- Enumerable.Empty()));
-
- return tools;
- }
-
- public LockFile GetLockFile()
- {
- var lockFilePath = GetLockFilePathFromProjectLockFileProperty() ??
- GetLockFilePathFromIntermediateBaseOutputPath();
-
- return new LockFileFormat()
- .ReadWithLock(lockFilePath)
- .Result;
- }
-
- public bool TryGetLockFile(out LockFile lockFile)
- {
- lockFile = null;
-
- var lockFilePath = GetLockFilePathFromProjectLockFileProperty() ??
- GetLockFilePathFromIntermediateBaseOutputPath();
-
- if (lockFilePath == null)
- {
- return false;
- }
-
- if (!File.Exists(lockFilePath))
- {
- return false;
- }
-
- lockFile = new LockFileFormat()
- .ReadWithLock(lockFilePath)
- .Result;
- return true;
- }
-
- private string GetLockFilePathFromProjectLockFileProperty()
- {
- return _project
- .AllEvaluatedProperties
- .Where(p => p.Name.Equals("ProjectAssetsFile"))
- .Select(p => p.EvaluatedValue)
- .FirstOrDefault(p => Path.IsPathRooted(p) && File.Exists(p));
- }
-
- private string GetLockFilePathFromIntermediateBaseOutputPath()
- {
- var intermediateOutputPath = _project
- .AllEvaluatedProperties
- .FirstOrDefault(p => p.Name.Equals("BaseIntermediateOutputPath"))
- .EvaluatedValue;
- return Path.Combine(intermediateOutputPath, "project.assets.json");
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MuxerCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MuxerCommandResolver.cs
deleted file mode 100644
index a61a0c4d7..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MuxerCommandResolver.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class MuxerCommandResolver : ICommandResolver
- {
- public CommandSpec Resolve(CommandResolverArguments commandResolverArguments)
- {
- if (commandResolverArguments.CommandName == Muxer.MuxerName)
- {
- var muxer = new Muxer();
- var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(
- commandResolverArguments.CommandArguments.OrEmptyIfNull());
- return new CommandSpec(muxer.MuxerPath, escapedArgs, CommandResolutionStrategy.RootedPath);
- }
- return null;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/NuGetUtils.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/NuGetUtils.cs
deleted file mode 100644
index 72aa0a545..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/NuGetUtils.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using NuGet.Packaging.Core;
-using NuGet.ProjectModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- internal static class NuGetUtils
- {
- public static bool IsPlaceholderFile(string path)
- {
- return string.Equals(Path.GetFileName(path), PackagingCoreConstants.EmptyFolder, StringComparison.Ordinal);
- }
-
- public static IEnumerable FilterPlaceHolderFiles(this IEnumerable files)
- {
- return files.Where(f => !IsPlaceholderFile(f.Path));
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/OutputPathCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/OutputPathCommandResolver.cs
deleted file mode 100644
index 76f492420..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/OutputPathCommandResolver.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.Collections.Generic;
-using System.IO;
-using Microsoft.DotNet.Cli.Utils;
-using NuGet.Frameworks;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class OutputPathCommandResolver : AbstractPathBasedCommandResolver
- {
- public OutputPathCommandResolver(IEnvironmentProvider environment,
- IPlatformCommandSpecFactory commandSpecFactory) : base(environment, commandSpecFactory)
- { }
-
-
- internal override string ResolveCommandPath(CommandResolverArguments commandResolverArguments)
- {
- if (commandResolverArguments.Framework == null
- || commandResolverArguments.ProjectDirectory == null
- || commandResolverArguments.Configuration == null
- || commandResolverArguments.CommandName == null)
- {
- return null;
- }
-
- return ResolveFromProjectOutput(
- commandResolverArguments.ProjectDirectory,
- commandResolverArguments.Framework,
- commandResolverArguments.Configuration,
- commandResolverArguments.CommandName,
- commandResolverArguments.CommandArguments.OrEmptyIfNull(),
- commandResolverArguments.OutputPath,
- commandResolverArguments.BuildBasePath);
- }
-
- private string ResolveFromProjectOutput(
- string projectDirectory,
- NuGetFramework framework,
- string configuration,
- string commandName,
- IEnumerable commandArguments,
- string outputPath,
- string buildBasePath)
- {
- var projectFactory = new ProjectFactory(_environment);
-
- var project = projectFactory.GetProject(
- projectDirectory,
- framework,
- configuration,
- buildBasePath,
- outputPath);
-
- if (project == null)
- {
- return null;
- }
-
- var buildOutputPath = project.FullOutputPath;
-
- if (!Directory.Exists(buildOutputPath))
- {
- Reporter.Verbose.WriteLine(
- string.Format(LocalizableStrings.BuildOutputPathDoesNotExist, buildOutputPath));
- return null;
- }
-
- return _environment.GetCommandPathFromRootPath(buildOutputPath, commandName);
- }
-
- internal override CommandResolutionStrategy GetCommandResolutionStrategy()
- {
- return CommandResolutionStrategy.OutputPath;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactory.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactory.cs
deleted file mode 100644
index 2ee8bcb6a..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactory.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using Microsoft.DotNet.Tools.Common;
-using NuGet.Packaging;
-using NuGet.ProjectModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class PackagedCommandSpecFactory : IPackagedCommandSpecFactory
- {
- private const string PackagedCommandSpecFactoryName = "packagedcommandspecfactory";
-
- private Action> _addAdditionalArguments;
-
- internal PackagedCommandSpecFactory(Action> addAdditionalArguments = null)
- {
- _addAdditionalArguments = addAdditionalArguments;
- }
-
- public CommandSpec CreateCommandSpecFromLibrary(
- LockFileTargetLibrary toolLibrary,
- string commandName,
- IEnumerable commandArguments,
- IEnumerable allowedExtensions,
- LockFile lockFile,
- CommandResolutionStrategy commandResolutionStrategy,
- string depsFilePath,
- string runtimeConfigPath)
- {
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.AttemptingToFindCommand,
- PackagedCommandSpecFactoryName,
- commandName,
- toolLibrary.Name));
-
- var toolAssembly = toolLibrary?.RuntimeAssemblies
- .FirstOrDefault(r => Path.GetFileNameWithoutExtension(r.Path) == commandName);
-
- if (toolAssembly == null)
- {
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.FailedToFindToolAssembly,
- PackagedCommandSpecFactoryName,
- commandName));
-
- return null;
- }
-
- var commandPath = GetCommandFilePath(lockFile, toolLibrary, toolAssembly);
-
- if (!File.Exists(commandPath))
- {
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.FailedToFindCommandPath,
- PackagedCommandSpecFactoryName,
- commandPath));
-
- return null;
- }
-
- return CreateCommandSpecWrappingWithMuxerIfDll(
- commandPath,
- commandArguments,
- depsFilePath,
- commandResolutionStrategy,
- lockFile.GetNormalizedPackageFolders(),
- runtimeConfigPath);
- }
-
- private string GetCommandFilePath(
- LockFile lockFile,
- LockFileTargetLibrary toolLibrary,
- LockFileItem runtimeAssembly)
- {
- var packageDirectory = lockFile.GetPackageDirectory(toolLibrary);
-
- if (packageDirectory == null)
- {
- throw new GracefulException(string.Format(
- LocalizableStrings.CommandAssembliesNotFound,
- toolLibrary.Name));
- }
-
- var filePath = Path.Combine(
- packageDirectory,
- PathUtility.GetPathWithDirectorySeparator(runtimeAssembly.Path));
-
- return filePath;
- }
-
- private CommandSpec CreateCommandSpecWrappingWithMuxerIfDll(
- string commandPath,
- IEnumerable commandArguments,
- string depsFilePath,
- CommandResolutionStrategy commandResolutionStrategy,
- IEnumerable packageFolders,
- string runtimeConfigPath)
- {
- var commandExtension = Path.GetExtension(commandPath);
-
- if (commandExtension == FileNameSuffixes.DotNet.DynamicLib)
- {
- return CreatePackageCommandSpecUsingMuxer(
- commandPath,
- commandArguments,
- depsFilePath,
- commandResolutionStrategy,
- packageFolders,
- runtimeConfigPath);
- }
-
- return CreateCommandSpec(commandPath, commandArguments, commandResolutionStrategy);
- }
-
- private CommandSpec CreatePackageCommandSpecUsingMuxer(
- string commandPath,
- IEnumerable commandArguments,
- string depsFilePath,
- CommandResolutionStrategy commandResolutionStrategy,
- IEnumerable packageFolders,
- string runtimeConfigPath)
- {
- var host = string.Empty;
- var arguments = new List();
-
- var muxer = new Muxer();
-
- host = muxer.MuxerPath;
- if (host == null)
- {
- throw new Exception(LocalizableStrings.UnableToLocateDotnetMultiplexer);
- }
-
- arguments.Add("exec");
-
- if (runtimeConfigPath != null)
- {
- arguments.Add("--runtimeconfig");
- arguments.Add(runtimeConfigPath);
- }
-
- if (depsFilePath != null)
- {
- arguments.Add("--depsfile");
- arguments.Add(depsFilePath);
- }
-
- foreach (var packageFolder in packageFolders)
- {
- arguments.Add("--additionalprobingpath");
- arguments.Add(packageFolder);
- }
-
- if(_addAdditionalArguments != null)
- {
- _addAdditionalArguments(commandPath, arguments);
- }
-
- arguments.Add(commandPath);
- arguments.AddRange(commandArguments);
-
- return CreateCommandSpec(host, arguments, commandResolutionStrategy);
- }
-
- private CommandSpec CreateCommandSpec(
- string commandPath,
- IEnumerable commandArguments,
- CommandResolutionStrategy commandResolutionStrategy)
- {
- var escapedArgs = ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(commandArguments);
-
- return new CommandSpec(commandPath, escapedArgs, commandResolutionStrategy);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactoryWithCliRuntime.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactoryWithCliRuntime.cs
deleted file mode 100644
index c22af40ba..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactoryWithCliRuntime.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using Microsoft.DotNet.Tools.Common;
-using NuGet.Packaging;
-using NuGet.ProjectModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class PackagedCommandSpecFactoryWithCliRuntime : PackagedCommandSpecFactory
- {
- public PackagedCommandSpecFactoryWithCliRuntime() : base(AddAditionalParameters)
- {
- }
-
- private static void AddAditionalParameters(string commandPath, IList arguments)
- {
- if(PrefersCliRuntime(commandPath))
- {
- var runtimeConfigFile = Path.ChangeExtension(commandPath, FileNameSuffixes.RuntimeConfigJson);
-
- if (!File.Exists(runtimeConfigFile))
- {
- throw new GracefulException(string.Format(LocalizableStrings.CouldNotFindToolRuntimeConfigFile,
- nameof(PackagedCommandSpecFactory),
- Path.GetFileName(commandPath)));
- }
-
- var runtimeConfig = new RuntimeConfig(runtimeConfigFile);
-
- var muxer = new Muxer();
-
- Version currentFrameworkSimpleVersion = GetVersionWithoutPrerelease(muxer.SharedFxVersion);
- Version toolFrameworkSimpleVersion = GetVersionWithoutPrerelease(runtimeConfig.Framework.Version);
-
- if (currentFrameworkSimpleVersion.Major != toolFrameworkSimpleVersion.Major)
- {
- Reporter.Verbose.WriteLine(
- string.Format(
- LocalizableStrings.IgnoringPreferCLIRuntimeFile,
- nameof(PackagedCommandSpecFactory),
- runtimeConfig.Framework.Version,
- muxer.SharedFxVersion));
- }
- else
- {
- arguments.Add("--fx-version");
- arguments.Add(muxer.SharedFxVersion);
- }
- }
- }
-
- private static Version GetVersionWithoutPrerelease(string version)
- {
- int dashOrPlusIndex = version.IndexOfAny(new char[] { '-', '+' });
-
- if (dashOrPlusIndex >= 0)
- {
- version = version.Substring(0, dashOrPlusIndex);
- }
-
- return new Version(version);
- }
-
- private static bool PrefersCliRuntime(string commandPath)
- {
- var libTFMPackageDirectory = Path.GetDirectoryName(commandPath);
- var packageDirectory = Path.Combine(libTFMPackageDirectory, "..", "..");
- var preferCliRuntimePath = Path.Combine(packageDirectory, "prefercliruntime");
-
- Reporter.Verbose.WriteLine(
- string.Format(
- LocalizableStrings.LookingForPreferCliRuntimeFile,
- nameof(PackagedCommandSpecFactory),
- preferCliRuntimePath));
-
- return File.Exists(preferCliRuntimePath);
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PathCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PathCommandResolver.cs
deleted file mode 100644
index cf36ac00c..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PathCommandResolver.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class PathCommandResolver : AbstractPathBasedCommandResolver
- {
- public PathCommandResolver(IEnvironmentProvider environment,
- IPlatformCommandSpecFactory commandSpecFactory) : base(environment, commandSpecFactory) { }
-
- internal override string ResolveCommandPath(CommandResolverArguments commandResolverArguments)
- {
- return _environment.GetCommandPath(commandResolverArguments.CommandName);
- }
-
- internal override CommandResolutionStrategy GetCommandResolutionStrategy()
- {
- return CommandResolutionStrategy.Path;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PathCommandResolverPolicy.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PathCommandResolverPolicy.cs
deleted file mode 100644
index 40a5b3787..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PathCommandResolverPolicy.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using Microsoft.DotNet.PlatformAbstractions;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class PathCommandResolverPolicy : ICommandResolverPolicy
- {
- public CompositeCommandResolver CreateCommandResolver()
- {
- return Create();
- }
-
- public static CompositeCommandResolver Create()
- {
- var environment = new EnvironmentProvider();
-
- var platformCommandSpecFactory = default(IPlatformCommandSpecFactory);
- if (RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows)
- {
- platformCommandSpecFactory = new WindowsExePreferredCommandSpecFactory();
- }
- else
- {
- platformCommandSpecFactory = new GenericPlatformCommandSpecFactory();
- }
-
- return CreatePathCommandResolverPolicy(
- environment,
- platformCommandSpecFactory);
- }
-
- public static CompositeCommandResolver CreatePathCommandResolverPolicy(
- IEnvironmentProvider environment,
- IPlatformCommandSpecFactory platformCommandSpecFactory)
- {
- var compositeCommandResolver = new CompositeCommandResolver();
-
- compositeCommandResolver.AddCommandResolver(
- new PathCommandResolver(environment, platformCommandSpecFactory));
-
- return compositeCommandResolver;
- }
- }
-}
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ProjectDependenciesCommandResolver.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ProjectDependenciesCommandResolver.cs
deleted file mode 100644
index 557ca3b25..000000000
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/ProjectDependenciesCommandResolver.cs
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright (c) .NET Foundation and contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using Microsoft.DotNet.Tools.Common;
-using NuGet.Frameworks;
-using NuGet.ProjectModel;
-
-namespace Microsoft.DotNet.Cli.Utils
-{
- public class ProjectDependenciesCommandResolver : ICommandResolver
- {
- private const string ProjectDependenciesCommandResolverName = "projectdependenciescommandresolver";
-
- private static readonly CommandResolutionStrategy s_commandResolutionStrategy =
- CommandResolutionStrategy.ProjectDependenciesPackage;
-
- private readonly IEnvironmentProvider _environment;
- private readonly IPackagedCommandSpecFactory _packagedCommandSpecFactory;
-
- public ProjectDependenciesCommandResolver(
- IEnvironmentProvider environment,
- IPackagedCommandSpecFactory packagedCommandSpecFactory)
- {
- if (environment == null)
- {
- throw new ArgumentNullException(nameof(environment));
- }
-
- if (packagedCommandSpecFactory == null)
- {
- throw new ArgumentNullException(nameof(packagedCommandSpecFactory));
- }
-
- _environment = environment;
- _packagedCommandSpecFactory = packagedCommandSpecFactory;
- }
-
- public CommandSpec Resolve(CommandResolverArguments commandResolverArguments)
- {
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.AttemptingToResolve,
- ProjectDependenciesCommandResolverName,
- commandResolverArguments.CommandName));
-
- if (commandResolverArguments.Framework == null
- || commandResolverArguments.ProjectDirectory == null
- || commandResolverArguments.Configuration == null
- || commandResolverArguments.CommandName == null)
- {
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.InvalidCommandResolverArguments,
- ProjectDependenciesCommandResolverName));
-
- return null;
- }
-
- return ResolveFromProjectDependencies(
- commandResolverArguments.ProjectDirectory,
- commandResolverArguments.Framework,
- commandResolverArguments.Configuration,
- commandResolverArguments.CommandName,
- commandResolverArguments.CommandArguments.OrEmptyIfNull(),
- commandResolverArguments.OutputPath,
- commandResolverArguments.BuildBasePath);
- }
-
- private CommandSpec ResolveFromProjectDependencies(
- string projectDirectory,
- NuGetFramework framework,
- string configuration,
- string commandName,
- IEnumerable commandArguments,
- string outputPath,
- string buildBasePath)
- {
- var allowedExtensions = GetAllowedCommandExtensionsFromEnvironment(_environment);
-
- var projectFactory = new ProjectFactory(_environment);
- var project = projectFactory.GetProject(
- projectDirectory,
- framework,
- configuration,
- buildBasePath,
- outputPath);
-
- if (project == null)
- {
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.DidNotFindAMatchingProject,
- ProjectDependenciesCommandResolverName,
- projectDirectory));
- return null;
- }
-
- var depsFilePath = project.DepsJsonPath;
-
- if (!File.Exists(depsFilePath))
- {
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.DoesNotExist,
- ProjectDependenciesCommandResolverName,
- depsFilePath));
- return null;
- }
-
- var runtimeConfigPath = project.RuntimeConfigJsonPath;
-
- if (!File.Exists(runtimeConfigPath))
- {
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.DoesNotExist,
- ProjectDependenciesCommandResolverName,
- runtimeConfigPath));
- return null;
- }
-
- var lockFile = project.GetLockFile();
- var toolLibrary = GetToolLibraryForContext(lockFile, commandName, framework);
-
- var commandSpec = _packagedCommandSpecFactory.CreateCommandSpecFromLibrary(
- toolLibrary,
- commandName,
- commandArguments,
- allowedExtensions,
- lockFile,
- s_commandResolutionStrategy,
- depsFilePath,
- runtimeConfigPath);
-
- commandSpec?.AddEnvironmentVariablesFromProject(project);
-
- return commandSpec;
- }
-
- private LockFileTargetLibrary GetToolLibraryForContext(
- LockFile lockFile, string commandName, NuGetFramework targetFramework)
- {
- var toolLibraries = lockFile.Targets
- .FirstOrDefault(t => t.TargetFramework.GetShortFolderName()
- .Equals(targetFramework.GetShortFolderName()))
- ?.Libraries.Where(l => l.Name == commandName ||
- l.RuntimeAssemblies.Any(r => Path.GetFileNameWithoutExtension(r.Path) == commandName)).ToList();
-
- if (toolLibraries?.Count() > 1)
- {
- throw new InvalidOperationException(string.Format(
- LocalizableStrings.AmbiguousCommandName,
- commandName));
- }
-
- Reporter.Verbose.WriteLine(string.Format(
- LocalizableStrings.ToolLibraryFound,
- ProjectDependenciesCommandResolverName,
- toolLibraries?.Count() > 0));
-
- return toolLibraries?.FirstOrDefault();
- }
-
- private IEnumerable