diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..21e4302b9
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,149 @@
+# editorconfig.org
+
+# top-most EditorConfig file
+root = true
+
+# Default settings:
+# A newline ending every file
+# Use 4 spaces as indentation
+[*]
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+
+[project.json]
+indent_size = 2
+
+# C# files
+[*.cs]
+# New line preferences
+csharp_new_line_before_open_brace = all
+csharp_new_line_before_else = true
+csharp_new_line_before_catch = true
+csharp_new_line_before_finally = true
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_members_in_anonymous_types = true
+csharp_new_line_within_query_expression_clauses = true
+
+# Indentation preferences
+csharp_indent_block_contents = true
+csharp_indent_braces = false
+csharp_indent_case_contents = true
+csharp_indent_switch_labels = true
+csharp_indent_labels = flush_left
+
+# avoid this. unless absolutely necessary
+dotnet_style_qualification_for_field = false:suggestion
+dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_method = false:suggestion
+dotnet_style_qualification_for_event = false:suggestion
+
+# only use var when it's obvious what the variable type is
+csharp_style_var_for_built_in_types = false:none
+csharp_style_var_when_type_is_apparent = false:none
+csharp_style_var_elsewhere = false:suggestion
+
+# use language keywords instead of BCL types
+dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
+dotnet_style_predefined_type_for_member_access = true:suggestion
+
+# name all constant fields using PascalCase
+dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
+
+dotnet_naming_symbols.constant_fields.applicable_kinds = field
+dotnet_naming_symbols.constant_fields.required_modifiers = const
+
+dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+
+# internal and private fields should be _camelCase
+dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
+dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
+dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
+
+dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
+dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
+
+dotnet_naming_style.camel_case_underscore_style.required_prefix = _
+dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
+
+# Code style defaults
+dotnet_sort_system_directives_first = true
+csharp_preserve_single_line_blocks = true
+csharp_preserve_single_line_statements = false
+
+# Expression-level preferences
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+
+# Expression-bodied members
+csharp_style_expression_bodied_methods = false:none
+csharp_style_expression_bodied_constructors = false:none
+csharp_style_expression_bodied_operators = false:none
+csharp_style_expression_bodied_properties = true:none
+csharp_style_expression_bodied_indexers = true:none
+csharp_style_expression_bodied_accessors = true:none
+
+# Pattern matching
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
+
+# Null checking preferences
+csharp_style_throw_expression = true:suggestion
+csharp_style_conditional_delegate_call = true:suggestion
+
+# Space preferences
+csharp_space_after_cast = false
+csharp_space_after_colon_in_inheritance_clause = true
+csharp_space_after_comma = true
+csharp_space_after_dot = false
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_after_semicolon_in_for_statement = true
+csharp_space_around_binary_operators = before_and_after
+csharp_space_around_declaration_statements = do_not_ignore
+csharp_space_before_colon_in_inheritance_clause = true
+csharp_space_before_comma = false
+csharp_space_before_dot = false
+csharp_space_before_open_square_brackets = false
+csharp_space_before_semicolon_in_for_statement = false
+csharp_space_between_empty_square_brackets = false
+csharp_space_between_method_call_empty_parameter_list_parentheses = false
+csharp_space_between_method_call_name_and_opening_parenthesis = false
+csharp_space_between_method_call_parameter_list_parentheses = false
+csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
+csharp_space_between_method_declaration_name_and_open_parenthesis = false
+csharp_space_between_method_declaration_parameter_list_parentheses = false
+csharp_space_between_parentheses = false
+csharp_space_between_square_brackets = false
+
+# C++ Files
+[*.{cpp,h,in}]
+curly_bracket_next_line = true
+indent_brace_style = Allman
+
+# Xml project files
+[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
+indent_size = 2
+
+# Xml build files
+[*.builds]
+indent_size = 2
+
+# Xml files
+[*.{xml,stylecop,resx,ruleset}]
+indent_size = 2
+
+# Xml config files
+[*.{props,targets,config,nuspec}]
+indent_size = 2
+
+# Shell scripts
+[*.sh]
+end_of_line = lf
+[*.{cmd, bat}]
+end_of_line = crlf
diff --git a/.gitignore b/.gitignore
index 7bed92752..a9597138b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,6 +96,7 @@ dlldata.c
# DNX
project.lock.json
artifacts/
+bin/
*_i.c
*_p.c
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 000000000..a75ddc89a
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,70 @@
+
+
+
+
+
+ $(MSBuildThisFileDirectory)
+
+ $(NUGET_PACKAGES)
+ $(RepoRoot)/.nuget/packages
+
+ build_projects/dotnet-cli-build/bin
+ dotnet-cli-build.dll
+ $(RepoRoot)/$(RelativeCLIBuildBinaries)/$(RelativeCLIBuildDllName)
+ $(RepoRoot)/build_projects/dotnet-cli-build/bin/Microsoft.DotNet.Build.Tasks.Feed.dll
+
+ true
+ true
+
+ netcoreapp2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/README.md b/Documentation/README.md
index 94edbb417..9d211c0a2 100644
--- a/Documentation/README.md
+++ b/Documentation/README.md
@@ -16,7 +16,7 @@ Documents Index
## Troubleshooting and issues reporting
-- [CLI Known Issues](https://github.com/dotnet/core/blob/master/cli/known-issues.md)
+- [CLI Known Issues](https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0.0-known-issues.md)
- [Filing migration issues](migration-issues.md)
## Specifications
diff --git a/Documentation/general/tab-completion.md b/Documentation/general/tab-completion.md
index bf6fefaa3..93218e7e8 100644
--- a/Documentation/general/tab-completion.md
+++ b/Documentation/general/tab-completion.md
@@ -26,17 +26,18 @@ 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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI 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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Decompressing 100% 4936 ms
Expanding 100% 17195 ms
```
diff --git a/Documentation/project-docs/developer-guide.md b/Documentation/project-docs/developer-guide.md
index 0391adefa..7e8e76055 100644
--- a/Documentation/project-docs/developer-guide.md
+++ b/Documentation/project-docs/developer-guide.md
@@ -27,8 +27,7 @@ In order to build .NET Command Line Interface, you need the following installed
## 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.
+2. The CLI that is built (we call it stage 2) will be laid out in the `bin\2\{RID}\dotnet` folder. You can run `dotnet.exe` or `dotnet` from that folder to try out the `dotnet` command.
## A simple test
Using the `dotnet` built in the previous step:
@@ -40,8 +39,12 @@ Using the `dotnet` built in the previous step:
## 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.
+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 project:
+ - Run `scripts\cli-test-env.bat` on Windows, or [source](https://en.wikipedia.org/wiki/Source_(command)) `scripts/cli-test-env.sh` on Linux or OS X. This will add the stage 2 `dotnet` folder to your path and set up other environment variables which are used for running tests.
+ - `cd` into the test's directory
+ - Run `dotnet test`
+ - Refer to the command-line help for `dotnet test` if you want to run a specific test in the test project
## Adding a Command
diff --git a/Documentation/specs/cli-installation-scenarios.md b/Documentation/specs/cli-installation-scenarios.md
index 16182c234..654ae0e66 100644
--- a/Documentation/specs/cli-installation-scenarios.md
+++ b/Documentation/specs/cli-installation-scenarios.md
@@ -17,6 +17,8 @@ Obtaining .NET CLI
* [Acquisition modes](#acquisition-modes)
* [Native installers](#native-installers)
* [Installation script](#installation-script)
+ * [Windows one-liner](#windows-command)
+ * [OSX/Linux one-liner](#osxlinux-shell-command)
* [Complete manual installation](#complete-manual-installation)
* [Docker](#docker)
* [NuGet Packages](#nuget-packages)
@@ -256,6 +258,18 @@ OSX/Linux:
./dotnet-install.sh --channel 2.0
```
+#### Windows obtain one-liner example
+
+```
+@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) "
+```
+
+#### OSX/Linux obtain one-liner
+
+```
+curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin
+```
+
### 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.
diff --git a/Documentation/specs/runtime-configuration-file.md b/Documentation/specs/runtime-configuration-file.md
index fbf6e2c4c..b021f9358 100644
--- a/Documentation/specs/runtime-configuration-file.md
+++ b/Documentation/specs/runtime-configuration-file.md
@@ -9,8 +9,8 @@ The runtime configuration files store the dependencies of an application (former
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.exe` - A copy of the `corehost.exe` executable. Only present when the application is a self-contained application.
+* `MyApp.runtimeconfig.json` - An **optional** configuration file containing runtime configuration settings. This file is required for portable applications, but not for self-contained apps.
* `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.
diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln
index 271579431..9c70a2236 100644
--- a/Microsoft.DotNet.Cli.sln
+++ b/Microsoft.DotNet.Cli.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26510.0
+VisualStudioVersion = 15.0.26730.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED2FE3E2-F7E7-4389-8231-B65123F2076F}"
EndProject
@@ -13,8 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0722D325-24C8-4E83-B5AF-0A083E7F0749}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build_projects", "build_projects", "{88278B81-7649-45DC-8A6A-D3A645C5AFC3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestAssets", "TestAssets", "{ADA7052B-884B-4776-8B8D-D04191D0AA70}"
@@ -38,6 +36,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4
build\Compile.targets = build\Compile.targets
build\CrossGen.props = build\CrossGen.props
build\DependencyVersions.props = build\DependencyVersions.props
+ build\DerivedHostMachineInfo.props = build\DerivedHostMachineInfo.props
build\FileExtensions.props = build\FileExtensions.props
build\GitCommitInfo.targets = build\GitCommitInfo.targets
build\HostInfo.targets = build\HostInfo.targets
@@ -54,12 +53,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4
build\Publish.targets = build\Publish.targets
build\RestoreDependency.proj = build\RestoreDependency.proj
build\sdks\sdks.csproj = build\sdks\sdks.csproj
+ build\SetupPreviousStage.props = build\SetupPreviousStage.props
build\Signing.proj = build\Signing.proj
- build\Stage0.props = build\Stage0.props
build\Test.targets = build\Test.targets
build\Version.props = build\Version.props
- build\VersionBadge.props = build\VersionBadge.props
- build\DerivedHostMachineInfo.props = build\DerivedHostMachineInfo.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{FD7D515A-D10F-4F49-B8AE-21CF7ED071AE}"
@@ -131,8 +128,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PackageWithFakeNativeDep",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ToolWithOutputName", "TestAssets\TestPackages\ToolWithOutputName\ToolWithOutputName.csproj", "{8FB83810-5A4C-4097-9A79-8E687E4981CB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-archive", "src\dotnet-archive\dotnet-archive.csproj", "{F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet", "src\dotnet\dotnet.csproj", "{203F0362-DAFC-4679-A01E-7FBC331D8647}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Archive", "src\Microsoft.DotNet.Archive\Microsoft.DotNet.Archive.csproj", "{F8C66E8A-FC59-40B3-AC0F-58CA22526F76}"
@@ -143,16 +138,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Configurer
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.InternalAbstractions", "src\Microsoft.DotNet.InternalAbstractions\Microsoft.DotNet.InternalAbstractions.csproj", "{570950AD-A080-4F32-980C-F50E312910DF}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TestFramework", "src\Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj", "{6592A22C-2386-4E83-A4D3-FC08075C723A}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\redist\redist.csproj", "{098D9321-1201-4974-A75E-F58EBCD98ACF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_msbuild", "src\tool_msbuild\tool_msbuild.csproj", "{D82A3246-9831-4024-A9B2-1932EEF3D56F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_nuget", "src\tool_nuget\tool_nuget.csproj", "{BE4C655A-DC54-4408-B739-743456D34111}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Archiver", "tools\Archiver\Archiver.csproj", "{2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArgumentForwardingTests", "test\ArgumentForwardingTests\ArgumentForwardingTests.csproj", "{3E28672F-F4E4-44D5-AEFB-1F425DECC57E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArgumentsReflector", "test\ArgumentsReflector\ArgumentsReflector.csproj", "{A5CA696F-585E-40AB-912C-6316BC330C5E}"
@@ -197,8 +188,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Test
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "msbuild.IntegrationTests", "test\msbuild.IntegrationTests\msbuild.IntegrationTests.csproj", "{23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance", "test\Performance\Performance.csproj", "{F5E27BA5-063B-4770-A6E8-87252E9AB22C}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Cli.Build.Framework", "build_projects\Microsoft.DotNet.Cli.Build.Framework\Microsoft.DotNet.Cli.Build.Framework.csproj", "{AA744891-5209-4335-8457-37EC347DF833}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "shared-build-targets-utils", "build_projects\shared-build-targets-utils\shared-build-targets-utils.csproj", "{DA3595A8-35DE-42B9-97A4-4A2461BAD554}"
@@ -231,6 +220,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-add-package.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_fsc", "src\tool_fsharp\tool_fsc.csproj", "{602976C5-2477-4B4C-AD9A-1EAFB250529A}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.MSBuildSdkResolver", "src\Microsoft.DotNet.MSBuildSdkResolver\Microsoft.DotNet.MSBuildSdkResolver.csproj", "{FCDFAF40-CC16-4D49-96C0-E49F195E7142}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-cli-build.Tests", "build_projects\dotnet-cli-build.Tests\dotnet-cli-build.Tests.csproj", "{84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-restore.Tests", "test\dotnet-restore.Tests\dotnet-restore.Tests.csproj", "{B4EE3671-C103-4A37-8DEB-C74E0134104E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TestFramework", "test\Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj", "{44759218-B558-4AF0-8991-515F1100DCF5}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Msbuild.Tests.Utilities", "test\Msbuild.Tests.Utilities\Msbuild.Tests.Utilities.csproj", "{E7C72EF2-8480-48B4-AAE8-A596F1A6048E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -511,30 +510,6 @@ Global
{8FB83810-5A4C-4097-9A79-8E687E4981CB}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{8FB83810-5A4C-4097-9A79-8E687E4981CB}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{8FB83810-5A4C-4097-9A79-8E687E4981CB}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|x64.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|x64.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|x86.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|x86.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|x64.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|x86.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|x86.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|Any CPU.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|x64.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|x64.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|x86.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|x86.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{203F0362-DAFC-4679-A01E-7FBC331D8647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{203F0362-DAFC-4679-A01E-7FBC331D8647}.Debug|Any CPU.Build.0 = Debug|Any CPU
{203F0362-DAFC-4679-A01E-7FBC331D8647}.Debug|x64.ActiveCfg = Release|Any CPU
@@ -655,30 +630,6 @@ Global
{570950AD-A080-4F32-980C-F50E312910DF}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{570950AD-A080-4F32-980C-F50E312910DF}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{570950AD-A080-4F32-980C-F50E312910DF}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Debug|x64.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Debug|x64.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Debug|x86.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Debug|x86.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.MinSizeRel|x64.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.MinSizeRel|x86.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.MinSizeRel|x86.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Release|Any CPU.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Release|x64.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Release|x64.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Release|x86.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.Release|x86.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
- {6592A22C-2386-4E83-A4D3-FC08075C723A}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.Debug|x64.ActiveCfg = Release|Any CPU
@@ -751,30 +702,6 @@ Global
{BE4C655A-DC54-4408-B739-743456D34111}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{BE4C655A-DC54-4408-B739-743456D34111}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{BE4C655A-DC54-4408-B739-743456D34111}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|x64.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|x64.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|x86.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|x86.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|x64.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|x86.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|x86.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|Any CPU.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|x64.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|x64.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|x86.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|x86.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{3E28672F-F4E4-44D5-AEFB-1F425DECC57E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E28672F-F4E4-44D5-AEFB-1F425DECC57E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E28672F-F4E4-44D5-AEFB-1F425DECC57E}.Debug|x64.ActiveCfg = Release|Any CPU
@@ -1303,30 +1230,6 @@ Global
{23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|x64.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|x64.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|x86.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|x86.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|x64.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|x86.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|x86.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|Any CPU.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|x64.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|x64.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|x86.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|x86.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{AA744891-5209-4335-8457-37EC347DF833}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA744891-5209-4335-8457-37EC347DF833}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA744891-5209-4335-8457-37EC347DF833}.Debug|x64.ActiveCfg = Release|Any CPU
@@ -1567,6 +1470,150 @@ Global
{08A40B6A-F695-4EA9-AC8D-CF88FADEA796}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{08A40B6A-F695-4EA9-AC8D-CF88FADEA796}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{08A40B6A-F695-4EA9-AC8D-CF88FADEA796}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|x64.Build.0 = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|x86.Build.0 = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|x64.Build.0 = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|x86.Build.0 = Debug|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|x64.ActiveCfg = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|x64.Build.0 = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|x86.ActiveCfg = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|x86.Build.0 = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|x64.Build.0 = Debug|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|x86.Build.0 = Debug|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|x64.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|x86.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|x86.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|x64.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|x64.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|x86.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|x86.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x64.Build.0 = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x86.Build.0 = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x64.Build.0 = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x86.Build.0 = Debug|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x64.ActiveCfg = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x64.Build.0 = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x86.ActiveCfg = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x86.Build.0 = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Debug|x64.Build.0 = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Debug|x86.Build.0 = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.MinSizeRel|x64.Build.0 = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.MinSizeRel|x86.Build.0 = Debug|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Release|x64.ActiveCfg = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Release|x64.Build.0 = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Release|x86.ActiveCfg = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.Release|x86.Build.0 = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Debug|x64.Build.0 = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Debug|x86.Build.0 = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.MinSizeRel|x64.Build.0 = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.MinSizeRel|x86.Build.0 = Debug|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Release|x64.ActiveCfg = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Release|x64.Build.0 = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Release|x86.ActiveCfg = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.Release|x86.Build.0 = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
+ {44759218-B558-4AF0-8991-515F1100DCF5}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Debug|x64.Build.0 = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Debug|x86.Build.0 = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.MinSizeRel|x64.Build.0 = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.MinSizeRel|x86.Build.0 = Debug|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Release|x64.ActiveCfg = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Release|x64.Build.0 = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Release|x86.ActiveCfg = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.Release|x86.Build.0 = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1591,23 +1638,21 @@ Global
{736BF068-7389-41B9-BF63-D4E49B9BC833} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34}
{48408A19-CCC5-4C85-990B-0A9F827BF29A} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34}
{8FB83810-5A4C-4097-9A79-8E687E4981CB} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34}
- {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{203F0362-DAFC-4679-A01E-7FBC331D8647} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{F8C66E8A-FC59-40B3-AC0F-58CA22526F76} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{73ACEB34-D22C-43EA-87BE-EFC0E83D0126} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{ABB81DAE-0D26-483C-BE3B-0F9ACD812A62} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{570950AD-A080-4F32-980C-F50E312910DF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
- {6592A22C-2386-4E83-A4D3-FC08075C723A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{D82A3246-9831-4024-A9B2-1932EEF3D56F} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{BE4C655A-DC54-4408-B739-743456D34111} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
- {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2} = {0722D325-24C8-4E83-B5AF-0A083E7F0749}
{3E28672F-F4E4-44D5-AEFB-1F425DECC57E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{A5CA696F-585E-40AB-912C-6316BC330C5E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{4EF497BF-D717-4E03-90B1-932C7F51B918} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{18B43540-346F-4AFF-8868-A82CF098FAFD} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{C3845C85-1F59-4552-BE52-32F513CE795F} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{BBB5A4C8-CD2D-4A6A-9159-0FEAF84B745E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
+ {8AA88E83-6A98-4AD6-86EB-2ED4F6EDA17F} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{726D2CB9-80E5-4496-9C86-910AC452C45E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{EF745C56-0350-4C42-AA22-86D592E1D8D5} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{87063BA1-454D-4433-ADF9-89C667275D62} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
@@ -1623,7 +1668,6 @@ Global
{F228580D-9373-4A60-AB88-76DF58D11580} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{48E260F4-6F3F-4387-B61F-D15BABD06D9A} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
- {F5E27BA5-063B-4770-A6E8-87252E9AB22C} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{AA744891-5209-4335-8457-37EC347DF833} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
{DA3595A8-35DE-42B9-97A4-4A2461BAD554} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
{F2D1A7DA-B3EB-4CA7-BAA9-A18CEC398853} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
@@ -1636,5 +1680,14 @@ Global
{3F7D56A3-A280-467E-8916-C18659C243BA} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34}
{B1AEC227-5115-44BC-92D2-B1B3545E1DDE} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
{08A40B6A-F695-4EA9-AC8D-CF88FADEA796} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
+ {602976C5-2477-4B4C-AD9A-1EAFB250529A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
+ {FCDFAF40-CC16-4D49-96C0-E49F195E7142} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
+ {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3}
+ {B4EE3671-C103-4A37-8DEB-C74E0134104E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
+ {44759218-B558-4AF0-8991-515F1100DCF5} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
+ {E7C72EF2-8480-48B4-AAE8-A596F1A6048E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5}
EndGlobalSection
EndGlobal
diff --git a/NuGet.Config b/NuGet.Config
index 9c645c984..95416b2f1 100644
--- a/NuGet.Config
+++ b/NuGet.Config
@@ -3,7 +3,7 @@
-
+
@@ -16,7 +16,6 @@
-
diff --git a/README.md b/README.md
index e6d7174b4..7be34c7be 100644
--- a/README.md
+++ b/README.md
@@ -7,14 +7,14 @@ This repo contains the source code for cross-platform [.NET Core](http://github.
Looking for V1 of the .NET Core tooling?
----------------------------------------
-If you are looking for the v1.0.1 release of the .NET Core tools (CLI, MSBuild and the new csproj), see https://dot.net/core.
+If you are looking for the v2.0 release of the .NET Core tools (CLI, MSBuild and the new csproj), head over to https://dot.net/core and download!
-> **Note:** the release/15.5 branch of the CLI repo is based on an upcoming update of the SDK and is considered pre-release. For production-level usage, please use the
-> released version of the tools available at https://dot.net/core
+> **Note:** the master branch of the CLI repo is based on post-v2.0 of .NET Core and is considered pre-release. For production-level usage, use the
+> v2.0 of the tools.
Found an issue?
---------------
-You can consult the [Documents Index](Documentation/README.md) to find out the current issues and to see the workarounds.
+You can consult the [Documents Index](Documentation/README.md) to find out the current issues and to see the workarounds.
If you don't find your issue, please file one! However, given that this is a very high-frequency repo, we've setup some [basic guidelines](Documentation/project-docs/issue-filing-guide.md) to help you. Please consult those first.
@@ -23,36 +23,27 @@ This project has adopted the code of conduct defined by the [Contributor Covenan
Build Status
------------
-|Windows x64 |Windows x86 |Mac OS X |Linux x64 |Ubuntu 14.04 / Linux Mint 17 |Ubuntu 16.04 |Ubuntu 16.10 |Debian 8 |RHEL 7.2 |
-|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|:------:|
-|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][linux-build-badge]][linux-build]|[![][ubuntu-14.04-build-badge]][ubuntu-14.04-build]|[![][ubuntu-16.04-build-badge]][ubuntu-16.04-build]|[![][ubuntu-16.10-build-badge]][ubuntu-16.10-build]|[![][debian-8-build-badge]][debian-8-build]|[![][rhel-build-badge]][rhel-build]|
+|Windows x64 |Windows x86 |macOS |Linux x64 |Linux Native Installers |RHEL 6 Archive|
+|:------:|:------:|:------:|:------:|:------:|:------:|
+|[![][win-x64-build-badge]][win-x64-build]|[![][win-x86-build-badge]][win-x86-build]|[![][osx-build-badge]][osx-build]|[![][linux-build-badge]][linux-build]|[![][linuxnative-build-badge]][linuxnative-build]|[![][rhel6-build-badge]][rhel6-build]|
-[win-x64-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6786/badge
-[win-x64-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6786
+[win-x64-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6902/badge
+[win-x64-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6902
-[win-x86-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6787/badge
-[win-x86-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6787
+[win-x86-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6901/badge
+[win-x86-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6901
-[osx-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6781/badge
-[osx-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6781
+[osx-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6900/badge
+[osx-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6900
-[linux-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6780/badge
-[linux-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6780
+[linux-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6899/badge
+[linux-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6899
-[ubuntu-14.04-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6783/badge
-[ubuntu-14.04-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6783
+[linuxnative-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/7254/badge
+[linuxnative-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=7254
-[ubuntu-16.04-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6784/badge
-[ubuntu-16.04-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6784
-
-[ubuntu-16.10-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6785/badge
-[ubuntu-16.10-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6785
-
-[debian-8-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6778/badge
-[debian-8-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6778
-
-[rhel-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6782/badge
-[rhel-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=6782
+[rhel6-build-badge]: https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/7392/badge
+[rhel6-build]: https://devdiv.visualstudio.com/DevDiv/_build?_a=completed&definitionId=7392
Installers and Binaries
-----------------------
@@ -63,24 +54,21 @@ To download the .NET Core runtime **without** the SDK, visit https://github.com/
> **Note:** Be aware that the following installers are the **latest bits**. If you
> want to install the latest released versions, check out the [preceding section](#looking-for-v1-of-the-net-core-tooling).
+> In order to be able to restore these pre-release packages, you may need to add a NuGet feed pointing to https://dotnet.myget.org/F/dotnet-core/api/v3/index.json. Other feeds may also be necessary depending on what kind of project you are working with.
-| Platform | Latest Daily Build *release/15.5* [![][version-badge]][version] |
+| Platform | Latest Daily Build *master* [![][version-badge]][version] |
| -------- | :-------------------------------------: |
| **Windows x64** | [Installer][win-x64-installer] - [Checksum][win-x64-installer-checksum] [zip][win-x64-zip] - [Checksum][win-x64-zip-checksum] |
| **Windows x86** | [Installer][win-x86-installer] - [Checksum][win-x86-installer-checksum] [zip][win-x86-zip] - [Checksum][win-x86-zip-checksum] |
-| **Mac OS X** | [Installer][osx-installer] - [Checksum][osx-installer-checksum] [tar.gz][osx-targz] - [Checksum][osx-targz-checksum] |
+| **macOS** | [Installer][osx-installer] - [Checksum][osx-installer-checksum] [tar.gz][osx-targz] - [Checksum][osx-targz-checksum] |
| **Linux x64** | [tar.gz][linux-targz] - [Checksum][linux-targz-checksum] |
| **Ubuntu 14.04 / Linux Mint 17** | [Installer][ubuntu-14.04-installer] - [Checksum][ubuntu-14.04-installer-checksum] _see installer note below_1 tar.gz - See **Linux x64** |
| **Ubuntu 16.04** | [Installer][ubuntu-16.04-installer] - [Checksum][ubuntu-16.04-installer-checksum] _see installer note below_1 tar.gz - See **Linux x64** |
-| **Ubuntu 16.10** | [Installer][ubuntu-16.10-installer] - [Checksum][ubuntu-16.10-installer-checksum] _see installer note below_1 tar.gz - See **Linux x64** |
| **Debian 8** | [Installer][debian-8-installer] - [Checksum][debian-8-installer-checksum] _see installer note below_1 tar.gz - See **Linux x64** |
| **RHEL 7.2** | [Installer][rhel-7-installer] - [Checksum][rhel-7-installer-checksum] _see installer note below_1 tar.gz - See **Linux x64** |
-| **CentOS 7.1 / Oracle Linux 7** | tar.gz - See **Linux x64** |
-| **Fedora 24** | tar.gz - See **Linux x64** |
-| **OpenSUSE 42.1** | tar.gz - See **Linux x64** |
+| **RHEL 6** | [tar.gz][rhel-6-targz] - [Checksum][rhel-6-targz-checksum] |
-
-| Latest Coherent Build2 *release/15.5* |
+| Latest Coherent Build2 *master* |
|:------:|
| [![][coherent-version-badge]][coherent-version] |
@@ -88,44 +76,44 @@ Reference notes:
> **1**: *Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing these directly from the .deb files (via dpkg or similar), then you'll need to install the [corresponding Host, Host FX Resolver, and Shared Framework packages](https://github.com/dotnet/core-setup#daily-builds) before installing the Sdk package.*
>
**2**: *A 'coherent' build is defined as a build where the Runtime version matches between the CLI and Asp.NET.*
+[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/latest.version
+[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/latest.coherent.version
[comment]: # (The latest versions are always the same across all platforms. Just need one to show, so picking win-x64's svg.)
-[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/latest.version
-[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/win_x64_Release_version_badge.svg
-[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/latest.coherent.version
-[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/win_x86_Release_coherent_badge.svg
+[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/win_x64_Release_version_badge.svg
+[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/win_x64_Release_coherent_badge.svg
-[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-win-x64.exe
-[win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-win-x64.exe.sha
-[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-win-x64.zip
-[win-x64-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-win-x64.zip.sha
+[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.exe
+[win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.exe.sha
+[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip
+[win-x64-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x64.zip.sha
-[win-x86-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-win-x86.exe
-[win-x86-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-win-x86.exe.sha
-[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-win-x86.zip
-[win-x86-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-win-x86.zip.sha
+[win-x86-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.exe
+[win-x86-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.exe.sha
+[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.zip
+[win-x86-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-win-x86.zip.sha
-[osx-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-osx-x64.pkg
-[osx-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-osx-x64.pkg.sha
-[osx-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-osx-x64.tar.gz
-[osx-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-osx-x64.tar.gz.sha
+[osx-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.pkg
+[osx-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.pkg.sha
+[osx-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.tar.gz
+[osx-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-osx-x64.tar.gz.sha
-[linux-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-linux-x64.tar.gz
-[linux-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-linux-x64.tar.gz.sha
+[linux-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-x64.tar.gz
+[linux-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-x64.tar.gz.sha
-[ubuntu-14.04-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-ubuntu-x64.deb
-[ubuntu-14.04-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-ubuntu-x64.deb.sha
+[ubuntu-14.04-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-ubuntu-x64.deb
+[ubuntu-14.04-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-ubuntu-x64.deb.sha
-[ubuntu-16.04-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-ubuntu.16.04-x64.deb
-[ubuntu-16.04-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-ubuntu.16.04-x64.deb.sha
+[ubuntu-16.04-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-ubuntu.16.04-x64.deb
+[ubuntu-16.04-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-ubuntu.16.04-x64.deb.sha
-[ubuntu-16.10-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-ubuntu.16.10-x64.deb
-[ubuntu-16.10-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-ubuntu.16.10-x64.deb.sha
+[debian-8-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-debian-x64.deb
+[debian-8-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-debian-x64.deb.sha
-[debian-8-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-debian-x64.deb
-[debian-8-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-debian-x64.deb.sha
+[rhel-7-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel-x64.rpm
+[rhel-7-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel-x64.rpm.sha
-[rhel-7-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-rhel-x64.rpm
-[rhel-7-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/15.5/dotnet-sdk-latest-rhel-x64.rpm.sha
+[rhel-6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel.6-x64.tar.gz
+[rhel-6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha
# Debian daily feed
@@ -152,15 +140,6 @@ sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
sudo apt-get update
```
-Ubuntu 16.10
-```
-sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'
-
-sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
-
-sudo apt-get update
-```
-
Debian 8
```
sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ jessie main" > /etc/apt/sources.list.d/dotnetdev.list'
diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj
index f72d85fc6..331a6e75f 100644
--- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj
+++ b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj
@@ -2,10 +2,11 @@
- netcoreapp2.0;net451
+ netcoreapp2.1;net451Exe
- $(AssetTargetFallback);portable-net45+win8;dnxcore50
+ $(AssetTargetFallback);portable-net45+win8;dnxcore50win7-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/NuGet.Config b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj
index 82a5ad25d..287b089bb 100644
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj
+++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj
@@ -4,6 +4,7 @@
AppWithRedirectsAndConfigExewin7-x64;win7-x86
+ $(TEST_PACKAGES)
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj
index 94b99d56b..8e5fc172e 100644
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj
+++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj
@@ -4,6 +4,7 @@
AppWithRedirectsNoConfigExewin7-x64;win7-x86
+ $(TEST_PACKAGES)
diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config b/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj
index d57f09629..81bd8b767 100644
--- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj
+++ b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj
@@ -2,7 +2,8 @@
netstandard1.6;net451Library
- $(AssetTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.0
+ $(AssetTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.1
+ $(TEST_PACKAGES)
diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/XUnitProject.csproj b/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/XUnitProject.csproj
index 2ae7ce025..e11243d4f 100644
--- a/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/XUnitProject.csproj
+++ b/TestAssets/DesktopTestProjects/MultiTFMXunitProject/XUnitProject/XUnitProject.csproj
@@ -2,7 +2,7 @@
- net461;netcoreapp2.0
+ net461;netcoreapp2.1
diff --git a/TestAssets/DesktopTestProjects/NETFrameworkReferenceNETStandard20/MultiTFMTestApp/MultiTFMTestApp.csproj b/TestAssets/DesktopTestProjects/NETFrameworkReferenceNETStandard20/MultiTFMTestApp/MultiTFMTestApp.csproj
index cc54ec8ae..465f0e78a 100644
--- a/TestAssets/DesktopTestProjects/NETFrameworkReferenceNETStandard20/MultiTFMTestApp/MultiTFMTestApp.csproj
+++ b/TestAssets/DesktopTestProjects/NETFrameworkReferenceNETStandard20/MultiTFMTestApp/MultiTFMTestApp.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.0;net461
+ netcoreapp2.1;net461
diff --git a/TestAssets/Directory.Build.props b/TestAssets/Directory.Build.props
new file mode 100644
index 000000000..905549edc
--- /dev/null
+++ b/TestAssets/Directory.Build.props
@@ -0,0 +1,3 @@
+
+
+
diff --git a/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/AppDependingOnOtherAsTool.csproj b/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/AppDependingOnOtherAsTool.csproj
index 30c6823e7..72070fa83 100644
--- a/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/AppDependingOnOtherAsTool.csproj
+++ b/TestAssets/NonRestoredTestProjects/AppThrowingException/AppDependingOnOtherAsTool/AppDependingOnOtherAsTool.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj b/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj
index db9d6f117..6edffa788 100644
--- a/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj
+++ b/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Broken/Broken.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Broken/Broken.csproj
index 1a79fa49d..75167a0cf 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Broken/Broken.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Broken/Broken.csproj
@@ -1,7 +1,7 @@
Library
- net451;netcoreapp2.0
+ net451;netcoreapp2.1
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj
index 0bdb79506..930f5ff99 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj
@@ -3,10 +3,10 @@
Library
- net451;netcoreapp2.0
+ net451;netcoreapp2.1
-
+
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj
index 1be153a79..764ed0f1e 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj
@@ -3,10 +3,10 @@
Library
- net451;netcoreapp2.0;netstandard1.4
+ net451;netcoreapp2.1;netstandard1.4
-
+
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj
index 68b8ed617..527b9151c 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj
@@ -3,7 +3,7 @@
Library
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj
index 68b8ed617..527b9151c 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj
@@ -3,7 +3,7 @@
Library
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj
index e11e31084..799473702 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj
@@ -3,9 +3,9 @@
Library
- net452;netcoreapp2.0
+ net452;netcoreapp2.1
-
+
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj
index 0fc35d3d8..6ec6e04f2 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj
@@ -5,7 +5,7 @@
Librarynet451;netcoreapp1.0;netstandard1.4
-
+
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj
index f33aa7821..8fb413a56 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj
@@ -5,7 +5,7 @@
Librarynet451;netcoreapp1.0
-
+
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj
index 8747ed6b7..b16235d3b 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj
@@ -5,7 +5,7 @@
Librarynet451;netcoreapp1.0
-
+
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj
index 0b2792110..a552074b8 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj
@@ -5,7 +5,7 @@
Librarynet451;netcoreapp1.0
-
+
diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj
index 328fc5fb1..8c75a39c3 100644
--- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj
+++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj
@@ -5,7 +5,7 @@
Librarynet451;netcoreapp1.0
-
+
diff --git a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/ProjectA.csproj b/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/ProjectA.csproj
index 915cb3e07..165e565c0 100755
--- a/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/ProjectA.csproj
+++ b/TestAssets/NonRestoredTestProjects/PJHalfMigrated/src/ProjectA/ProjectA.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.0
+ netcoreapp2.1portableProjectAExe
diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj
index 261918eb3..b93e3b384 100755
--- a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj
+++ b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj
@@ -1,8 +1,8 @@
- netcoreapp2.0
+ netcoreapp2.1Exe
- $(AssetTargetFallback);dnxcore50
+ $(AssetTargetFallback);dnxcore50
diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj
index f5ab2f51a..366b7f409 100644
--- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj
+++ b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1random-name
diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj
index 9184414e8..145d47d10 100644
--- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj
+++ b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1random-name$(GeneratedPackageId)dotnet-randompackage
diff --git a/TestAssets/TestPackages/NuGet.Config b/TestAssets/TestPackages/NuGet.Config
deleted file mode 100644
index 0750578cb..000000000
--- a/TestAssets/TestPackages/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj b/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj
index 6c57ebe5d..c237cd483 100644
--- a/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj
+++ b/TestAssets/TestPackages/ToolWithOutputName/ToolWithOutputName.csproj
@@ -2,7 +2,7 @@
- netcoreapp2.0
+ netcoreapp2.1dotnet-tool-with-output-nameToolWithOutputNameExe
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
index 97e20d00d..57417fb03 100644
--- a/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj
+++ b/TestAssets/TestPackages/dotnet-dependency-context-test/dotnet-dependency-context-test.csproj
@@ -3,7 +3,7 @@
1.0.0-rc
- netcoreapp2.0
+ netcoreapp2.1Exe
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..38e6c9213 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
@@ -6,7 +6,7 @@
1.0.0-rc
- netcoreapp2.0
+ netcoreapp2.1Exefalse
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
index 4505fc5a0..f77a56e08 100644
--- a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj
+++ b/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/TestAssets/TestPackages/dotnet-fallbackfoldertool/dotnet-fallbackfoldertool.csproj b/TestAssets/TestPackages/dotnet-fallbackfoldertool/dotnet-fallbackfoldertool.csproj
index 35e92a2bb..9e29a16a7 100644
--- a/TestAssets/TestPackages/dotnet-fallbackfoldertool/dotnet-fallbackfoldertool.csproj
+++ b/TestAssets/TestPackages/dotnet-fallbackfoldertool/dotnet-fallbackfoldertool.csproj
@@ -2,7 +2,7 @@
- netcoreapp2.0
+ netcoreapp2.1dotnet-fallbackfoldertoolExe
diff --git a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj
index fd5621f08..4ff2b8d00 100644
--- a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj
+++ b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj
@@ -5,7 +5,7 @@
1.0.0
- netcoreapp2.0
+ netcoreapp2.1dotnet-helloExewin7-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/dotnet-hello.csproj b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj
index 2391dfc1b..7e4bc54d0 100644
--- a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj
+++ b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj
@@ -5,7 +5,7 @@
2.0.0
- netcoreapp2.0
+ netcoreapp2.1dotnet-helloExewin7-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-portable/dotnet-portable.csproj b/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj
index bc2925f73..70f8b0dde 100644
--- a/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj
+++ b/TestAssets/TestPackages/dotnet-portable/dotnet-portable.csproj
@@ -2,7 +2,7 @@
- netcoreapp2.0
+ netcoreapp2.1Exe
diff --git a/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj b/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj
index 21eb0a6d1..1a4ab4176 100644
--- a/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj
+++ b/TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj
@@ -2,7 +2,7 @@
- netcoreapp2.0
+ netcoreapp2.1Exe
diff --git a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj
index 6dd25f7f6..c15ae1a16 100644
--- a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj
+++ b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj
@@ -4,6 +4,7 @@
Exenetcoreapp1.1
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/AppWithCorruptedLaunchSettings.csproj b/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/AppWithCorruptedLaunchSettings.csproj
index 45a048433..fce4c7b68 100644
--- a/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/AppWithCorruptedLaunchSettings.csproj
+++ b/TestAssets/TestProjects/AppWithCorruptedLaunchSettings/AppWithCorruptedLaunchSettings.csproj
@@ -3,7 +3,7 @@
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
+ netcoreapp2.1
+ win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj
index 9adf4c6fc..4ea5be23c 100755
--- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj
+++ b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj
@@ -2,8 +2,9 @@
- netcoreapp2.0
+ netcoreapp2.1Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
index df284421b..afcfb340e 100755
--- a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
+++ b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
@@ -2,8 +2,9 @@
- netcoreapp2.0
+ netcoreapp2.1Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config b/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config
deleted file mode 100644
index dd7ccd7af..000000000
--- a/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
index 6995199ee..5b5c0f757 100755
--- a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
+++ b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
@@ -3,10 +3,11 @@
1.0.0
- netcoreapp2.0
+ netcoreapp2.1AppWithDirectDepExefalse
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config b/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config
deleted file mode 100644
index dd7ccd7af..000000000
--- a/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj
index 5afb24921..4eef16036 100755
--- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj
+++ b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj
@@ -2,8 +2,9 @@
- netcoreapp2.0
+ netcoreapp2.1Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config
deleted file mode 100644
index 4da396ac8..000000000
--- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj
index 705cf2077..76195b1ca 100755
--- a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj
+++ b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj
@@ -2,8 +2,9 @@
- netcoreapp2.0
+ netcoreapp2.1Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithLaunchSettings/AppWithLaunchSettings.csproj b/TestAssets/TestProjects/AppWithLaunchSettings/AppWithLaunchSettings.csproj
index 45a048433..fce4c7b68 100644
--- a/TestAssets/TestProjects/AppWithLaunchSettings/AppWithLaunchSettings.csproj
+++ b/TestAssets/TestProjects/AppWithLaunchSettings/AppWithLaunchSettings.csproj
@@ -3,7 +3,7 @@
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
+ netcoreapp2.1
+ win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
diff --git a/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/AppWithLaunchSettingsNoDefault.csproj b/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/AppWithLaunchSettingsNoDefault.csproj
index 45a048433..fce4c7b68 100644
--- a/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/AppWithLaunchSettingsNoDefault.csproj
+++ b/TestAssets/TestProjects/AppWithLaunchSettingsNoDefault/AppWithLaunchSettingsNoDefault.csproj
@@ -3,7 +3,7 @@
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
+ netcoreapp2.1
+ win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
index 33cb2b5a7..abda3b8a9 100644
--- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
+++ b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
@@ -3,13 +3,14 @@
Exe
- net451;netcoreapp2.0
+ net451;netcoreapp2.1
+ $(TEST_PACKAGES)
-
+
diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config b/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
index 7f9c16848..a18ee9852 100755
--- a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
+++ b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
@@ -2,8 +2,9 @@
- netcoreapp2.0
+ netcoreapp2.1Exe
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config b/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj
index 9c5447b05..2de1535e2 100755
--- a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj
+++ b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj
@@ -3,11 +3,12 @@
1.0.0
- netcoreapp2.0
+ netcoreapp2.1DependencyContextFromToolExefalse$(AssetTargetFallback);dnxcore50;portable-net45+win8
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config b/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj b/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj
index 1af08f3b6..7c81fcb9c 100644
--- a/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj
+++ b/TestAssets/TestProjects/FSharpTestAppSimple/TestAppSimple.fsproj
@@ -2,7 +2,7 @@
- netcoreapp2.0
+ netcoreapp2.1Exetrue
diff --git a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj
index 89aae6c65..4ef98259b 100644
--- a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj
+++ b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj
@@ -3,7 +3,7 @@
Exe
- net451;netcoreapp2.0
+ net451;netcoreapp2.1
\ No newline at end of file
diff --git a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
index 766c1ae66..a3aea4813 100644
--- a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
+++ b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj
@@ -3,13 +3,13 @@
Exe
- net451;netcoreapp2.0
+ net451;netcoreapp2.1
-
+
diff --git a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj
index 79bceb82d..58e9e4b5b 100644
--- a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj
+++ b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj
@@ -3,8 +3,9 @@
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
+ netcoreapp2.1
+ win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;rhel.6-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config b/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/MultiDependentProject/MultiDependentProject.csproj b/TestAssets/TestProjects/MultiDependentProject/MultiDependentProject.csproj
index 8437d1b6d..9d52a2484 100644
--- a/TestAssets/TestProjects/MultiDependentProject/MultiDependentProject.csproj
+++ b/TestAssets/TestProjects/MultiDependentProject/MultiDependentProject.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/NewtonSoftDependentProject/NewtonSoftDependentProject.csproj b/TestAssets/TestProjects/NewtonSoftDependentProject/NewtonSoftDependentProject.csproj
index 48bba3bea..cff7d9c45 100644
--- a/TestAssets/TestProjects/NewtonSoftDependentProject/NewtonSoftDependentProject.csproj
+++ b/TestAssets/TestProjects/NewtonSoftDependentProject/NewtonSoftDependentProject.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/NuGet.Config b/TestAssets/TestProjects/NuGet.Config
deleted file mode 100644
index b03d4d16c..000000000
--- a/TestAssets/TestProjects/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/NuGetConfigDependentProject/NuGetConfigDependentProject.csproj b/TestAssets/TestProjects/NuGetConfigDependentProject/NuGetConfigDependentProject.csproj
index fd76d5489..340e58180 100644
--- a/TestAssets/TestProjects/NuGetConfigDependentProject/NuGetConfigDependentProject.csproj
+++ b/TestAssets/TestProjects/NuGetConfigDependentProject/NuGetConfigDependentProject.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj b/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj
index e9f02f323..f99d38872 100755
--- a/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj
+++ b/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj
@@ -2,7 +2,7 @@
- netcoreapp2.0
+ netcoreapp2.1Exetrue
diff --git a/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj b/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj
index ce5bf06cb..a4eeac8a4 100644
--- a/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj
index 7a2163613..45701ff71 100644
--- a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config b/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config
deleted file mode 100644
index b8e876fcb..000000000
--- a/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj b/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj
index 3f8176791..b4e6c9844 100644
--- a/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj
+++ b/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj
@@ -3,7 +3,8 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
+ $(TEST_PACKAGES)
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj
index 3a31eb5bf..358a47d7c 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndCaseSensitiveSolutionFolders/src/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj
index ce5bf06cb..a4eeac8a4 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.csproj
index 92f102c88..1fed155a1 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDir/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.csproj
index abea1bc3d..5ba5d5bac 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojInSubDirToRemove/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj
index ce5bf06cb..a4eeac8a4 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj
index 7a2163613..45701ff71 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj
index ce5bf06cb..a4eeac8a4 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/App.csproj
index 21cce6681..5469ce225 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj
index 21cce6681..5469ce225 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferencesWithEscapedDirSep/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.csproj
index abea1bc3d..5ba5d5bac 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndLastCsprojInSubDirToRemove/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/App.csproj
index 3a31eb5bf..358a47d7c 100644
--- a/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/App.csproj
+++ b/TestAssets/TestProjects/TestAppWithSlnAndSolutionFolders/src/App/App.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/VBTestApp/VBTestApp.vbproj b/TestAssets/TestProjects/VBTestApp/VBTestApp.vbproj
index ce1697ae8..23df6047f 100644
--- a/TestAssets/TestProjects/VBTestApp/VBTestApp.vbproj
+++ b/TestAssets/TestProjects/VBTestApp/VBTestApp.vbproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/VSTestCore/VSTestCore.csproj b/TestAssets/TestProjects/VSTestCore/VSTestCore.csproj
index 0d07738af..87c96e9b2 100644
--- a/TestAssets/TestProjects/VSTestCore/VSTestCore.csproj
+++ b/TestAssets/TestProjects/VSTestCore/VSTestCore.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/VSTestMulti/VSTestDesktopAndNetCore.csproj b/TestAssets/TestProjects/VSTestMulti/VSTestDesktopAndNetCore.csproj
index 1a8fb8e53..1311e72ea 100644
--- a/TestAssets/TestProjects/VSTestMulti/VSTestDesktopAndNetCore.csproj
+++ b/TestAssets/TestProjects/VSTestMulti/VSTestDesktopAndNetCore.csproj
@@ -2,7 +2,7 @@
- net46;netcoreapp2.0
+ net46;netcoreapp2.1
diff --git a/TestAssets/TestProjects/XunitCore/XunitCore.csproj b/TestAssets/TestProjects/XunitCore/XunitCore.csproj
index d6016beea..f2721a220 100644
--- a/TestAssets/TestProjects/XunitCore/XunitCore.csproj
+++ b/TestAssets/TestProjects/XunitCore/XunitCore.csproj
@@ -3,7 +3,7 @@
Exe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/TestAssets/TestProjects/XunitMulti/VSTestXunitDesktopAndNetCore.csproj b/TestAssets/TestProjects/XunitMulti/VSTestXunitDesktopAndNetCore.csproj
index 3c971a5e9..350f2c991 100644
--- a/TestAssets/TestProjects/XunitMulti/VSTestXunitDesktopAndNetCore.csproj
+++ b/TestAssets/TestProjects/XunitMulti/VSTestXunitDesktopAndNetCore.csproj
@@ -2,7 +2,7 @@
- net46;netcoreapp2.0
+ net46;netcoreapp2.1win7-x86win7-x86
@@ -11,7 +11,7 @@
DESKTOP;$(DefineConstants)
-
+
diff --git a/TestAssets/TestProjects/global.json b/TestAssets/TestProjects/global.json
deleted file mode 100644
index 09f20328d..000000000
--- a/TestAssets/TestProjects/global.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "projects": [ ".", "../../src" ]
-}
\ No newline at end of file
diff --git a/build.proj b/build.proj
index bac606d59..c7b973a7b 100644
--- a/build.proj
+++ b/build.proj
@@ -1,6 +1,6 @@
-
+
@@ -20,7 +20,7 @@
DependsOnTargets="MSBuildWorkaroundTarget;
RestoreDotnetCliBuildFramework">
-
@@ -39,7 +39,7 @@
$(ExtraRestoreArgs) --disable-parallel
-
@@ -50,6 +50,7 @@
+
diff --git a/build.sh b/build.sh
index 2177e91b7..99a136aa7 100755
--- a/build.sh
+++ b/build.sh
@@ -24,7 +24,7 @@ if [ -z "$HOME" ]; then
mkdir -p $HOME
fi
-args=( "$@" )
+args=
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
@@ -32,23 +32,15 @@ while [[ $# > 0 ]]; do
--docker)
export BUILD_IN_DOCKER=1
export DOCKER_IMAGENAME=$2
- # remove docker args
- args=( "${args[@]/$1}" )
- args=( "${args[@]/$2}" )
shift
;;
*)
+ args="$args $1"
+ ;;
esac
shift
done
-# $args array may have empty elements in it.
-# The easiest way to remove them is to cast to string and back to array.
-# This will actually break quoted arguments, arguments like
-# -test "hello world" will be broken into three arguments instead of two, as it should.
-temp="${args[@]}"
-args=($temp)
-
dockerbuild()
{
BUILD_COMMAND=/opt/code/run-build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@"
@@ -56,7 +48,7 @@ dockerbuild()
# Check if we need to build in docker
if [ ! -z "$BUILD_IN_DOCKER" ]; then
- dockerbuild "${args[@]}"
+ dockerbuild $args
else
- $DIR/run-build.sh "${args[@]}"
+ $DIR/run-build.sh $args
fi
diff --git a/build/AzureInfo.props b/build/AzureInfo.props
index 9f323b42b..8877694e2 100644
--- a/build/AzureInfo.props
+++ b/build/AzureInfo.props
@@ -1,4 +1,4 @@
-
+Sdk$(ARTIFACT_STORAGE_CONTAINER)
@@ -15,7 +15,5 @@
$(TRANSPORTFEED_STORAGE_CONTAINER)dotnet-core$(TRANSPORTFEED_STORAGE_KEY)
- $(TRANSPORTFEED_STORAGE_ACCOUNT)
- dotnetfeed
diff --git a/build/BackwardsCompatibilityRuntimes.props b/build/BackwardsCompatibilityRuntimes.props
index 9664fdadf..d9b7ddc24 100644
--- a/build/BackwardsCompatibilityRuntimes.props
+++ b/build/BackwardsCompatibilityRuntimes.props
@@ -1,4 +1,4 @@
-
+release/1.1.01.1.2
diff --git a/build/BranchInfo.props b/build/BranchInfo.props
index f048a677e..f62c8fd00 100644
--- a/build/BranchInfo.props
+++ b/build/BranchInfo.props
@@ -1,6 +1,6 @@
-
+
- release/15.5
- release/15.5
+ master
+ master
diff --git a/build/Branding.props b/build/Branding.props
index 02463e2c5..7369beab5 100644
--- a/build/Branding.props
+++ b/build/Branding.props
@@ -1,23 +1,24 @@
-
+
- Microsoft .NET Core SDK - 2.1.1
+ Microsoft .NET Core SDK 2.2.0 - Preview.NET Standard Support for Visual Studio 2015
- Microsoft .NET Core Runtime - 2.0.1
- Microsoft .NET Core Host - 2.0.1
- Microsoft .NET Core Host FX Resolver - 2.0.0
+ Microsoft .NET Core Runtime 2.1.0 - Preview
+ Microsoft .NET Core Host 2.1.0 - Preview
+ Microsoft .NET Core Host FX Resolver 2.1.0 - PreviewMicrosoft.NETCore.App$(SharedFrameworkName)$(Rid)$(OSName)-$(Architecture)
+
$(HostRid)
+ '$(HostRid)' == 'fedora.24-x64' OR
+ '$(HostRid)' == 'rhel.6-x64' OR
+ '$(HostRid)' == 'opensuse.42.1-x64' ">$(HostRid)
$(HostOSName)-$(Architecture)dotnet-sdk-internal
@@ -31,6 +32,7 @@
$(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid)$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)$(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid)
- $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(HostMonikerRid)
+ $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-
+ $(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid)$(HostMonikerRid)
diff --git a/build/BuildAndPublishAllLinuxDistrosNativeInstallers.targets b/build/BuildAndPublishAllLinuxDistrosNativeInstallers.targets
new file mode 100644
index 000000000..af2faa465
--- /dev/null
+++ b/build/BuildAndPublishAllLinuxDistrosNativeInstallers.targets
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
\ No newline at end of file
diff --git a/build/BuildDefaults.props b/build/BuildDefaults.props
index 64eddcfd4..f13caffcd 100644
--- a/build/BuildDefaults.props
+++ b/build/BuildDefaults.props
@@ -1,11 +1,21 @@
-
+Prepare;Compile;Test;Package;PublishDebugtrue
+ truefalse
- true
- true
+ true
+ truetrue
+
+
+ true
+
+
+
+ NU1701
+
+ true
diff --git a/build/BuildInfo.targets b/build/BuildInfo.targets
index df28e1980..6abd51fa9 100644
--- a/build/BuildInfo.targets
+++ b/build/BuildInfo.targets
@@ -21,7 +21,7 @@
linux
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Rid>$(Rid)</Rid>
<Architecture>$(Architecture)</Architecture>
diff --git a/build/BundledRuntimes.props b/build/BundledRuntimes.props
index a3c20a3e9..82d926e11 100644
--- a/build/BundledRuntimes.props
+++ b/build/BundledRuntimes.props
@@ -1,4 +1,4 @@
-
+$(HostRid)$(HostMonikerRid)
@@ -32,21 +32,17 @@
- $(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimeAzureblobStoresSubfolderName)
+ $(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimePackageFolderName)runtime.version$(PackagesDirectory)/$(AspNetCoreSharedRuntimeVersionFileName)
-
- $(HostOSName)$(Architecture)
- $(HostOSName)
- linux
-
- -$(AspNetCoreRuntimePackageTimestamp)
- -$(AspNetCoreRelease)$(AspNetCoreRuntimeStoreSuffix)
- Build.RS.$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)$(AspNetCoreRuntimeInstallerArchiveSuffix)$(ArchiveExtension)
+ win7-$(Architecture)
+ $(HostOSName)-$(Architecture)
+ linux-$(Architecture)
+ $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)-$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)$(ArchiveExtension)$(PackagesDirectory)/$(AspNetCoreRuntimeInstallerArchiveFileName)
- AspNetCorePackageStoreLib$(Architecture)$(AspNetCoreRuntimeStoreSuffix).wixlib
+ AspNetCorePackageStoreLib_$(Architecture)-$(AspNetCoreRuntimePackageVersion).wixlib$(PackagesDirectory)/$(AspNetCoreRuntimeInstallerWixLibFileName)
diff --git a/build/BundledSdks.props b/build/BundledSdks.props
index b259c4a2a..77a089668 100644
--- a/build/BundledSdks.props
+++ b/build/BundledSdks.props
@@ -1,4 +1,4 @@
-
+
diff --git a/build/BundledTemplates.proj b/build/BundledTemplates.proj
index 014f5bc92..dfc66e111 100644
--- a/build/BundledTemplates.proj
+++ b/build/BundledTemplates.proj
@@ -23,7 +23,7 @@
-
diff --git a/build/BundledTemplates.props b/build/BundledTemplates.props
index 397ed4f0f..ecf2095c7 100644
--- a/build/BundledTemplates.props
+++ b/build/BundledTemplates.props
@@ -1,8 +1,10 @@
-
+
-
-
+
+
+
+
diff --git a/build/BundledTools.props b/build/BundledTools.props
index b57577824..947148dd5 100644
--- a/build/BundledTools.props
+++ b/build/BundledTools.props
@@ -1,4 +1,4 @@
-
+runtime.$(SharedFrameworkRid).microsoft.netcore.app$(NuGetPackagesDir)/$(RuntimeNETCoreAppPackageName)/$(CLI_SharedFrameworkVersion)/tools/crossgen$(ExeExtension)
diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props
index ae5d2844e..6b942e865 100644
--- a/build/DependencyVersions.props
+++ b/build/DependencyVersions.props
@@ -1,7 +1,7 @@
-
+
- 2.0.0
+ 2.1.0-preview1-25909-0315.5.0-preview-000178-11168242.6.0-beta2-62210-011.6.0-beta2-25304
@@ -13,7 +13,7 @@
- 15.5.0-preview-20171108-4
+ 2.1.0-preview1-20171006-4$(CLI_NETSDK_Version)4.5.0-preview2-4529
@@ -26,26 +26,18 @@
1.0.0-beta2-20171004-3091.0.0-beta2-20171004-3091.0.0-beta2-20171004-309
- 1.0.0-beta2-20170810-304
- 2.0.0
- 2.0.0
- 0.1.1-alpha-167
+ 1.0.0-beta2-20171004-309
+ 2.1.0-preview1-25909-03
+ 2.1.0-preview1-25909-03
+ 0.1.1-alpha-1741.2.1-alpha-0021330.2.01.0.4170.2.0-beta-000042
-
-
- notimestamp
-
- 2.0.0
- rtm
- 2.0.0
- 26452
-
+ 0.2.0-beta-000059aspnetcore-store
- $(AspNetCoreVersion)-$(AspNetCoreRelease)
- $(AspNetCoreBranchName)-$(AspNetCoreRuntimePackageTimestamp)
+ dev-26623
+ 2.1.0-preview1-26623
diff --git a/build/DerivedHostMachineInfo.props b/build/DerivedHostMachineInfo.props
index d9dc94444..534bc2167 100644
--- a/build/DerivedHostMachineInfo.props
+++ b/build/DerivedHostMachineInfo.props
@@ -1,7 +1,9 @@
-
-
- true
- true
- true
-
+
+
+ true
+ true
+
+ true
+ true
+
diff --git a/build/FileExtensions.props b/build/FileExtensions.props
index 21f8a68d2..c9f943b13 100644
--- a/build/FileExtensions.props
+++ b/build/FileExtensions.props
@@ -1,4 +1,4 @@
-
+.zip.tar.gz
diff --git a/build/GenerateResxSource.targets b/build/GenerateResxSource.targets
index b25582ee2..1eb51907e 100644
--- a/build/GenerateResxSource.targets
+++ b/build/GenerateResxSource.targets
@@ -1,4 +1,4 @@
-
+
diff --git a/build/GitCommitInfo.targets b/build/GitCommitInfo.targets
index 4addb6c8a..6ac729e50 100644
--- a/build/GitCommitInfo.targets
+++ b/build/GitCommitInfo.targets
@@ -23,7 +23,7 @@
%(GitInfoCommitHashLines.Identity)
-<Project ToolsVersion="15.0">
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CommitCount>$(GitInfoCommitCount)</CommitCount>
<CommitHash>$(GitInfoCommitHash)</CommitHash>
diff --git a/build/HostInfo.targets b/build/HostInfo.targets
index 50331f196..ed1046cc0 100644
--- a/build/HostInfo.targets
+++ b/build/HostInfo.targets
@@ -10,7 +10,7 @@
-<Project ToolsVersion="15.0">
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<HostRid>$(HostRid)</HostRid>
<HostOSName>$(HostOSName)</HostOSName>
diff --git a/build/InitRepo.props b/build/InitRepo.props
index 3a17534a9..d5794af9b 100644
--- a/build/InitRepo.props
+++ b/build/InitRepo.props
@@ -1,6 +1,7 @@
- $(RepoRoot)/artifacts/obj
+ bin/obj
+ $(RepoRoot)/$(RelativeGeneratedPropsDir)$(GeneratedPropsDir)/GitCommitInfo.props$(GeneratedPropsDir)/HostInfo.props$(GeneratedPropsDir)/BuildInfo.props
diff --git a/build/InputDirectories.props b/build/InputDirectories.props
index 0fc1b7a74..7564abe34 100644
--- a/build/InputDirectories.props
+++ b/build/InputDirectories.props
@@ -1,4 +1,4 @@
-
+$(RepoRoot)/build_projects/dotnet-cli-build$(RepoRoot)/src
diff --git a/build/InstallerInfo.props b/build/InstallerInfo.props
index 036369fab..31fadd75e 100644
--- a/build/InstallerInfo.props
+++ b/build/InstallerInfo.props
@@ -1,4 +1,4 @@
-
+$(PackagesDirectory)$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)
diff --git a/build/LinuxDistrosNativeInstaller.props b/build/LinuxDistrosNativeInstaller.props
new file mode 100644
index 000000000..d10dde9bc
--- /dev/null
+++ b/build/LinuxDistrosNativeInstaller.props
@@ -0,0 +1,28 @@
+
+
+
+ ubuntu.16.04
+ deb
+ $(ubuntu1604x64RepositoryId)
+ ubuntu.16.04-x64
+
+
+ ubuntu.14.04
+ deb
+ $(ubuntu1404x64RepositoryId)
+ ubuntu-x64
+
+
+ debian
+ deb
+ $(debian8x64RepositoryId)
+ debian-x64
+
+
+ rhel
+ rpm
+ $(rhel7x64RepositoryId)
+ rhel-x64
+
+
+
\ No newline at end of file
diff --git a/build/MSBuildExtensions.props b/build/MSBuildExtensions.props
index c36782efe..26f27e8c4 100644
--- a/build/MSBuildExtensions.props
+++ b/build/MSBuildExtensions.props
@@ -1,4 +1,4 @@
-
+$(RepoRoot)/resources/MSBuildImports
diff --git a/build/MSBuildExtensions.targets b/build/MSBuildExtensions.targets
index c6dd9f7ae..e24b2225b 100644
--- a/build/MSBuildExtensions.targets
+++ b/build/MSBuildExtensions.targets
@@ -75,7 +75,7 @@
NuGetPackagesDir=$(NuGetPackagesDir);
DependencyPackageName=%(ExtensionPackageToRestore.Identity);
DependencyPackageVersion=%(ExtensionPackageToRestore.Version);
- Stage0Directory=$(Stage0Directory)
+ PreviousStageDirectory=$(PreviousStageDirectory)
diff --git a/build/MicroBuild.props b/build/MicroBuild.props
index 1cf77f45b..f55a5eea1 100644
--- a/build/MicroBuild.props
+++ b/build/MicroBuild.props
@@ -1,9 +1,6 @@
-
- $(MSBuildThisFileDirectory)/..
- $(NUGET_PACKAGES)$(RepoRoot)/.nuget/packages$(NuGetPackagesDir)/microbuild.core/$(MicroBuildVersion)/build/
diff --git a/build/Microsoft.DotNet.Cli.tasks b/build/Microsoft.DotNet.Cli.tasks
index b12241002..d733ad10a 100644
--- a/build/Microsoft.DotNet.Cli.tasks
+++ b/build/Microsoft.DotNet.Cli.tasks
@@ -34,6 +34,7 @@
+
diff --git a/build/OutputDirectories.props b/build/OutputDirectories.props
index 42e7d255a..5ffd7a590 100644
--- a/build/OutputDirectories.props
+++ b/build/OutputDirectories.props
@@ -1,23 +1,34 @@
-
+
- $(RepoRoot)/artifacts/$(Rid)
- $(BaseOutputDirectory)/stage2
- $(BaseOutputDirectory)/stage2WithBackwardsCompatibleRuntimes
+ $([MSBuild]::Add($(CliOuterBuildStage), '1'))
+ 2
+
+
+ $(RepoRoot)/bin/$(CliBuildStage)/$(Rid)
+ $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)'))
+
+ $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)'))
+ $(BaseOutputDirectory)/dotnet
+ $(BaseOutputDirectory)/dotnetWithBackwardsCompatibleRuntimes$(OutputDirectory)/sdk/$(SdkVersion)
- $(BaseOutputDirectory)/stage2symbols
+ $(BaseOutputDirectory)/symbols$(SdkOutputDirectory)/Roslyn$(SdkOutputDirectory)/FSharp
- $(BaseOutputDirectory)/stage2compilation
+ $(BaseOutputDirectory)/compilation$(BaseOutputDirectory)/intermediate$(BaseOutputDirectory)/packages$(IntermediateDirectory)/sharedFrameworkPublish$(BaseOutputDirectory)/AspRT$(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish
- $(RepoRoot)/artifacts/testpackages/
+ $(BaseOutputDirectory)/test/$(OutputDirectory)/dotnet$(ExeExtension)$(IntermediateDirectory)/GeneratedMSBuildExtensions$(IntermediateDirectory)/MSBuildExtensionsLayout$(MSBuildExtensionsLayoutDirectory)/MSBuildSdkResolver
+
+ $(BaseOutputDirectory)/PreviousStage.props
diff --git a/build/Package.targets b/build/Package.targets
index 8896bdb1f..eef514f56 100644
--- a/build/Package.targets
+++ b/build/Package.targets
@@ -7,10 +7,11 @@
+
+ DependsOnTargets="Prepare;Layout;GeneratePkgs;GenerateDebs;GenerateMsis;GenerateRpms" />
-
+
+
+
+
\ No newline at end of file
diff --git a/build/Prepare.targets b/build/Prepare.targets
index 214b1f78d..2783c8214 100644
--- a/build/Prepare.targets
+++ b/build/Prepare.targets
@@ -4,7 +4,7 @@
+ DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages;IsolateArtifactsFromDirectoryBuildFiles;CreatePropsForNextStage" />
+
+
+
@@ -31,7 +39,7 @@
%(_DownloadAndExtractItem.OverwriteDestination)True
-
+
@@ -54,7 +62,7 @@
-
@@ -79,7 +87,7 @@
-
@@ -98,4 +106,39 @@
+
+
+
+
+
+
+
+
+<Project>
+ <PropertyGroup>
+ <PreviousStageDirectory>$(OutputDirectory)</PreviousStageDirectory>
+ <PreviousStageDotnet>$(DotnetInOutputDirectory)</PreviousStageDotnet>
+ <CliOuterBuildStage>$(CliBuildStage)</CliOuterBuildStage>
+ </PropertyGroup>
+</Project>
+
+
+
+ $([System.IO.File]::ReadAllText($(NextStagePropsPath)))
+
+
+ false
+ true
+
+
+
+
+
+
diff --git a/build/Publish.targets b/build/Publish.targets
index efe45cd91..b7dcf3b17 100644
--- a/build/Publish.targets
+++ b/build/Publish.targets
@@ -7,16 +7,25 @@
-
+
+
+
+ Condition=" '$(PublishNativeInstallers)' == 'true' "/>
-
+ Condition=" '$(PublishArchives)' == 'true' "/>
+
+ Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' == 'true' AND '$(OS)' == 'Windows_NT' "/>
+ Condition=" '$(PUBLISH_NUPKG_TO_AZURE_BLOB)' == 'true' AND '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
@@ -76,4 +85,4 @@
ContainerName="$(ArtifactContainerName)"
Items="@(CliVersionBadgeToUpload)" />
-
\ No newline at end of file
+
diff --git a/build/RestoreDependency.proj b/build/RestoreDependency.proj
index 142f5e929..19f209ce0 100644
--- a/build/RestoreDependency.proj
+++ b/build/RestoreDependency.proj
@@ -33,7 +33,7 @@
-
diff --git a/build/SandBoxAndPackage.proj b/build/SandBoxAndPackage.proj
new file mode 100644
index 000000000..26b2b4b0f
--- /dev/null
+++ b/build/SandBoxAndPackage.proj
@@ -0,0 +1,79 @@
+
+
+
+
+
+ bin/WorkingCopy
+ $(SandBoxFolderName)/RelativeSandBoxPackageOutputFolder
+ $(RepoRoot)/$(SandBoxFolderName)/$(LinuxDistrosNeedNativeInstaller)
+ .nuget
+ bin/2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SandBoxRepoRoot)/build.sh
+ $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --configuration $(BuildConfiguration)
+ $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --docker $(DockerFolder)
+ $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --skip-prereqs
+ $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) /target:GenerateInstallersAndCopyOutOfSandBox
+ $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) /p:RelativeSandBoxPackageOutputFolder=$(RelativeSandBoxPackageOutputFolder)
+ 0
+ 2>&1
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/SandBoxAndPackageInParallel.proj b/build/SandBoxAndPackageInParallel.proj
new file mode 100644
index 000000000..5ec1930f5
--- /dev/null
+++ b/build/SandBoxAndPackageInParallel.proj
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/build/SetupPreviousStage.props b/build/SetupPreviousStage.props
new file mode 100644
index 000000000..7545eddc7
--- /dev/null
+++ b/build/SetupPreviousStage.props
@@ -0,0 +1,13 @@
+
+
+ $(RepoRoot)/.dotnet_stage0/$(Architecture)
+ $(PreviousStageDirectory)/dotnet$(ExeExtension)
+
+
+
+
+
+ False
+ True
+
+
diff --git a/build/Signing.proj b/build/Signing.proj
index d3eebb140..da686886a 100644
--- a/build/Signing.proj
+++ b/build/Signing.proj
@@ -1,9 +1,15 @@
+
+
+
+ true
+
+
+
-
-
@@ -13,10 +19,6 @@
- $(RepoRoot)/artifacts/$(Rid)
- $(BaseOutputDirectory)/stage2
- $(BaseOutputDirectory)/stage2compilation
- $(BaseOutputDirectory)/packages$(BaseOutputDirectory)/intermediate/MSBuildExtensionsLayout/MSBuildSdkResolver
-
+ $(InternalCertificateId)
@@ -85,9 +84,6 @@
-
- $(SdkResolverOutputDirectory)
- $(InternalCertificateId)
@@ -98,9 +94,6 @@
-
- $(PackagesDirectory)
- $(InternalCertificateId)
@@ -114,9 +107,6 @@
-
- $(PackagesDirectory)
- $(InternalCertificateId)
@@ -127,9 +117,6 @@
-
- $(PackagesDirectory)
- $(InternalCertificateId)
diff --git a/build/Stage0.props b/build/Stage0.props
deleted file mode 100644
index e5a6a0b50..000000000
--- a/build/Stage0.props
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- $(RepoRoot)/.dotnet_stage0/$(Architecture)
- $(RepoRoot)/.dotnet_stage0PJ/$(Architecture)
- $(Stage0Directory)/dotnet$(ExeExtension)
- False
- True
-
-
diff --git a/build/Test.targets b/build/Test.targets
index 4fadf70e4..388a2e1fe 100644
--- a/build/Test.targets
+++ b/build/Test.targets
@@ -12,24 +12,21 @@
$(TestOutputDir)/results/
-
-
-
-
-
- @(TestTaskEnvironmentVariables)
-
-
+ DependsOnTargets="TestsForBuildItself;BuildTests;">
+
+
+
CLIBuildDll=$(CLIBuildDll);
Configuration=$(Configuration);
- EnvironmentVariables=$(RunTestEnvironmentVariables);
+ TestArtifactsDir=$(TestArtifactsDir);
+ TestPackagesDir=$(TestPackagesDir);
+ PreviousStageProps=$(NextStagePropsPath);
TestProject=%(TestProjects.Identity);
TestResultXmlDir=$(TestResultXmlDir);
ToolPath=$(OutputDirectory);
@@ -58,13 +55,15 @@
DependsOnTargets="PrepareTests;
CreateTestAssetPackageNuPkgs;">
+ ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln""
+ AdditionalParameters="/p:PreviousStageProps=$(NextStagePropsPath)" />
@@ -74,19 +73,26 @@
+ ProjectPath="%(TestPackageProject.ProjectPath)"
+ AdditionalParameters="/p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)"
+ />
+ MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)" />
+
+
+
+
+ ToolPath="$(PreviousStageDirectory)" />
diff --git a/build/Version.props b/build/Version.props
index 4c47fdeba..6e311dd4d 100644
--- a/build/Version.props
+++ b/build/Version.props
@@ -1,9 +1,9 @@
-
+2
- 1
- 1
- preview
+ 2
+ 0
+ preview1$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)
diff --git a/build/VersionBadge.props b/build/VersionBadge.props
deleted file mode 100644
index 0dab52fb8..000000000
--- a/build/VersionBadge.props
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
- $(OSName)_$(Architecture)
- debian_8_x64
- rhel_7_x64
- ubuntu_14_04_x64
- ubuntu_16_04_x64
- ubuntu_16_10_x64
- linux_x64
-
- $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg
- $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_coherent_badge.svg
-
-
diff --git a/build/buildpipeline/security/DotNet-CLI-Security-Windows.json b/build/buildpipeline/security/DotNet-CLI-Security-Windows.json
new file mode 100644
index 000000000..74362e939
--- /dev/null
+++ b/build/buildpipeline/security/DotNet-CLI-Security-Windows.json
@@ -0,0 +1,764 @@
+{
+ "build": [
+ {
+ "enabled": true,
+ "continueOnError": false,
+ "alwaysRun": false,
+ "displayName": "Workaround for BuildTools - Clone Core-Setup",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "filename": "$(PB_Git)",
+ "arguments": "clone $(CoreSetupUrl) core-setup",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "failOnStandardError": "false"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": false,
+ "alwaysRun": false,
+ "displayName": "Workaround for BuildTools - Checkout Core-Setup master",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "filename": "$(PB_Git)",
+ "arguments": "checkout master",
+ "workingFolder": "$(build.SourcesDirectory)\\core-setup",
+ "failOnStandardError": "false"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": false,
+ "alwaysRun": false,
+ "displayName": "Workaround for BuildTools - Run init-tools.cmd",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "filename": "init-tools.cmd",
+ "arguments": "",
+ "workingFolder": "$(Build.SourcesDirectory)\\core-setup",
+ "failOnStandardError": "false"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Workaround for BuildTools - Delete CLI dir.props",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "-path \"$(Build.SourcesDirectory)\"",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param ($path)\ngci \"$path\\dir.props\" | Remove-Item -Force",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Download blobs from container $(PB_CloudDropAccountName)",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "c6c4c611-aa2e-4a33-b606-5eaba2196824",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "solution": "$(Build.SourcesDirectory)\\build\\buildpipeline\\security\\syncAzure.proj",
+ "msbuildLocationMethod": "version",
+ "msbuildVersion": "latest",
+ "msbuildArchitecture": "x64",
+ "msbuildLocation": "",
+ "platform": "x64",
+ "configuration": "$(BuildConfiguration)",
+ "msbuildArguments": "/p:AzureAccount=\"$(PB_CloudDropAccountName)\" /p:AzureToken=\"$(PB_CloudDropAccessToken)\" /p:BlobName=\"$(PB_BlobNameFilter)\" /verbosity:diag",
+ "clean": "false",
+ "maximumCpuCount": "false",
+ "restoreNugetPackages": "false",
+ "logProjectEvents": "false",
+ "createLogFile": "false"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Copy downloaded packages to security folder",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "refName": "PowerShell_23",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "-SrcDir \"$(Build.SourcesDirectory)\"",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param($SrcDir)\n$secDir = Join-Path \"$SrcDir\" \"security\"\n$pkgDir = \"$SrcDir\\core-setup\\packages\\AzureTransfer\"\nCopy-Item \"$pkgDir \" \"$secDir\" -Force -Recurse\n",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Extract downloaded packages",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "-SrcDir \"$(Build.SourcesDirectory)\"",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param($SrcDir)\n$secDir = Join-Path \"$SrcDir\" \"security\"\ngci \"$secDir\\*.zip\" | % {\n$dstDir = Join-Path \"$secDir\" $($_.BaseName)\nExpand-Archive -Path $($_.FullName) -DestinationPath \"$dstDir\" -Force\nWrite-Host \"Expanded: $($_.FullName)\"\nRemove-Item $_.FullName -Force\n}\n",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "List all files",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "$(Build.SourcesDirectory)",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param($SrcDir)\n$fileCount = 0\ngci $SrcDir -recurse | % {\nWrite-Host $($_.FullName)\n$fileCount += 1\n}\nWrite-Host \"File Count: $fileCount\"\n",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "environment": {},
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Remove non-CLI folders",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "refName": "PowerShell_22",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "-SrcDir \"$(Build.SourcesDirectory)\"",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param($SrcDir)\n$secDir = Join-Path \"$SrcDir\" \"security\"\n\ngci \"$secDir\" | where {$_.PSIsContainer} | % {\n gci $_.FullName | where {$_.PSIsContainer} | % {\n if ($_.BaseName -ine \"sdk\" -and $_.BaseName -notmatch \"symbols\")\n {\n Remove-Item $_.FullName -Recurse -Force -ErrorAction Continue\n Write-Host \"Removed $($_.FullName)\"\n }\n }\n}",
+ "failOnStandardError": "false"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Workaround for long path - DELETE files with path length greater than or equal to 240 characters",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "refName": "Task_10",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "-SrcDir \"$(Build.SourcesDirectory)\"",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param($SrcDir)\n$longPath = New-Object System.Collections.ArrayList\ngci \"$SrcDir\\*\" -recurse | where {!$_.PSIsContainer} | % {\nif ($($_.FullName.Length) -ge 240)\n{\n$longPath.Add($($_.Directory.FullName)) | Out-Null\n}\n}\n$longPath | % {\nStart-Process \"cmd\" -ArgumentList \"/c rd /S /Q $_\" -Wait\nWrite-Host \"DELETED $_\"\n}\n",
+ "failOnStandardError": "false"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "List all files - post delete",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "refName": "Task_11",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "$(Build.SourcesDirectory)",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param($SrcDir)\n$fileCount = 0\ngci $SrcDir -recurse | % {\nWrite-Host $($_.FullName)\n$fileCount += 1\n}\nWrite-Host \"File Count: $fileCount\"\n",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "environment": {},
+ "enabled": true,
+ "continueOnError": false,
+ "alwaysRun": false,
+ "displayName": "Get latest version info",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "refName": "PowerShell23",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "filePath",
+ "scriptName": "$(Build.SourcesDirectory)\\build\\buildpipeline\\security\\Get-LatestVersion.ps1",
+ "arguments": "-Branch \"$(CodeBase)\"",
+ "workingFolder": "",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "environment": {},
+ "enabled": true,
+ "continueOnError": false,
+ "alwaysRun": false,
+ "displayName": "Workaround for long package Id",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "refName": "PowerShell24",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "-packageId $(CliLatestPackageId)",
+ "workingFolder": "",
+ "inlineScript": "param($packageId)\n\nif ($packageId.Length -ge 16)\n{\n Write-Host \"Build number for security build is the package Id. TSA has a limit of 16 characters for build number. Since package Id is greater than 16 characters, build number will be set to current date time in yyyymmddHHMMss format.\"\n $CliLatestPackageId = Get-Date -Format yyyymmddHHMMss\n Write-Host \"##vso[task.setvariable variable=CliLatestPackageId;]$CliLatestPackageId\"\n}",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Run BinSkim ",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "3056813a-40e9-4b2f-8f6b-612d1bc4e045",
+ "versionSpec": "3.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "InputType": "CommandLine",
+ "arguments": "analyze $(Build.SourcesDirectory)\\security\\*.dll $(Build.SourcesDirectory)\\security\\*.exe --recurse --sympath $(Build.SourcesDirectory)\\security\\*.pdb --verbose --statistics",
+ "Function": "analyze",
+ "AnalyzeTarget": "$(Build.ArtifactStagingDirectory)",
+ "AnalyzeSymPath": "",
+ "AnalyzeConfigPath": "default",
+ "AnalyzePluginPath": "",
+ "AnalyzeRecurse": "true",
+ "AnalyzeVerbose": "true",
+ "AnalyzeHashes": "true",
+ "AnalyzeStatistics": "false",
+ "AnalyzeEnvironment": "false",
+ "ExportRulesOutputType": "SARIF",
+ "DumpTarget": "$(Build.ArtifactStagingDirectory)",
+ "DumpRecurse": "true",
+ "DumpVerbose": "true",
+ "toolVersion": "Latest"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Run APIScan",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "9adea2b1-3752-438c-80c6-a6f0a812abdd",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "targetMode": "binarysym",
+ "softwareFolder": "$(Build.SourcesDirectory)\\security",
+ "mpdFolder": "",
+ "softwareName": "CLI",
+ "softwareVersionNum": "$(CliLatestPackageId)",
+ "softwareBuildNum": "$(CliLatestPackageId)",
+ "modeType": "prerelease",
+ "noCopySymbols": "false",
+ "noCopyBinaries": "false",
+ "noDecompress": "true",
+ "exclusionList": "",
+ "email": "",
+ "symbolsFolder": "$(Build.SourcesDirectory)\\security",
+ "preBbtBinariesFolder": "",
+ "preBbtSymbolsFolder": "",
+ "isLargeApp": "false",
+ "analyzerTimeout": "00:00:00",
+ "preserveTempFiles": "false",
+ "toolVersion": "Latest"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": false,
+ "alwaysRun": false,
+ "displayName": "Checkout CLI at SHA listed in latest.version",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "-sha \"$(CliLatestCommitSha)\" -git \"$(PB_Git)\"",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param($sha, $git)\n\nStart-Process \"$git\" -ArgumentList \"clean -df\" -Wait -Verbose -ErrorAction Stop\nStart-Process \"$git\" -ArgumentList \"checkout $sha\" -Wait -Verbose -ErrorAction Stop\nWrite-Host \"Checked out at $sha\"\n",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Run Core-Setup clean.cmd",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "filename": "clean.cmd",
+ "arguments": "-all",
+ "workingFolder": "$(Build.SourcesDirectory)\\core-setup",
+ "failOnStandardError": "false"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Delete Core-Setup folder",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "-path \"$(Build.SourcesDirectory)\\core-setup\"",
+ "workingFolder": "",
+ "inlineScript": "param ($path)\nRemove-Item \"$path\" -Force -Recurse -ErrorAction Continue\n",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "List all files - post checkout",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "scriptType": "inlineScript",
+ "scriptName": "",
+ "arguments": "$(Build.SourcesDirectory)",
+ "workingFolder": "$(Build.SourcesDirectory)",
+ "inlineScript": "param($SrcDir)\n$fileCount = 0\ngci $SrcDir -recurse | % {\nWrite-Host $($_.FullName)\n$fileCount += 1\n}\nWrite-Host \"File Count: $fileCount\"\n",
+ "failOnStandardError": "true"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Run CredScan",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "ea576cd4-c61f-48f8-97e7-a3cb07b90a6f",
+ "versionSpec": "2.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "outputFormat": "pre",
+ "toolVersion": "Latest",
+ "scanFolder": "$(Build.SourcesDirectory)",
+ "searchersFileType": "Default",
+ "searchersFile": "",
+ "suppressionsFile": "",
+ "suppressAsError": "false",
+ "batchSize": ""
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Run PoliCheck",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "d785890c-0d0d-46bd-8167-8fa9d49990c7",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "inputType": "Basic",
+ "cmdLineArgs": "/F:$(Build.SourcesDirectory) /T:9 /O:PoliCheck.xml",
+ "targetType": "F",
+ "targetArgument": "$(Build.SourcesDirectory)",
+ "importEx": "0",
+ "termTypeT": "0029a9",
+ "termTypeTCustom": "9",
+ "termTypeK": "",
+ "termTypeL": "",
+ "EXGT": "false",
+ "result": "PoliCheck.xml",
+ "optionsFC": "1",
+ "optionsXS": "1",
+ "optionsCTGLEN": "",
+ "optionsSEV": "",
+ "optionsPE": "",
+ "optionsHMENABLE": "",
+ "optionsHPATH": "",
+ "optionsHVER": "",
+ "optionsRulesDBPath": "",
+ "optionsRule": "",
+ "optionsXCLASS": "",
+ "optionsTASKNAME": "",
+ "optionsWORKINGDIRECTORY": "",
+ "optionsFTPATH": "",
+ "optionsD": "",
+ "optionsB1": "",
+ "optionsB2": "",
+ "optionsB3": "",
+ "optionsOCDB": "",
+ "toolVersion": "Latest"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Post Analysis",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "f5679091-e6da-4974-a8dc-0eec03a8ea63",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "APIScan": "true",
+ "BinScope": "false",
+ "BinSkim": "true",
+ "BinSkimBreakOn": "Error",
+ "CredScan": "true",
+ "FortifySCA": "false",
+ "FxCop": "false",
+ "FxCopBreakOn": "ErrorAbove",
+ "ModernCop": "false",
+ "ModernCopBreakOn": "Error",
+ "PoliCheck": "true",
+ "PoliCheckBreakOn": "Severity1",
+ "SDLNativeRules": "false",
+ "TSLint": "false",
+ "TSLintBreakOn": "Error"
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "Publish Security Analysis Logs",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "4096c760-3a8a-435d-9689-88c0311bbc0e",
+ "versionSpec": "2.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "ArtifactName": "CodeAnalysisLogs",
+ "ArtifactType": "Container",
+ "TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)",
+ "RvName": "",
+ "ProductComponentName": "",
+ "ProductVersionNumber": "",
+ "PlatformName": "",
+ "SDLToolName": "",
+ "SDLToolResultFile": ""
+ }
+ },
+ {
+ "enabled": true,
+ "continueOnError": true,
+ "alwaysRun": false,
+ "displayName": "TSA upload to Codebase: DotNet-CLI-Trusted_$(CodeBase) Stamp: Azure",
+ "timeoutInMinutes": 0,
+ "condition": "succeeded()",
+ "task": {
+ "id": "3da26988-bb64-4a23-8f06-45531d297dae",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ },
+ "inputs": {
+ "codebase": "NewOrUpdate",
+ "tsaStamp": "Azure",
+ "tsaWebApiUrl": "$(TSAStamp)",
+ "codeBaseName": "DotNet-CLI-Trusted_$(CodeBase)",
+ "notificationAlias": "$(NotificationAlias)",
+ "codeBaseAdmins": "NORTHAMERICA\\raeda",
+ "instanceUrlAzure": "MSAZURE",
+ "instanceUrlBing": "",
+ "instanceUrlCarbon": "",
+ "instanceUrlDevDiv": "DEVDIV",
+ "instanceUrlSkype": "",
+ "instanceUrlTsa": "",
+ "instanceUrlPpe": "",
+ "projectNameDAIPVSTF": "",
+ "projectNameDYNAMICSCRM": "",
+ "projectNameMSAZURE": "One",
+ "projectNameMSDYENG": "",
+ "projectNameMSECG": "",
+ "projectNameIDENTITYDIVISION": "Code Scan - TSA",
+ "projectNameVSTFRD": "",
+ "projectNameMSASG": "",
+ "projectNameMICROSOFTVSTS": "",
+ "projectNameMSDATA": "",
+ "projectNameMSENG": "",
+ "projectNameDEVDIV": "DevDiv",
+ "projectNameSKYPETEST2": "",
+ "projectNameONEDRIVE": "",
+ "projectNameSQLBUVSTS": "",
+ "projectNamePOWERBI": "",
+ "projectNameAZUREVSTFPPE": "",
+ "projectNameSKYPE": "",
+ "projectNameDOMOREEXP": "",
+ "projectNameSQLBUVSTSTEST": "",
+ "areaPath": "One\\DevDiv\\DotNetCore",
+ "iterationPath": "One",
+ "uploadAPIScan": "true",
+ "uploadBinScope": "false",
+ "uploadBinSkim": "true",
+ "uploadCredScan": "true",
+ "uploadFortifySCA": "false",
+ "uploadFxCop": "false",
+ "uploadModernCop": "false",
+ "uploadPoliCheck": "true",
+ "uploadPREfast": "false",
+ "validateToolOutput": "Warning",
+ "validateCompatibility": "Error",
+ "uploadAsync": "true"
+ }
+ }
+ ],
+ "options": [
+ {
+ "enabled": false,
+ "definition": {
+ "id": "5bc3cfb7-6b54-4a4b-b5d2-a3905949f8a6"
+ },
+ "inputs": {}
+ },
+ {
+ "enabled": false,
+ "definition": {
+ "id": "7c555368-ca64-4199-add6-9ebaf0b0137d"
+ },
+ "inputs": {
+ "multipliers": "[]",
+ "parallel": "false",
+ "continueOnError": "true",
+ "additionalFields": "{}"
+ }
+ },
+ {
+ "enabled": false,
+ "definition": {
+ "id": "a9db38f9-9fdc-478c-b0f9-464221e58316"
+ },
+ "inputs": {
+ "workItemType": "234347",
+ "assignToRequestor": "true",
+ "additionalFields": "{}"
+ }
+ },
+ {
+ "enabled": false,
+ "definition": {
+ "id": "57578776-4c22-4526-aeb0-86b6da17ee9c"
+ },
+ "inputs": {}
+ },
+ {
+ "enabled": false,
+ "definition": {
+ "id": "5d58cc01-7c75-450c-be18-a388ddb129ec"
+ },
+ "inputs": {
+ "branchFilters": "[\"+refs/heads/*\"]",
+ "additionalFields": "{}"
+ }
+ }
+ ],
+ "variables": {
+ "system.debug": {
+ "value": "false"
+ }
+ },
+ "demands": [
+ "Agent.OS -equals windows_nt",
+ "msbuild"
+ ],
+ "retentionRules": [
+ {
+ "branches": [
+ "+refs/heads/*"
+ ],
+ "artifacts": [
+ "build.SourceLabel"
+ ],
+ "artifactTypesToDelete": [],
+ "daysToKeep": 10,
+ "minimumToKeep": 1,
+ "deleteBuildRecord": true,
+ "deleteTestResults": true
+ }
+ ],
+ "_links": {
+ "self": {
+ "href": "https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_apis/build/Definitions/6661"
+ },
+ "web": {
+ "href": "https://devdiv.visualstudio.com/_permalink/_build/index?collectionId=011b8bdf-6d56-4f87-be0d-0092136884d9&projectId=0bdbc590-a062-4c3f-b0f6-9383f67865ee&definitionId=6661"
+ },
+ "editor": {
+ "href": "https://devdiv.visualstudio.com/_permalink/_build/definitionEditor?collectionId=011b8bdf-6d56-4f87-be0d-0092136884d9&projectId=0bdbc590-a062-4c3f-b0f6-9383f67865ee&definitionId=6661"
+ },
+ "badge": {
+ "href": "https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6661/badge"
+ }
+ },
+ "buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)",
+ "jobAuthorizationScope": 1,
+ "jobTimeoutInMinutes": 600,
+ "jobCancelTimeoutInMinutes": 5,
+ "badgeEnabled": true,
+ "repository": {
+ "properties": {
+ "cleanOptions": "3",
+ "labelSources": "0",
+ "labelSourcesFormat": "$(build.buildNumber)",
+ "reportBuildStatus": "true",
+ "gitLfsSupport": "false",
+ "skipSyncSource": "false",
+ "checkoutNestedSubmodules": "false",
+ "fetchDepth": "0"
+ },
+ "id": "ceac4423-53f8-4c97-bc62-173630412581",
+ "type": "TfsGit",
+ "name": "DotNet-Cli-Trusted",
+ "url": "https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Cli-Trusted",
+ "defaultBranch": "refs/heads/master",
+ "clean": "true",
+ "checkoutSubmodules": false
+ },
+ "processParameters": {},
+ "quality": "definition",
+ "authoredBy": {
+ "id": "9d5fdf9f-36b6-4d0c-a12e-2737a673af94",
+ "displayName": "Ravi Eda",
+ "uniqueName": "raeda@microsoft.com",
+ "url": "https://app.vssps.visualstudio.com/Aa44b2c06-f247-425c-8464-4a0676af910a/_apis/Identities/9d5fdf9f-36b6-4d0c-a12e-2737a673af94",
+ "imageUrl": "https://devdiv.visualstudio.com/_api/_common/identityImage?id=9d5fdf9f-36b6-4d0c-a12e-2737a673af94"
+ },
+ "queue": {
+ "id": 36,
+ "name": "DotNet-Build",
+ "pool": {
+ "id": 39,
+ "name": "DotNet-Build"
+ }
+ },
+ "id": 6733,
+ "name": "DotNet-CLI-Security-Windows",
+ "url": "https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_apis/build/Definitions/6661",
+ "uri": "vstfs:///Build/Definition/6733",
+ "path": "\\",
+ "type": 2,
+ "revision": 6,
+ "createdDate": "2017-06-21T21:58:12.397Z",
+ "project": {
+ "id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee",
+ "name": "DevDiv",
+ "description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ",
+ "url": "https://devdiv.visualstudio.com/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee",
+ "state": "wellFormed",
+ "revision": 418097676,
+ "visibility": 0
+ }
+}
diff --git a/build/buildpipeline/security/Get-LatestVersion.ps1 b/build/buildpipeline/security/Get-LatestVersion.ps1
new file mode 100644
index 000000000..2f921ef3a
--- /dev/null
+++ b/build/buildpipeline/security/Get-LatestVersion.ps1
@@ -0,0 +1,71 @@
+<#
+.SYNOPSIS
+ Retrieves the latest commit SHA and the corresponding package Id for the specified branch of CLI.
+ This retrieval is achieved by downloading the latest.version file, which contains the commit SHA and package Id info.
+ If retrieval succeeds, then the commit is set as a VSTS Task Variable named CliLatestCommitSha, and similarly package Id is set as CliLatestPackageId.
+.PARAMETER $Branch
+ Name of the CLI branch.
+.PARAMETER $Filename
+ Name of the file that contains latest version info i.e. commit SHA and package Id.
+ If not specified, then the default value is latest.version
+.PARAMETER $UrlPrefix
+ URL prefix for $Filename.
+ If not specified, then the default value is https://dotnetcli.blob.core.windows.net/dotnet/Sdk
+#>
+
+param(
+ [Parameter(Mandatory=$true)]
+ [string]$Branch,
+ [string]$Filename="latest.version",
+ [string]$UrlPrefix="https://dotnetcli.blob.core.windows.net/dotnet/Sdk"
+)
+
+function Get-VersionInfo
+{
+ Write-Host "Attempting to retrieve latest version info from $latestVersionUrl"
+ $retries = 3
+ $retryCount = 1
+ $oldEap = $ErrorActionPreference
+
+ while ($retryCount -le $retries)
+ {
+ $ErrorActionPreference = "Stop"
+
+ try
+ {
+ $content = (Invoke-WebRequest -Uri "$latestVersionUrl" -UseBasicParsing).Content
+ return $content.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries)
+ }
+ catch
+ {
+ Sleep -Seconds (Get-Random -minimum 3 -maximum 10)
+ Write-Host "Exception occurred while attempting to get latest version info from $latestVersionUrl. $_"
+ Write-Host "Retry $retryCount of $retries"
+ }
+ finally
+ {
+ $ErrorActionPreference = $oldEap
+ }
+
+ $retryCount++
+ }
+}
+
+$latestVersionUrl = "$UrlPrefix/$Branch/$Filename"
+$latestVersionContent = Get-VersionInfo
+
+if ($latestVersionContent -ne $null -and $latestVersionContent.Length -eq 2)
+{
+ $CliLatestCommitSha = $latestVersionContent[0]
+ $CliLatestPackageId = $latestVersionContent[1]
+
+ Write-Host "##vso[task.setvariable variable=CliLatestCommitSha;]$CliLatestCommitSha"
+ Write-Host "##vso[task.setvariable variable=CliLatestPackageId;]$CliLatestPackageId"
+
+ Write-Host "The latest commit SHA in CLI $Branch is $CliLatestCommitSha"
+ Write-Host "The latest package Id in CLI $Branch is $CliLatestPackageId"
+}
+else
+{
+ Write-Error "Unable to get latest version info from $latestVersionUrl"
+}
diff --git a/build/buildpipeline/security/dir.props b/build/buildpipeline/security/dir.props
new file mode 100644
index 000000000..3e28b4a52
--- /dev/null
+++ b/build/buildpipeline/security/dir.props
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/build/buildpipeline/security/pipeline.json b/build/buildpipeline/security/pipeline.json
new file mode 100644
index 000000000..dbac3626b
--- /dev/null
+++ b/build/buildpipeline/security/pipeline.json
@@ -0,0 +1,22 @@
+{
+ "Repository": "cli",
+ "Definitions": {
+ "Path": ".",
+ "Type": "VSTS",
+ "BaseUrl": "https://devdiv.visualstudio.com/DefaultCollection",
+ "SkipBranchAndVersionOverrides": "false"
+ },
+ "Pipelines": [
+ {
+ "Name": "Security Build for Windows",
+ "Parameters": {
+ "TreatWarningsAsErrors": "false"
+ },
+ "Definitions": [
+ {
+ "Name": "DotNet-CLI-Security-Windows"
+ }
+ ]
+ }
+ ]
+}
diff --git a/build/buildpipeline/security/syncAzure.proj b/build/buildpipeline/security/syncAzure.proj
new file mode 100644
index 000000000..45d7657eb
--- /dev/null
+++ b/build/buildpipeline/security/syncAzure.proj
@@ -0,0 +1,21 @@
+
+
+
+
+
+ $(BuildToolsTaskDesktopDir)Microsoft.DotNet.Build.CloudTestTasks.dll
+ dotnet
+ $(PackagesDir)AzureTransfer
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/buildpipeline/security/syncAzure.targets b/build/buildpipeline/security/syncAzure.targets
new file mode 100644
index 000000000..4cc360a11
--- /dev/null
+++ b/build/buildpipeline/security/syncAzure.targets
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ $(PackagesDir)/AzureTransfer
+
+
+
+
+
+
+
+
+ <_OSFilteredBlobNames Include="@(_BlobList)"
+ Condition="'$(OSGroup)' == 'Windows_NT' AND
+ ('%(_BlobList.Extension)' == '.zip' OR '%(_BlobList.Extension)' == '.exe' OR '%(_BlobList.Extension)' == '.version')" />
+
+
+
+
+
diff --git a/build/compile/LzmaArchive.targets b/build/compile/LzmaArchive.targets
index 98a23337b..b38315825 100644
--- a/build/compile/LzmaArchive.targets
+++ b/build/compile/LzmaArchive.targets
@@ -3,7 +3,7 @@
$(SdkOutputDirectory)/nuGetPackagesArchive.lzma
- nuGetPackagesArchive.$(AspNetCoreRuntimePackageFlavor).lzma
+ nuGetPackagesArchive-$(AspNetCoreRuntimePackageVersion).lzma$(IntermediateDirectory)/$(NugetPackagesArchiveName)$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(NugetPackagesArchiveName)
diff --git a/build/package/CopySandBoxPackageOut.targets b/build/package/CopySandBoxPackageOut.targets
new file mode 100644
index 000000000..a7bf6b524
--- /dev/null
+++ b/build/package/CopySandBoxPackageOut.targets
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/build/package/Installer.DEB.proj b/build/package/Installer.DEB.proj
index 66300c4df..4b684d161 100644
--- a/build/package/Installer.DEB.proj
+++ b/build/package/Installer.DEB.proj
@@ -64,7 +64,7 @@
Mode="u+x" />
-
-
+
-
-
-
-
-
-
-
diff --git a/build/package/Installer.DEB.targets b/build/package/Installer.DEB.targets
index b041bc344..7f6c707fd 100644
--- a/build/package/Installer.DEB.targets
+++ b/build/package/Installer.DEB.targets
@@ -8,8 +8,7 @@
- dotnet-deb-tool-consumer.csproj
- $(IntermediateDirectory)/$(DotnetDebToolConsumerProjectName)
+ $(MSBuildThisFileDirectory)/dotnet-deb-tool-consumer$(NuGetPackagesDir)/dotnet-deb-tool/$(DotnetDebToolVersion)/lib/netcoreapp2.0/tool/package_tool
@@ -35,11 +34,8 @@
dotnet-hostfxr-$(HostFxrDebianPackageVersion)$(HostFxrDebianPackageName.ToLower())dotnet-host
- $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)
- $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)
- $(HostRid)
- $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeDebInstallerFileName).deb
- $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)-$(HostRidInAspNetCoreRuntimeDebInstallerFileName).deb
+ $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)
+ $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)-$(HostRid).deb
@@ -114,6 +110,9 @@
+
+
+
diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets
index 2a4e131b8..ea98d309a 100644
--- a/build/package/Installer.MSI.targets
+++ b/build/package/Installer.MSI.targets
@@ -199,7 +199,8 @@
+ -DotnetDir '$(PreviousStageDirectory)'
+ -TestDir '$(TestOutputDir)'" />
-
-
- $(SdkVersion)
- $(OutputDirectory)/sdk
- $(InstallerOutputDirectory)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)
- $(SdkInstallerFile)
- $(RepoRoot)/Documentation/manpages
- $(RepoRoot)/packaging/rpm/dotnet-config.json
- $(IntermediateDirectory)/$(RpmPackageName)/$(RpmPackageVersion)
- $(RpmIntermediatesDir)/debian-testResults.xml
- /usr/share/dotnet
-
-
-
- $(RpmIntermediatesDir)/RpmLayoutDirectory/
- $(RpmLayoutDirectory)package_root
- $(RpmLayoutPackageRoot)/sdk
- $(RpmLayoutDirectory)docs
- $(RpmLayoutDirectory)templates
- $(RpmLayoutDirectory)scripts
-
-
-
- $(SdkVersion)
- $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion)
- $(SharedFrameworkVersion)
- dotnet-runtime-$(SharedFxRpmPackageVersion)
- $(SharedFxRpmPackageName.ToLower())
- $(HostFxrVersion)
- dotnet-hostfxr-$(HostFxrRpmPackageVersion)
- $(HostFxrRpmPackageName.ToLower())
- dotnet-host
- $(HostRid)
- $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)
- $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)
- $(AspNetCoreVersion)-$(AspNetCoreRelease)-$(AspNetCoreRuntimePackageTimestamp)
- $(AspNetCoreVersion)
- $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm
- $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm
- $(ScriptsDir)/$(AfterInstallHostScriptName)
- $(RpmLayoutScripts)/$(AfterInstallHostScriptName)
-
-
-
- $(RepoRoot)/test/EndToEnd/EndToEnd.csproj
-
+
@@ -140,6 +96,11 @@
+
+
+
+
+
@@ -182,8 +143,52 @@
+
+
+ $(SdkVersion)
+ $(OutputDirectory)/sdk
+ $(InstallerOutputDirectory)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)
+ $(SdkInstallerFile)
+ $(RepoRoot)/Documentation/manpages
+ $(RepoRoot)/packaging/rpm/dotnet-config.json
+ $(IntermediateDirectory)/$(RpmPackageName)/$(RpmPackageVersion)
+ $(RpmIntermediatesDir)/debian-testResults.xml
+ /usr/share/dotnet
+
+
+
+ $(RpmIntermediatesDir)/RpmLayoutDirectory/
+ $(RpmLayoutDirectory)package_root
+ $(RpmLayoutPackageRoot)/sdk
+ $(RpmLayoutDirectory)docs
+ $(RpmLayoutDirectory)templates
+ $(RpmLayoutDirectory)scripts
+
+
+
+ $(SdkVersion)
+ $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion)
+ $(SharedFrameworkVersion)
+ dotnet-runtime-$(SharedFxRpmPackageVersion)
+ $(SharedFxRpmPackageName.ToLower())
+ $(HostFxrVersion)
+ dotnet-hostfxr-$(HostFxrRpmPackageVersion)
+ $(HostFxrRpmPackageName.ToLower())
+ dotnet-host
+ $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)
+ $(AspNetCoreRuntimePackageVersion)
+ $(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)-$(HostRid).rpm
+ $(ScriptsDir)/$(AfterInstallHostScriptName)
+ $(RpmLayoutScripts)/$(AfterInstallHostScriptName)
+
+
+
+ $(RepoRoot)/test/EndToEnd/EndToEnd.csproj
+
+
+
+ DependsOnTargets="SetupRpmProps">
$(PackagesDirectory)/$(AspNetCoreRuntimeRpmInstallerFileName)
@@ -234,7 +239,7 @@
ToolPath="$(RpmInstalledDirectory)" />
diff --git a/build/package/Nupkg.targets b/build/package/Nupkg.targets
index 9158c2143..d7287c8b7 100644
--- a/build/package/Nupkg.targets
+++ b/build/package/Nupkg.targets
@@ -24,7 +24,7 @@
@@ -34,7 +34,7 @@
-
diff --git a/build/package/dotnet-deb-tool-consumer.csproj b/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj
similarity index 74%
rename from build/package/dotnet-deb-tool-consumer.csproj
rename to build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj
index a48d3d6f2..03e67c852 100644
--- a/build/package/dotnet-deb-tool-consumer.csproj
+++ b/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj
@@ -1,6 +1,4 @@
-
-
netcoreapp2.0$(CLI_SharedFrameworkVersion)
diff --git a/build/prepare/CheckPrereqs.targets b/build/prepare/CheckPrereqs.targets
index 1e7454410..03d743c35 100644
--- a/build/prepare/CheckPrereqs.targets
+++ b/build/prepare/CheckPrereqs.targets
@@ -8,8 +8,8 @@
DependsOnTargets="CheckUbuntuAptGetDependencies;
CheckCentOsYumDependencies;">
-
-
+
+
-
\ No newline at end of file
+
+
+
+ $(OSName)_$(Architecture)
+ rhel.6_x64
+ linux_x64
+ all_linux_distros_native_installer
+
+ $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg
+ $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_coherent_badge.svg
+
+
+
diff --git a/build/publish/PublishDebian.targets b/build/publish/PublishDebian.targets
index 43ab5abda..801230fb0 100644
--- a/build/publish/PublishDebian.targets
+++ b/build/publish/PublishDebian.targets
@@ -4,30 +4,20 @@
dotnet-sdk-$(SdkVersion)
-
- $(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)
- $(SdkDebianIntermediateDirectory)/package_upload.json
- 1
+
+
+
+
-
- {
- "name":"$(SdkDebianPackageName)",
- "version":"$(NugetVersion)-$(DebianRevisionNumber)",
- "repositoryId":"$(REPO_ID)",
- "sourceUrl": "$(SdkDebianUploadUrl)"
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/build/publish/PublishNupkgToTransportFeed.targets b/build/publish/PublishNupkgToTransportFeed.targets
index 2f41acfd1..10352ac83 100644
--- a/build/publish/PublishNupkgToTransportFeed.targets
+++ b/build/publish/PublishNupkgToTransportFeed.targets
@@ -6,23 +6,17 @@
- packages
+ https://dotnetfeed.blob.core.windows.net/$(TransportFeedContainerName)/index.json
-
-
-
+
+ Overwrite="false" />
diff --git a/build/sdks/sdks.csproj b/build/sdks/sdks.csproj
index b7c9941c0..f246e1f9d 100755
--- a/build/sdks/sdks.csproj
+++ b/build/sdks/sdks.csproj
@@ -9,6 +9,7 @@
+
diff --git a/build/test/RunTest.proj b/build/test/RunTest.proj
index 8b1ec899f..0454d8a6f 100644
--- a/build/test/RunTest.proj
+++ b/build/test/RunTest.proj
@@ -11,7 +11,13 @@
-
+
+
+
+
+
+
+ test/Performance/Performance.csproj;
+ test/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj" />
diff --git a/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj b/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj
index dd2f94e91..fefc8affe 100644
--- a/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj
+++ b/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj
@@ -1,5 +1,4 @@
- netstandard1.5
diff --git a/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs b/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs
new file mode 100644
index 000000000..47c83e0a7
--- /dev/null
+++ b/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using FluentAssertions;
+using Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository;
+using Xunit;
+
+namespace dotnet_cli_build.Tests
+{
+ public class GivenActionAndRetryTimes
+ {
+ public static IEnumerable NoWaitTimer()
+ {
+ while (true)
+ {
+ yield return Task.CompletedTask;
+ }
+ }
+
+ [Fact]
+ public void ExponentialRetryShouldProvideIntervalSequence()
+ {
+ ExponentialRetry.Intervals.First().Should().Be(TimeSpan.FromSeconds(5));
+ ExponentialRetry.Intervals.Skip(1).First().Should().Be(TimeSpan.FromSeconds(10));
+ ExponentialRetry.Intervals.Skip(2).First().Should().Be(TimeSpan.FromSeconds(20));
+ ExponentialRetry.Intervals.Skip(3).First().Should().Be(TimeSpan.FromSeconds(40));
+ ExponentialRetry.Intervals.Skip(4).First().Should().Be(TimeSpan.FromSeconds(80));
+ }
+
+ [Fact]
+ public void ExponentialShouldNotRetryAfterFirstSucceess()
+ {
+ var fakeAction = new FakeAction(0);
+ ExponentialRetry.ExecuteWithRetry(
+ fakeAction.Run,
+ s => s == "success",
+ 10,
+ NoWaitTimer).Wait();
+ fakeAction.Count.Should().Be(0);
+ }
+
+ [Fact]
+ public void ExponentialShouldRetryUntilSuccess()
+ {
+ var fakeAction = new FakeAction(5);
+ ExponentialRetry.ExecuteWithRetry(
+ fakeAction.Run,
+ s => s == "success",
+ 10,
+ NoWaitTimer).Wait();
+ fakeAction.Count.Should().Be(5);
+ }
+
+ [Fact]
+ public void ExponentialShouldThrowAfterMaximumAmountReached()
+ {
+ var fakeAction = new FakeAction(10);
+ Action a = () => ExponentialRetry.ExecuteWithRetry(
+ fakeAction.Run,
+ s => s == "success",
+ 5,
+ NoWaitTimer,
+ "testing retry").Wait();
+ a.ShouldThrow()
+ .WithMessage("Retry failed for testing retry after 5 times with result: fail");
+ }
+ }
+
+ public class FakeAction
+ {
+ private readonly int _successAfter;
+
+ public FakeAction(int successAfter)
+ {
+ _successAfter = successAfter;
+ }
+
+ public int Count { get; private set; }
+
+ public Task Run()
+ {
+ if (_successAfter == Count)
+ {
+ return Task.FromResult("success");
+ }
+
+ Count++;
+ return Task.FromResult("fail");
+ }
+ }
+}
\ No newline at end of file
diff --git a/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj b/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj
new file mode 100644
index 000000000..e28340dda
--- /dev/null
+++ b/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj
@@ -0,0 +1,22 @@
+
+
+
+
+ $(CliTargetFramework)
+ 1.0.0
+ $(AssetTargetFallback);portable-net45+win8+wp8+wpa81
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs
index 1dfb0b3de..5b9073097 100644
--- a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs
+++ b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs
@@ -52,11 +52,9 @@ namespace Microsoft.DotNet.Cli.Build
{ "win_x86", false },
{ "win_x64", false },
{ "osx_x64", false },
- { "debian_8_x64", false },
- { "rhel_7_x64", false },
- { "ubuntu_14_04_x64", false },
- { "ubuntu_16_04_x64", false },
- { "linux_x64", false }
+ { "linux_x64", false },
+ { "rhel.6_x64", false },
+ { "all_linux_distros_native_installer", false}
};
if (!badges.ContainsKey(VersionBadgeMoniker))
diff --git a/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs b/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs
index 18cca3ab3..f0ab3f3a5 100644
--- a/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs
+++ b/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs
@@ -13,11 +13,13 @@ namespace Microsoft.DotNet.Cli.Build
public string Verbosity { get; set; }
+ public string AdditionalParameters { get; set; }
+
protected override string Args
{
get
{
- return $"{GetVerbosityArg()} {GetMaxCpuCountArg()}";
+ return $"{GetVerbosityArg()} {GetMaxCpuCountArg()} {GetAdditionalParameters()}";
}
}
@@ -40,5 +42,10 @@ namespace Microsoft.DotNet.Cli.Build
return null;
}
+
+ private string GetAdditionalParameters()
+ {
+ return AdditionalParameters;
+ }
}
}
diff --git a/build_projects/dotnet-cli-build/DotNetRestore.cs b/build_projects/dotnet-cli-build/DotNetRestore.cs
index 88bca5e22..d7d984be3 100644
--- a/build_projects/dotnet-cli-build/DotNetRestore.cs
+++ b/build_projects/dotnet-cli-build/DotNetRestore.cs
@@ -12,13 +12,11 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
- get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; }
+ get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {AdditionalParameters}"; }
}
public string ConfigFile { get; set; }
- public string AdditionalParameters { get; set; }
-
public string ProjectPath { get; set; }
public string Source { get; set; }
@@ -88,10 +86,5 @@ namespace Microsoft.DotNet.Cli.Build
return null;
}
-
- private string GetAdditionalParameters()
- {
- return AdditionalParameters;
- }
}
}
diff --git a/build_projects/dotnet-cli-build/EnsureFileExistsOnAzureBlobStorage.cs b/build_projects/dotnet-cli-build/EnsureFileExistsOnAzureBlobStorage.cs
new file mode 100644
index 000000000..e795349ff
--- /dev/null
+++ b/build_projects/dotnet-cli-build/EnsureFileExistsOnAzureBlobStorage.cs
@@ -0,0 +1,40 @@
+// 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 Microsoft.Build.Framework;
+using Microsoft.WindowsAzure.Storage.Blob;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Build.CloudTestTasks
+{
+ public class EnsureFileExistsOnAzureBlobStorage : Microsoft.Build.Utilities.Task
+ {
+ [Required]
+ public string FileUrl{ get; set; }
+
+ public override bool Execute()
+ {
+ if (!ExecuteAsync().GetAwaiter().GetResult())
+ {
+ throw new FileDoesNotExistOnAzureBlobStorageException(FileUrl);
+
+ }
+ return true;
+ }
+
+ private Task ExecuteAsync()
+ {
+ var blobClient = new CloudBlockBlob(new Uri(FileUrl));
+ return blobClient.ExistsAsync();
+ }
+
+ public class FileDoesNotExistOnAzureBlobStorageException : Exception
+ {
+ public FileDoesNotExistOnAzureBlobStorageException(string message) : base(message + " cannot be found on Azure Blob Storage")
+ {
+ }
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/MakeRelative.cs b/build_projects/dotnet-cli-build/MakeRelative.cs
index e8f04b159..6361f341c 100644
--- a/build_projects/dotnet-cli-build/MakeRelative.cs
+++ b/build_projects/dotnet-cli-build/MakeRelative.cs
@@ -17,21 +17,12 @@ namespace Microsoft.DotNet.Cli.Build
[Required]
public string Path2 { get; set; }
- public char SeparatorChar { get; set; }
-
[Output]
public ITaskItem RelativePath { get; set; }
public override bool Execute()
{
- if (SeparatorChar == default(char))
- {
- SeparatorChar = Path.DirectorySeparatorChar;
- }
-
- var relativePath = GetRelativePath(Path1, Path2, SeparatorChar);
-
- RelativePath = ToTaskItem(Path1, Path2, relativePath);
+ RelativePath = ToTaskItem(Path1, Path2, Path.GetRelativePath(Path1, Path2));
return true;
}
@@ -47,75 +38,5 @@ namespace Microsoft.DotNet.Cli.Build
return framework;
}
-
- private static string GetRelativePath(string path1, string path2, char separator = default(char))
- {
-
- StringComparison compare;
- if (CurrentPlatform.IsWindows)
- {
- compare = StringComparison.OrdinalIgnoreCase;
- // check if paths are on the same volume
- if (!string.Equals(Path.GetPathRoot(path1), Path.GetPathRoot(path2)))
- {
- // on different volumes, "relative" path is just Path2
- return path2;
- }
- }
- else
- {
- compare = StringComparison.Ordinal;
- }
-
- var index = 0;
- var path1Segments = path1.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
- var path2Segments = path2.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
- // if path1 does not end with / it is assumed the end is not a directory
- // we will assume that is isn't a directory by ignoring the last split
- var len1 = path1Segments.Length - 1;
- var len2 = path2Segments.Length;
-
- // find largest common absolute path between both paths
- var min = Math.Min(len1, len2);
- while (min > index)
- {
- if (!string.Equals(path1Segments[index], path2Segments[index], compare))
- {
- break;
- }
- // Handle scenarios where folder and file have same name (only if os supports same name for file and directory)
- // e.g. /file/name /file/name/app
- else if ((len1 == index && len2 > index + 1) || (len1 > index && len2 == index + 1))
- {
- break;
- }
- ++index;
- }
-
- var path = "";
-
- // check if path2 ends with a non-directory separator and if path1 has the same non-directory at the end
- if (len1 + 1 == len2 && !string.IsNullOrEmpty(path1Segments[index]) &&
- string.Equals(path1Segments[index], path2Segments[index], compare))
- {
- return path;
- }
-
- for (var i = index; len1 > i; ++i)
- {
- path += ".." + separator;
- }
- for (var i = index; len2 - 1 > i; ++i)
- {
- path += path2Segments[i] + separator;
- }
- // if path2 doesn't end with an empty string it means it ended with a non-directory name, so we add it back
- if (!string.IsNullOrEmpty(path2Segments[len2 - 1]))
- {
- path += path2Segments[len2 - 1];
- }
-
- return path;
- }
}
}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs
new file mode 100644
index 000000000..eba259a7d
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs
@@ -0,0 +1,62 @@
+// 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.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+using Newtonsoft.Json;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ internal class AddPackageStrategy : IAzurelinuxRepositoryServiceHttpStrategy
+ {
+ private readonly IdInRepositoryService _idInRepositoryService;
+ private readonly string _packageName;
+ private readonly string _packageVersion;
+ private readonly string _repositoryId;
+
+ public AddPackageStrategy(
+ IdInRepositoryService idInRepositoryService,
+ string packageName,
+ string packageVersion,
+ string repositoryId)
+ {
+ _idInRepositoryService = idInRepositoryService
+ ?? throw new ArgumentNullException(nameof(idInRepositoryService));
+ _packageName = packageName;
+ _packageVersion = packageVersion;
+ _repositoryId = repositoryId;
+ }
+
+ public async Task Execute(HttpClient client, Uri baseAddress)
+ {
+ var debianUploadJsonContent = JsonConvert.SerializeObject(new Dictionary
+ {
+ ["name"] = _packageName,
+ ["version"] = AppendDebianRevisionNumber(_packageVersion),
+ ["fileId"] = _idInRepositoryService.Id,
+ ["repositoryId"] = _repositoryId
+ });
+ var content = new StringContent(debianUploadJsonContent,
+ Encoding.UTF8,
+ "application/json");
+
+ using (var response = await client.PostAsync(new Uri(baseAddress, "/v1/packages"), content))
+ {
+ if (!response.IsSuccessStatusCode)
+ throw new FailedToAddPackageToPackageRepositoryException(
+ $"request:{debianUploadJsonContent} response:{JsonConvert.SerializeObject(response)}");
+ return response.Headers.GetValues("Location").Single();
+ }
+ }
+
+ private static string AppendDebianRevisionNumber(string packageVersion)
+ {
+ return packageVersion + "-1";
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs
new file mode 100644
index 000000000..df3590940
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs
@@ -0,0 +1,53 @@
+// 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.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ public static class ExponentialRetry
+ {
+ public static IEnumerable Intervals
+ {
+ get
+ {
+ var seconds = 5;
+ while (true)
+ {
+ yield return TimeSpan.FromSeconds(seconds);
+ seconds *= 2;
+ }
+ }
+ }
+
+ public static async Task ExecuteWithRetry(Func> action,
+ Func isSuccess,
+ int maxRetryCount,
+ Func> timer,
+ string taskDescription = "")
+ {
+ var count = 0;
+ foreach (var t in timer())
+ {
+ await t;
+ var result = await action();
+ if (isSuccess(result))
+ return;
+ count++;
+ if (count == maxRetryCount)
+ throw new RetryFailedException(
+ $"Retry failed for {taskDescription} after {count} times with result: {result}");
+ }
+ throw new Exception("Timer should not be exhausted");
+ }
+
+ public static IEnumerable Timer(IEnumerable interval)
+ {
+ return interval.Select(Task.Delay);
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs
new file mode 100644
index 000000000..68c314c08
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs
@@ -0,0 +1,24 @@
+// 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;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ public class FailedToAddPackageToPackageRepositoryException : Exception
+ {
+ public FailedToAddPackageToPackageRepositoryException(string message) : base(message)
+ {
+ }
+
+ public FailedToAddPackageToPackageRepositoryException()
+ {
+ }
+
+ public FailedToAddPackageToPackageRepositoryException(string message, Exception innerException) : base(message,
+ innerException)
+ {
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs
new file mode 100644
index 000000000..e71eca436
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs
@@ -0,0 +1,49 @@
+// 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.Net.Http;
+using System.Threading.Tasks;
+using Newtonsoft.Json;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ internal class FileUploadStrategy : IAzurelinuxRepositoryServiceHttpStrategy
+ {
+ private readonly string _pathToPackageToUpload;
+
+ public FileUploadStrategy(string pathToPackageToUpload)
+ {
+ _pathToPackageToUpload = pathToPackageToUpload
+ ?? throw new ArgumentNullException(nameof(pathToPackageToUpload));
+ }
+
+ public async Task Execute(HttpClient client, Uri baseAddress)
+ {
+ var fileName = Path.GetFileName(_pathToPackageToUpload);
+
+ using (var content =
+ new MultipartFormDataContent())
+ {
+ var url = new Uri(baseAddress, "/v1/files");
+ content.Add(
+ new StreamContent(
+ new MemoryStream(
+ File.ReadAllBytes(_pathToPackageToUpload))),
+ "file",
+ fileName);
+ using (var message = await client.PostAsync(url, content))
+ {
+ if (!message.IsSuccessStatusCode)
+ {
+ throw new FailedToAddPackageToPackageRepositoryException(
+ $"{JsonConvert.SerializeObject(message)} failed to post file to {url} file name:{fileName} pathToPackageToUpload:{_pathToPackageToUpload}");
+ }
+ return await message.Content.ReadAsStringAsync();
+ }
+ }
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs
new file mode 100644
index 000000000..a829f398a
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs
@@ -0,0 +1,15 @@
+// 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.Net.Http;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ internal interface IAzurelinuxRepositoryServiceHttpStrategy
+ {
+ Task Execute(HttpClient client, Uri baseAddress);
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs
new file mode 100644
index 000000000..b51ebb3be
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs
@@ -0,0 +1,18 @@
+// 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;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ internal class IdInRepositoryService
+ {
+ public IdInRepositoryService(string id)
+ {
+ Id = id ?? throw new ArgumentNullException(nameof(id));
+ }
+
+ public string Id { get; }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs
new file mode 100644
index 000000000..aa2e6d9bc
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs
@@ -0,0 +1,38 @@
+// 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;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ internal class LinuxPackageRepositoryDestiny
+ {
+ private readonly string _password;
+ private readonly string _server;
+ private readonly string _username;
+
+ public LinuxPackageRepositoryDestiny(string username,
+ string password,
+ string server,
+ string repositoryId)
+ {
+ _username = username ?? throw new ArgumentNullException(nameof(username));
+ _password = password ?? throw new ArgumentNullException(nameof(password));
+ _server = server ?? throw new ArgumentNullException(nameof(server));
+ RepositoryId = repositoryId ?? throw new ArgumentNullException(nameof(repositoryId));
+ }
+
+ public string RepositoryId { get; }
+
+ public Uri GetBaseAddress()
+ {
+ return new Uri($"https://{_server}");
+ }
+
+ public string GetSimpleAuth()
+ {
+ return $"{_username}:{_password}";
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs
new file mode 100644
index 000000000..7e1f9ade7
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs
@@ -0,0 +1,46 @@
+// 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.Net.Http;
+using System.Net.Http.Headers;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ internal class LinuxPackageRepositoryHttpPrepare
+ {
+ private readonly IAzurelinuxRepositoryServiceHttpStrategy _httpStrategy;
+ private readonly LinuxPackageRepositoryDestiny _linuxPackageRepositoryDestiny;
+
+ public LinuxPackageRepositoryHttpPrepare(
+ LinuxPackageRepositoryDestiny linuxPackageRepositoryDestiny,
+ IAzurelinuxRepositoryServiceHttpStrategy httpStrategy
+ )
+ {
+ _linuxPackageRepositoryDestiny = linuxPackageRepositoryDestiny
+ ?? throw new ArgumentNullException(nameof(linuxPackageRepositoryDestiny));
+ _httpStrategy = httpStrategy ?? throw new ArgumentNullException(nameof(httpStrategy));
+ }
+
+ public async Task RemoteCall()
+ {
+ using (var handler = new HttpClientHandler())
+ {
+ using (var client = new HttpClient(handler))
+ {
+ var authHeader =
+ Convert.ToBase64String(Encoding.UTF8.GetBytes((string) _linuxPackageRepositoryDestiny.GetSimpleAuth()));
+ client.DefaultRequestHeaders.Authorization =
+ new AuthenticationHeaderValue("Basic", authHeader);
+ client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
+ client.Timeout = TimeSpan.FromMinutes(10);
+
+ return await _httpStrategy.Execute(client, _linuxPackageRepositoryDestiny.GetBaseAddress());
+ }
+ }
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs
new file mode 100644
index 000000000..393a160ae
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs
@@ -0,0 +1,34 @@
+// 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.Net.Http;
+using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ internal class PullQueuedPackageStatus : IAzurelinuxRepositoryServiceHttpStrategy
+ {
+ private readonly QueueResourceLocation _queueResourceLocation;
+
+ public PullQueuedPackageStatus(QueueResourceLocation queueResourceLocation)
+ {
+ _queueResourceLocation = queueResourceLocation
+ ?? throw new ArgumentNullException(nameof(queueResourceLocation));
+ }
+
+ public async Task Execute(HttpClient client, Uri baseAddress)
+ {
+ using (var response = await client.GetAsync(new Uri(baseAddress, _queueResourceLocation.Location)))
+ {
+ if (!response.IsSuccessStatusCode)
+ throw new FailedToAddPackageToPackageRepositoryException(
+ "Failed to make request to " + _queueResourceLocation.Location);
+ var body = await response.Content.ReadAsStringAsync();
+ return !body.Contains("status") ? "" : JObject.Parse(body)["status"].ToString();
+ }
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs
new file mode 100644
index 000000000..cbf11e48d
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs
@@ -0,0 +1,18 @@
+// 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;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ internal class QueueResourceLocation
+ {
+ public QueueResourceLocation(string location)
+ {
+ Location = location ?? throw new ArgumentNullException(nameof(location));
+ }
+
+ public string Location { get; }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs
new file mode 100644
index 000000000..b251ec4b8
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs
@@ -0,0 +1,23 @@
+// 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;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ public class RetryFailedException : Exception
+ {
+ public RetryFailedException(string message) : base(message)
+ {
+ }
+
+ public RetryFailedException()
+ {
+ }
+
+ public RetryFailedException(string message, Exception innerException) : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs
new file mode 100644
index 000000000..00099bd14
--- /dev/null
+++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs
@@ -0,0 +1,121 @@
+// 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.Net.Http;
+using System.Threading.Tasks;
+using Microsoft.Build.Framework;
+using Newtonsoft.Json.Linq;
+using Task = Microsoft.Build.Utilities.Task;
+
+namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
+{
+ public class UploadToLinuxPackageRepository : Task
+ {
+ ///
+ /// The Azure repository service user name.
+ ///
+ [Required]
+ public string Username { get; set; }
+
+ ///
+ /// The Azure repository service Password.
+ ///
+ [Required]
+ public string Password { get; set; }
+
+ ///
+ /// The Azure repository service URL ex: "tux-devrepo.corp.microsoft.com".
+ ///
+ [Required]
+ public string Server { get; set; }
+
+ [Required]
+ public string RepositoryId { get; set; }
+
+ [Required]
+ public string PathOfPackageToUpload { get; set; }
+
+ [Required]
+ public string PackageNameInLinuxPackageRepository { get; set; }
+
+
+ [Required]
+ public string PackageVersionInLinuxPackageRepository { get; set; }
+
+
+ public override bool Execute()
+ {
+ ExecuteAsyncWithRetry().GetAwaiter().GetResult();
+ return true;
+ }
+
+ private async System.Threading.Tasks.Task ExecuteAsyncWithRetry()
+ {
+ await ExponentialRetry.ExecuteWithRetry(
+ UploadAndAddpackageAndEnsureItIsReady,
+ s => s == "",
+ maxRetryCount: 3,
+ timer: () => ExponentialRetry.Timer(ExponentialRetry.Intervals),
+ taskDescription: $"running {nameof(UploadAndAddpackageAndEnsureItIsReady)}");
+ }
+
+ private async Task UploadAndAddpackageAndEnsureItIsReady()
+ {
+ try
+ {
+ Log.LogMessage(
+ MessageImportance.High,
+ "Begin uploading Linux Package to feed service, RepositoryId {0}, Server {1}, Package to upload {2}.",
+ RepositoryId,
+ Server,
+ PathOfPackageToUpload);
+
+ var linuxPackageRepositoryDestiny =
+ new LinuxPackageRepositoryDestiny(Username, Password, Server, RepositoryId);
+ var uploadResponse = await new LinuxPackageRepositoryHttpPrepare(
+ linuxPackageRepositoryDestiny,
+ new FileUploadStrategy(PathOfPackageToUpload)).RemoteCall();
+
+ var idInRepositoryService = new IdInRepositoryService(JObject.Parse(uploadResponse)["id"].ToString());
+
+ var addPackageResponse = await new LinuxPackageRepositoryHttpPrepare(
+ linuxPackageRepositoryDestiny,
+ new AddPackageStrategy(
+ idInRepositoryService,
+ PackageNameInLinuxPackageRepository,
+ PackageVersionInLinuxPackageRepository,
+ linuxPackageRepositoryDestiny.RepositoryId)).RemoteCall();
+
+ var queueResourceLocation = new QueueResourceLocation(addPackageResponse);
+
+ Func> pullQueuedPackageStatus = new LinuxPackageRepositoryHttpPrepare(
+ linuxPackageRepositoryDestiny,
+ new PullQueuedPackageStatus(queueResourceLocation)).RemoteCall;
+
+ await ExponentialRetry.ExecuteWithRetry(
+ pullQueuedPackageStatus,
+ s => s == "fileReady",
+ 5,
+ () => ExponentialRetry.Timer(ExponentialRetry.Intervals),
+ $"PullQueuedPackageStatus location: {queueResourceLocation.Location}");
+
+ Log.LogMessage(
+ MessageImportance.High,
+ "Upload to feed service is completed, queue resource location {0}",
+ queueResourceLocation.Location);
+
+ return "";
+ }
+ catch (FailedToAddPackageToPackageRepositoryException e)
+ {
+ return e.ToString();
+ }
+ catch (HttpRequestException e)
+ {
+ return e.ToString();
+ }
+ }
+ }
+}
diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj
index f80b89d1b..373110a44 100644
--- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj
+++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj
@@ -1,5 +1,4 @@
- Build scripts for dotnet-cli1.0.0
@@ -15,6 +14,7 @@
+
@@ -22,14 +22,15 @@
+
-
+
-
+
diff --git a/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj b/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj
index 14a4c4a33..ed7002589 100644
--- a/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj
+++ b/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj
@@ -1,5 +1,4 @@
- Build scripts for dotnet-cli
diff --git a/build_projects/update-dependencies/Config.cs b/build_projects/update-dependencies/Config.cs
index 0bd5a0c6a..9ba4b41ea 100644
--- a/build_projects/update-dependencies/Config.cs
+++ b/build_projects/update-dependencies/Config.cs
@@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Scripts
///
/// The following Environment Variables can optionally be specified:
///
- /// DOTNET_VERSION_URL - The Url to the root of the version information (this is combined with the fragments bellow) (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info")
+ /// DOTNET_VERSION_URL - The Url to the root of the version information (this is combined with the fragments below) (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info")
/// ROSLYN_VERSION_FRAGMENT - The fragment to combine with DOTNET_VERSION_URL to get the current dotnet/roslyn package versions. (ex. "dotnet/roslyn/netcore1.0")
/// CORESETUP_VERSION_FRAGMENT - The fragment to combine with DOTNET_VERSION_URL to get the current dotnet/core-setup package versions. (ex. "dotnet/core-setup/master")
/// GITHUB_ORIGIN_OWNER - The owner of the GitHub fork to push the commit and create the PR from. (ex. "dotnet-bot")
diff --git a/build_projects/update-dependencies/Directory.Build.props b/build_projects/update-dependencies/Directory.Build.props
new file mode 100644
index 000000000..a8d332ca6
--- /dev/null
+++ b/build_projects/update-dependencies/Directory.Build.props
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/build_projects/update-dependencies/update-dependencies.csproj b/build_projects/update-dependencies/update-dependencies.csproj
index 2f82553fe..af401660d 100644
--- a/build_projects/update-dependencies/update-dependencies.csproj
+++ b/build_projects/update-dependencies/update-dependencies.csproj
@@ -4,7 +4,7 @@
Updates the repos dependenciesExe
- netcoreapp2.0
+ netcoreapp2.1
diff --git a/build_projects/update-dependencies/update-dependencies.ps1 b/build_projects/update-dependencies/update-dependencies.ps1
index b76d10bc1..4f23db26b 100644
--- a/build_projects/update-dependencies/update-dependencies.ps1
+++ b/build_projects/update-dependencies/update-dependencies.ps1
@@ -34,6 +34,8 @@ if (!$env:DOTNET_INSTALL_DIR)
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture"
}
+$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+
# Install a stage 0
Write-Output "Installing .NET Core CLI Stage 0"
& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel "master" -Architecture $Architecture
@@ -42,11 +44,6 @@ if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }
# Put the stage0 on the path
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
-# Restore the app
-Write-Output "Restoring $ProjectPath..."
-dotnet restore "$ProjectPath"
-if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
-
# Run the app
Write-Output "Invoking App $ProjectPath..."
dotnet run -p "$ProjectPath" "$ProjectArgs"
diff --git a/build_projects/update-dependencies/update-dependencies.sh b/build_projects/update-dependencies/update-dependencies.sh
index 4781c8453..5e4872bf9 100755
--- a/build_projects/update-dependencies/update-dependencies.sh
+++ b/build_projects/update-dependencies/update-dependencies.sh
@@ -30,6 +30,8 @@ if [ -z "${DOTNET_INSTALL_DIR:-}" ]; then
export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet_stage0/x64
fi
+export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+
# Install a stage 0
echo "Installing .NET Core CLI Stage 0"
$REPO_ROOT/scripts/obtain/dotnet-install.sh -Channel master -Architecture x64
@@ -42,14 +44,6 @@ fi
# Put the stage 0 on the path
export PATH=$DOTNET_INSTALL_DIR:$PATH
-echo "Restoring $PROJECT_PATH..."
-dotnet restore "$PROJECT_PATH"
-
-if [ $? -ne 0 ]; then
- echo "Failed to restore"
- exit 1
-fi
-
echo "Invoking App $PROJECT_PATH..."
dotnet run -p "$PROJECT_PATH" $@
diff --git a/dir.props b/dir.props
index 7133cb74f..875fe07ca 100644
--- a/dir.props
+++ b/dir.props
@@ -1,47 +1,4 @@
-
-
-
- $(MSBuildThisFileDirectory)
-
- $(NUGET_PACKAGES)
- $(RepoRoot)/.nuget/packages
-
- $(RepoRoot)/build_projects/dotnet-cli-build/bin/dotnet-cli-build.dll
- $(RepoRoot)/build_projects/dotnet-cli-build/bin/Microsoft.DotNet.Build.Tasks.Feed.dll
-
- true
- true
-
- netcoreapp2.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/netci.groovy b/netci.groovy
index ca09235d7..fd1e9c520 100644
--- a/netci.groovy
+++ b/netci.groovy
@@ -9,7 +9,7 @@ def project = GithubProject
def branch = GithubBranchName
def isPR = true
-def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug']
+def platformList = ['Linux:x64:Release', 'Debian8.2:x64:Debug', 'Ubuntu:x64:Release', 'Ubuntu16.04:x64:Debug', 'OSX10.12:x64:Release', 'Windows_NT:x64:Release', 'Windows_NT:x86:Debug', 'Windows_NT_ES:x64:Debug', 'RHEL7.2:x64:Release', 'CentOS7.1:x64:Debug', 'RHEL6:x64:Debug']
def static getBuildJobName(def configuration, def os, def architecture) {
return configuration.toLowerCase() + '_' + os.toLowerCase() + '_' + architecture.toLowerCase()
@@ -32,6 +32,13 @@ platformList.each { platform ->
else if (os == 'Windows_2016') {
buildCommand = ".\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -RunInstallerTestsInDocker -Targets Default"
}
+ else if (os == 'Windows_NT_ES') {
+ osUsedForMachineAffinity = 'Windows_NT'
+ buildCommand = """
+set DOTNET_CLI_UI_LANGUAGE=es
+.\\build.cmd -Configuration ${configuration} -Architecture ${architecture} -Targets Default
+"""
+ }
else if (os == 'Ubuntu') {
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --docker ubuntu.14.04 --targets Default"
}
@@ -39,6 +46,10 @@ platformList.each { platform ->
osUsedForMachineAffinity = 'Ubuntu16.04';
buildCommand = "./build.sh --linux-portable --skip-prereqs --configuration ${configuration} --targets Default"
}
+ else if (os == 'RHEL6') {
+ osUsedForMachineAffinity = 'Ubuntu16.04';
+ buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --runtime-id rhel.6-x64 --docker rhel.6 --targets Default"
+ }
else {
// Jenkins non-Ubuntu CI machines don't have docker
buildCommand = "./build.sh --skip-prereqs --configuration ${configuration} --targets Default"
@@ -47,7 +58,7 @@ platformList.each { platform ->
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
// Set the label.
steps {
- if (os == 'Windows_NT' || os == 'Windows_2016') {
+ if (osUsedForMachineAffinity == 'Windows_NT' || osUsedForMachineAffinity == 'Windows_2016') {
// Batch
batchFile(buildCommand)
}
diff --git a/packaging/deb/postinst b/packaging/deb/postinst
index 9eb33f532..4ac4d35e4 100755
--- a/packaging/deb/postinst
+++ b/packaging/deb/postinst
@@ -5,19 +5,18 @@ echo "Please visit http://aka.ms/dotnet-cli-eula for more information."
# Run 'dotnet new' to trigger the first time experience to initialize the cache
echo "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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
-.NET Core Tools Telemetry
+Telemetry
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+
+Configuring...
--------------
-The .NET Core Tools include a telemetry feature that collects usage information. It is important that the .NET Team understands how the tools are being used so that we can improve them.
-
-The data collected is anonymous and will be published in an aggregated form for use by both Microsoft and community engineers under the Creative Commons Attribution License.
-
-The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry.
-
-Installation Note
---------------
-A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete."
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once."
first_run() {
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "debianpackage" > /dev/null 2>&1 || true
diff --git a/packaging/osx/clisdk/resources/cs.lproj/conclusion.html b/packaging/osx/clisdk/resources/cs.lproj/conclusion.html
index a4b936329..ecd206c4b 100644
--- a/packaging/osx/clisdk/resources/cs.lproj/conclusion.html
+++ b/packaging/osx/clisdk/resources/cs.lproj/conclusion.html
@@ -9,7 +9,7 @@
diff --git a/packaging/rpm/scripts/after_install_host.sh b/packaging/rpm/scripts/after_install_host.sh
index 7bc9596c7..21999daaf 100644
--- a/packaging/rpm/scripts/after_install_host.sh
+++ b/packaging/rpm/scripts/after_install_host.sh
@@ -9,19 +9,18 @@ echo "Please visit http://aka.ms/dotnet-cli-eula for more information."
# Run 'dotnet new' as the user to trigger the first time experience to initialize the cache
echo "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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
-.NET Core Tools Telemetry
+Telemetry
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+
+Configuring...
--------------
-The .NET Core Tools include a telemetry feature that collects usage information. It is important that the .NET Team understands how the tools are being used so that we can improve them.
-
-The data collected is anonymous and will be published in an aggregated form for use by both Microsoft and community engineers under the Creative Commons Attribution License.
-
-The .NET Core Tools telemetry feature is enabled by default. You can opt-out of the telemetry feature by setting an environment variable DOTNET_CLI_TELEMETRY_OPTOUT (for example, 'export' on macOS/Linux, 'set' on Windows) to true (for example, 'true', 1). You can read more about .NET Core tools telemetry at https://aka.ms/dotnet-cli-telemetry.
-
-Installation Note
---------------
-A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete."
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once."
first_run() {
/usr/share/dotnet/dotnet exec /usr/share/dotnet/sdk/%SDK_VERSION%/dotnet.dll internal-reportinstallsuccess "rpmpackage" > /dev/null 2>&1 || true
diff --git a/packaging/windows/clisdk/bundle.wxl b/packaging/windows/clisdk/bundle.wxl
index a5b12953c..13996d719 100644
--- a/packaging/windows/clisdk/bundle.wxl
+++ b/packaging/windows/clisdk/bundle.wxl
@@ -52,7 +52,7 @@
The following were installed at [DOTNETHOME]
• .NET Core SDK 2.0.0
• .NET Core Runtime 2.0.0
- • Runtime Package Store
+ • Runtime Store
This product collects usage data
• More information and opt-out https://aka.ms/dotnet-cli-telemetry
diff --git a/packaging/windows/eula.rtf b/packaging/windows/eula.rtf
new file mode 100644
index 000000000..7f40e11a8
--- /dev/null
+++ b/packaging/windows/eula.rtf
@@ -0,0 +1,97 @@
+{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\froman\fprq2\fcharset0 Times New Roman;}{\f3\fswiss\fprq2\fcharset0 Calibri;}}
+{\colortbl ;\red0\green0\blue0;\red0\green0\blue255;}
+{\*\generator Riched20 10.0.10586}{\*\mmathPr\mnaryLim0\mdispDef1\mwrapIndent1440 }\viewkind4\uc1
+\pard\widctlpar\sb120\sa120\cf1\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\fs28\par
+\fs24 MICROSOFT .NET LIBRARY\fs28\par
+\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par
+
+\pard\widctlpar\fi-363\li720\sb120\sa120\b0\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 updates,\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 supplements,\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 Internet-based services, and\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 support services\par
+
+\pard\widctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par
+BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par
+IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par
+
+\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\fs20 1.\b0\f2\fs14\~\~\~\~\b\f0\fs19 INSTALLATION AND USE RIGHTS.\par
+
+\pard\widctlpar\fi-363\li720\sb120\sa120\kerning0\fs20 a.\b0\f2\fs14\~\~\~\~\b\f0\fs19 Installation and Use.\b0\fs20\~You may install and use any number of copies of the software to design, develop and test your programs.\b\fs19\par
+\fs20 b.\b0\f2\fs14\~\~\~\~\b\f0\fs19 Third Party Programs.\b0\fs20\~The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par
+
+\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\fs20 2.\b0\f2\fs14\~\~\~\~\b\f0\fs19 DATA.\~\kerning0\b0\fs20 The software may collect information about you and your use of the software, and send that to Microsoft. Microsoft may use this information to improve our products and services.\~You can learn more about data collection and use in the help documentation and the privacy statement at\~{\cf0\f3\fs24{\field{\*\fldinst{HYPERLINK "http://go.microsoft.com/fwlink/?LinkId=528096&clcid=0x409"}}{\fldrslt{\ul\cf2\cf2\ul\f0\fs20 http://go.microsoft.com/fwlink/?LinkId=528096}}}}\f0\fs20 . Your use of the software operates as your consent to these practices.\kerning36\b\fs19\par
+\fs20 3.\b0\f2\fs14\~\~\~\~\b\f0\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\fs19\par
+
+\pard\widctlpar\fi-363\li720\sb120\sa120\kerning0\fs20 a.\b0\f2\fs14\~\~\~\~\b\f0\fs20 DISTRIBUTABLE CODE.\~\~\b0 The software is comprised of Distributable Code. \ldblquote Distributable Code\rdblquote is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\fs19\par
+
+\pard\widctlpar\fi-357\li1077\sb120\sa120\fs20 i.\b0\f2\fs14\~\~\~\~\~\~\b\f0\fs20 Right to Use and Distribute.\b0\fs19\par
+
+\pard\widctlpar\fi-357\li1434\sb120\sa120\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 You may copy and distribute the object code form of the software.\fs19\par
+\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\fs19\par
+
+\pard\widctlpar\fi-357\li1077\sb120\sa120\b\fs20 ii.\b0\f2\fs14\~\~\~\~\b\f0\fs20 Distribution Requirements.\b0\~\b For any Distributable Code you distribute, you must\b0\fs19\par
+
+\pard\widctlpar\fi-357\li1434\sb120\sa120\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 add significant primary functionality to it in your programs;\fs19\par
+\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 require distributors and external end users to agree to terms that protect it at least as much as this agreement;\fs19\par
+\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 display your valid copyright notice on your programs; and\fs19\par
+\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\fs19\par
+
+\pard\widctlpar\fi-357\li1077\sb120\sa120\b\fs20 iii.\b0\f2\fs14\~\~\~\b\f0\fs20 Distribution Restrictions.\b0\~\b You may not\b0\fs19\par
+
+\pard\widctlpar\fi-357\li1434\sb120\sa120\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 alter any copyright, trademark or patent notice in the Distributable Code;\fs19\par
+\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\fs19\par
+\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 include Distributable Code in malicious, deceptive or unlawful programs; or\fs19\par
+\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\fs19\par
+
+\pard\widctlpar\fi-358\li1792\sb120\sa120\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 the code be disclosed or distributed in source code form; or\fs19\par
+\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 others have the right to modify it.\fs19\par
+
+\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\b\fs20 4.\b0\f2\fs14\~\~\~\~\b\f0\fs19 SCOPE OF LICENSE.\~\b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\b\par
+
+\pard\widctlpar\fi-363\li720\sb120\sa120\kerning0\b0\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 work around any technical limitations in the software;\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 publish the software for others to copy;\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 rent, lease or lend the software;\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 transfer the software or this agreement to any third party; or\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 use the software for commercial software hosting services.\par
+
+\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\b\fs20 5.\b0\f2\fs14\~\~\~\~\b\f0\fs19 BACKUP COPY.\~\b0 You may make one backup copy of the software. You may use it only to reinstall the software.\b\par
+\fs20 6.\b0\f2\fs14\~\~\~\~\b\f0\fs19 DOCUMENTATION.\~\b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\b\par
+\fs20 7.\b0\f2\fs14\~\~\~\~\b\f0\fs19 EXPORT RESTRICTIONS.\~\b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see\~{\cf0\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting\ul0\cf0}}}}\f0\fs19 .\b\par
+\fs20 8.\b0\f2\fs14\~\~\~\~\b\f0\fs19 SUPPORT SERVICES.\~\b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\b\par
+\fs20 9.\b0\f2\fs14\~\~\~\~\b\f0\fs19 ENTIRE AGREEMENT.\~\b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\b\par
+\fs20 10.\b0\f2\fs14\~\~\~\b\f0\fs19 APPLICABLE LAW.\par
+
+\pard\widctlpar\fi-363\li720\sb120\sa120\kerning0\fs20 a.\b0\f2\fs14\~\~\~\~\b\f0\fs19 United States.\~\b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\b\par
+\fs20 b.\b0\f2\fs14\~\~\~\~\b\f0\fs19 Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par
+
+\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\fs20 11.\b0\f2\fs14\~\~\b\f0\fs19 LEGAL EFFECT.\~\b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\b\par
+\fs20 12.\b0\f2\fs14\~\~\b\f0\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par
+
+\pard\widctlpar\li357\sb120\sa120\kerning0 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\b0\par
+
+\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\b\fs20 13.\b0\f2\fs14\~\~\b\f0\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par
+
+\pard\widctlpar\li357\sb120\sa120\kerning0\b0 This limitation applies to\par
+
+\pard\widctlpar\fi-363\li720\sb120\sa120\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par
+\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par
+
+\pard\widctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par
+\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\lang1033\par
+\lang9 Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\lang1033\par
+\kerning36\b EXON\'c9RATION DE GARANTIE.\~\b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\b\par
+LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES.\~\b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\b\par
+\kerning0\b0\lang9 Cette limitation concerne :\lang1033\par
+
+\pard\widctlpar\li720\sb120\f1\lang9\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\lang1033\par
+
+\pard\widctlpar\li720\sa120\f1\lang9\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\lang1033\par
+
+\pard\widctlpar\sb120\sa120\lang9 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\lang1033\par
+\kerning36\b EFFET JURIDIQUE.\~\b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\b\par
+\kerning0\fs20\lang1036\~\fs19\lang1033\par
+
+\pard\widctlpar\cf0\b0\f3\fs24\par
+}
+
\ No newline at end of file
diff --git a/run-build.ps1 b/run-build.ps1
index d3bb1152b..86a767873 100644
--- a/run-build.ps1
+++ b/run-build.ps1
@@ -16,7 +16,7 @@ param(
if($Help)
{
- Write-Output "Usage: .\build.ps1 [-Configuration ] [-Architecture ] [-NoPackage] [-Help]"
+ Write-Output "Usage: .\run-build.ps1 [-Configuration ] [-Architecture ] [-NoPackage] [-Help]"
Write-Output ""
Write-Output "Options:"
Write-Output " -Configuration Build the specified Configuration (Debug or Release, default: Debug)"
@@ -53,18 +53,6 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR))
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
}
-# We also need to pull down a project.json based CLI that is used by some tests
-# so create another directory for that.
-if (!$env:DOTNET_INSTALL_DIR_PJ)
-{
- $env:DOTNET_INSTALL_DIR_PJ="$RepoRoot\.dotnet_stage0PJ\$Architecture"
-}
-
-if (!(Test-Path $env:DOTNET_INSTALL_DIR_PJ))
-{
- mkdir $env:DOTNET_INSTALL_DIR_PJ | Out-Null
-}
-
# Disable first run since we want to control all package sources
@@ -80,16 +68,8 @@ $env:VSTEST_TRACE_BUILD=1
# install a stage0
$dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1"
-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"""
-if ($LastExitCode -ne 0)
-{
- Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
- exit $LastExitCode
-}
-
-Write-Output "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR_PJ -Architecture ""$Architecture"" -Version 1.0.0-preview2-1-003177"
-Invoke-Expression "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR_PJ -Architecture ""$Architecture"" -Version 1.0.0-preview2-1-003177"
+Write-Output "$dotnetInstallPath -Channel ""master"" -version ""2.1.0-preview1-007172"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
+Invoke-Expression "$dotnetInstallPath -Channel ""master"" -version ""2.1.0-preview1-007172"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture"""
if ($LastExitCode -ne 0)
{
Write-Output "The .NET CLI installation failed with exit code $LastExitCode"
diff --git a/run-build.sh b/run-build.sh
index 95154cdf6..f744a1367 100755
--- a/run-build.sh
+++ b/run-build.sh
@@ -51,6 +51,8 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
REPOROOT="$DIR"
ARCHITECTURE="x64"
+STAGE0_SOURCE_DIR=
+
source "$REPOROOT/scripts/common/_prettyprint.sh"
BUILD=1
@@ -61,54 +63,47 @@ CUSTOM_BUILD_ARGS=
# Set nuget package cache under the repo
[ -z $NUGET_PACKAGES ] && export NUGET_PACKAGES="$REPOROOT/.nuget/packages"
-args=( "$@" )
+args=( )
while [[ $# > 0 ]]; do
lowerI="$(echo $1 | awk '{print tolower($0)}')"
case $lowerI in
-c|--configuration)
export CONFIGURATION=$2
- args=( "${args[@]/$1}" )
- args=( "${args[@]/$2}" )
shift
;;
--nopackage)
export DOTNET_BUILD_SKIP_PACKAGING=1
- args=( "${args[@]/$1}" )
;;
--skip-prereqs)
# Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems
export DOTNET_INSTALL_SKIP_PREREQS=1
- args=( "${args[@]/$1}" )
;;
--nobuild)
BUILD=0
;;
--architecture)
ARCHITECTURE=$2
- args=( "${args[@]/$1}" )
- args=( "${args[@]/$2}" )
shift
;;
--runtime-id)
CUSTOM_BUILD_ARGS="/p:Rid=\"$2\""
- args=( "${args[@]/$1}" )
- args=( "${args[@]/$2}" )
shift
;;
# This is here just to eat away this parameter because CI still passes this in.
--targets)
- args=( "${args[@]/$1}" )
- args=( "${args[@]/$2}" )
shift
;;
--linux-portable)
LINUX_PORTABLE_INSTALL_ARGS="--runtime-id linux-x64"
CUSTOM_BUILD_ARGS="/p:Rid=\"linux-x64\" /p:OSName=\"linux\" /p:IslinuxPortable=\"true\""
- args=( "${args[@]/$1}" )
+ ;;
+ --stage0)
+ STAGE0_SOURCE_DIR=$2
+ shift
;;
--help)
- echo "Usage: $0 [--configuration ] [--targets ] [--skip-prereqs] [--nopackage] [--docker ] [--help]"
+ echo "Usage: $0 [--configuration ] [--skip-prereqs] [--nopackage] [--docker ] [--help]"
echo ""
echo "Options:"
echo " --configuration Build the specified Configuration (Debug or Release, default: Debug)"
@@ -117,10 +112,12 @@ while [[ $# > 0 ]]; do
echo " --nobuild Skip building, showing the command that would be used to build"
echo " --docker Build in Docker using the Dockerfile located in scripts/docker/IMAGENAME"
echo " --linux-portable Builds the Linux portable .NET Tools instead of a distro-specific version."
+ echo " --stage0 Set the stage0 source directory. The default is to download it from Azure."
echo " --help Display this help message"
exit 0
;;
*)
+ args=$@
break
;;
esac
@@ -128,22 +125,10 @@ while [[ $# > 0 ]]; do
shift
done
-# $args array may have empty elements in it.
-# The easiest way to remove them is to cast to string and back to array.
-# This will actually break quoted arguments, arguments like
-# -test "hello world" will be broken into three arguments instead of two, as it should.
-temp="${args[@]}"
-args=($temp)
-
# Create an install directory for the stage 0 CLI
[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE
[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR
-# We also need to pull down a project.json based CLI that is used by some tests
-# so create another directory for that.
-[ -z "$DOTNET_INSTALL_DIR_PJ" ] && export DOTNET_INSTALL_DIR_PJ=$REPOROOT/.dotnet_stage0PJ/$ARCHITECTURE
-[ -d "$DOTNET_INSTALL_DIR_PJ" ] || mkdir -p $DOTNET_INSTALL_DIR_PJ
-
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Enable verbose VS Test Console logging
@@ -155,7 +140,12 @@ 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)
+if [ "$STAGE0_SOURCE_DIR" == "" ]; then
+ (set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --version "2.1.0-preview1-007172" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS)
+else
+ echo "Copying bootstrap cli from $BOOTSTRAP_CLI"
+ cp -r $STAGE0_SOURCE_DIR/* "$DOTNET_INSTALL_DIR"
+fi
EXIT_CODE=$?
if [ $EXIT_CODE != 0 ]; then
@@ -163,14 +153,6 @@ if [ $EXIT_CODE != 0 ]; then
exit $EXIT_CODE
fi
-# Install a project.json based CLI for use by tests
-(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --install-dir "$DOTNET_INSTALL_DIR_PJ" --architecture "$ARCHITECTURE" --version "1.0.0-preview2-1-003177")
-EXIT_CODE=$?
-if [ $EXIT_CODE != 0 ]; then
- echo "run-build: Error: installing project-json based cli failed with exit code $EXIT_CODE." >&2
- exit $EXIT_CODE
-fi
-
# Put stage 0 on the PATH (for this shell only)
PATH="$DOTNET_INSTALL_DIR:$PATH"
@@ -189,8 +171,8 @@ echo "${args[@]}"
if [ $BUILD -eq 1 ]; then
dotnet msbuild build.proj /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles
- dotnet msbuild build.proj /m /v:normal /fl /flp:v=diag /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS "${args[@]}"
+ dotnet msbuild build.proj /m /v:normal /fl /flp:v=diag /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS $args
else
echo "Not building due to --nobuild"
- echo "Command that would be run is: 'dotnet msbuild build.proj /m /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS ${args[@]}'"
+ echo "Command that would be run is: 'dotnet msbuild build.proj /m /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS $args'"
fi
diff --git a/scripts/cli-build-env.bat b/scripts/cli-build-env.bat
new file mode 100644
index 000000000..03b6ded6f
--- /dev/null
+++ b/scripts/cli-build-env.bat
@@ -0,0 +1,17 @@
+@echo off
+REM Copyright (c) .NET Foundation and contributors. All rights reserved.
+REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+REM Get normalized version of parent path
+for %%i in (%~dp0..\) DO (
+ SET CLI_REPO_ROOT=%%~dpi
+)
+
+title CLI Build (%CLI_REPO_ROOT%)
+
+REM Add Stage 0 CLI to path
+set PATH=%CLI_REPO_ROOT%.dotnet_stage0\x64;%PATH%
+
+set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+set DOTNET_MULTILEVEL_LOOKUP=0
+set NUGET_PACKAGES=%CLI_REPO_ROOT%.nuget\packages
\ No newline at end of file
diff --git a/scripts/dev-dotnet.sh b/scripts/cli-build-env.sh
old mode 100755
new mode 100644
similarity index 68%
rename from scripts/dev-dotnet.sh
rename to scripts/cli-build-env.sh
index e7d8e6eac..05231edcb
--- a/scripts/dev-dotnet.sh
+++ b/scripts/cli-build-env.sh
@@ -4,22 +4,20 @@
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
-set -e
-
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-source "$DIR/common/_common.sh"
+REPO_ROOT="$( cd -P "$( dirname "$SOURCE" )/../" && pwd )"
-if [ -d "$STAGE2_DIR" ]; then
- PATH=$STAGE2_DIR/bin:$PATH
- dotnet "$@"
-else
- echo "You don't have a dev build!" 1>&2
- exit 1
-fi
+STAGE0_DIR=$REPO_ROOT.dotnet_stage0/x64
+export PATH=$STAGE0_DIR:$PATH
+
+
+export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+export DOTNET_MULTILEVEL_LOOKUP=0
+
+export NUGET_PACKAGES=$REPO_ROOT/.nuget/packages
diff --git a/scripts/cli-test-env.bat b/scripts/cli-test-env.bat
new file mode 100644
index 000000000..91a31c078
--- /dev/null
+++ b/scripts/cli-test-env.bat
@@ -0,0 +1,20 @@
+@echo off
+REM Copyright (c) .NET Foundation and contributors. All rights reserved.
+REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+REM Get normalized version of parent path
+for %%i in (%~dp0..\) DO (
+ SET CLI_REPO_ROOT=%%~dpi
+)
+
+title CLI Test (%CLI_REPO_ROOT%)
+
+REM Add Stage 2 CLI to path
+set PATH=%CLI_REPO_ROOT%bin\2\win10-x64\dotnet;%PATH%
+
+set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+set DOTNET_MULTILEVEL_LOOKUP=0
+set NUGET_PACKAGES=%CLI_REPO_ROOT%.nuget\packages
+set TEST_PACKAGES=%CLI_REPO_ROOT%bin\2\win10-x64\test\packages
+set TEST_ARTIFACTS=%CLI_REPO_ROOT%bin\2\win10-x64\test\artifacts
+set PreviousStageProps=%CLI_REPO_ROOT%bin\2\win10-x64\PreviousStage.props
diff --git a/scripts/cli-test-env.sh b/scripts/cli-test-env.sh
new file mode 100644
index 000000000..2d334b057
--- /dev/null
+++ b/scripts/cli-test-env.sh
@@ -0,0 +1,33 @@
+#!/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.
+#
+
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+ SOURCE="$(readlink "$SOURCE")"
+ [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
+done
+
+REPO_ROOT="$( cd -P "$( dirname "$SOURCE" )/../" && pwd )"
+
+if [ "$uname" = "Darwin" ]
+then
+ RID=osx-x64
+else
+ RID=linux-x64
+fi
+
+STAGE2_DIR=$REPO_ROOT/bin/2/$RID/dotnet
+export PATH=$STAGE2_DIR:$PATH
+
+
+export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+export DOTNET_MULTILEVEL_LOOKUP=0
+
+export NUGET_PACKAGES=$REPO_ROOT/.nuget/packages
+export TEST_PACKAGES=$REPO_ROOT/bin/2/$RID/test/packages
+export TEST_ARTIFACTS=$REPO_ROOT/bin/2/$RID/test/artifacts
+export PreviousStageProps=$REPO_ROOT/bin/2/$RID/PreviousStage.props
\ No newline at end of file
diff --git a/scripts/dev-dotnet.ps1 b/scripts/dev-dotnet.ps1
deleted file mode 100644
index afcfe46d5..000000000
--- a/scripts/dev-dotnet.ps1
+++ /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.
-#
-
-$oldPath = $env:PATH
-try {
- # Put the stage2 output on the front of the path
- if(!(Get-Command dotnet -ErrorAction SilentlyContinue)) {
- throw "You need to have a version of 'dotnet' on your path so we can determine the RID"
- }
-
- $rid = dotnet --version | where { $_ -match "^ Runtime Id:\s*(.*)$" } | foreach { $matches[1] }
- $stage2 = "$PSScriptRoot\..\artifacts\$rid\stage2\bin"
- if (Test-Path $stage2) {
- $env:PATH="$stage2;$env:PATH"
- } else {
- Write-Output "You don't have a dev build in the 'artifacts\$rid\stage2' folder!"
- }
-
- dotnet @args
-} finally {
- $env:PATH = $oldPath
-}
diff --git a/scripts/docker/rhel.6/Dockerfile b/scripts/docker/rhel.6/Dockerfile
new file mode 100644
index 000000000..1275f3293
--- /dev/null
+++ b/scripts/docker/rhel.6/Dockerfile
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+
+# Dockerfile that creates a container suitable to build dotnet-cli
+FROM microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331
+
+# yum doesn't work with the special curl version we have in the base docker image,
+# so we remove /usr/local/lib from the library path for this command
+RUN yum -q -y install sudo
+
+# Setup User to match Host User, and give superuser permissions
+ARG USER_ID=0
+RUN useradd -m code_executor -u ${USER_ID} -g root
+RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
+
+# With the User Change, we need to change permssions on these directories
+RUN chmod -R a+rwx /usr/local
+RUN chmod -R a+rwx /home
+RUN chmod -R 755 /usr/bin/sudo
+
+# Set user to the one we just created
+USER ${USER_ID}
+
+# Set library path to make CURL and ICU libraries that are in /usr/local/lib visible
+ENV LD_LIBRARY_PATH /usr/local/lib
+
+# Set working directory
+WORKDIR /opt/code
+
diff --git a/scripts/docker/rhel/Dockerfile b/scripts/docker/rhel/Dockerfile
index 17ad16cf5..71876a180 100644
--- a/scripts/docker/rhel/Dockerfile
+++ b/scripts/docker/rhel/Dockerfile
@@ -6,7 +6,7 @@
# Dockerfile that creates a container suitable to build dotnet-cli
FROM microsoft/dotnet-buildtools-prereqs:rhel-7-rpmpkg-c982313-20174116044113
-# Install from sudo main package TODO This package needs to be mirrored
+# Install from sudo main package
RUN yum install -y https://www.sudo.ws/sudo/dist/packages/RHEL/7/sudo-1.8.20-3.el7.x86_64.rpm \
&& yum clean all
diff --git a/scripts/dockerrun.sh b/scripts/dockerrun.sh
index abdaec636..7f6493582 100755
--- a/scripts/dockerrun.sh
+++ b/scripts/dockerrun.sh
@@ -115,24 +115,20 @@ echo "Running command: $BUILD_COMMAND"
echo "Using code from: $DOCKER_HOST_SHARE_DIR"
[ -z "$INTERACTIVE" ] || echo "Running Interactive"
+# Note: passwords/keys should not be passed in the environment
docker run $INTERACTIVE -t --rm --sig-proxy=true \
--name $DOTNET_BUILD_CONTAINER_NAME \
-v $DOCKER_HOST_SHARE_DIR:/opt/code \
-e CHANNEL \
- -e CONNECTION_STRING \
-e REPO_ID \
-e REPO_USER \
- -e REPO_PASS \
-e REPO_SERVER \
-e DOTNET_BUILD_SKIP_CROSSGEN \
-e PUBLISH_TO_AZURE_BLOB \
-e NUGET_FEED_URL \
-e NUGET_API_KEY \
- -e GITHUB_PASSWORD \
- -e ARTIFACT_STORAGE_KEY \
-e ARTIFACT_STORAGE_ACCOUNT \
-e ARTIFACT_STORAGE_CONTAINER \
- -e CHECKSUM_STORAGE_KEY \
-e CHECKSUM_STORAGE_ACCOUNT \
-e CHECKSUM_STORAGE_CONTAINER \
-e CLIBUILD_SKIP_TESTS \
@@ -141,10 +137,7 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \
-e RELEASESUFFIX \
-e COREFXAZURECONTAINER \
-e AZUREACCOUNTNAME \
- -e AZUREACCESSTOKEN \
- -e VSOPASSWORD \
-e RELEASETOOLSGITURL \
-e CORESETUPBLOBROOTURL \
- -e CORESETUPBLOBACCESSTOKEN \
$DOTNET_BUILD_CONTAINER_TAG \
$BUILD_COMMAND "$@"
diff --git a/scripts/obtain/dotnet-install.ps1 b/scripts/obtain/dotnet-install.ps1
index 89e6e74d8..b844693d1 100644
--- a/scripts/obtain/dotnet-install.ps1
+++ b/scripts/obtain/dotnet-install.ps1
@@ -194,6 +194,7 @@ function GetHTTPResponse([Uri] $Uri)
$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
diff --git a/scripts/publish/repoapi_client.sh b/scripts/publish/repoapi_client.sh
deleted file mode 100755
index 875210bff..000000000
--- a/scripts/publish/repoapi_client.sh
+++ /dev/null
@@ -1,194 +0,0 @@
-#!/bin/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.
-#
-
-# This is a VERY basic script for Create/Delete operations on repos and packages
-#
-# Environment Dependencies:
-# $REPO_SERVER
-# $REPO_USER
-# $REPO_PASS
-
-cmd=$1
-urls=urls.txt
-defaultPackageFile=new_package.json
-defaultRepoFile=new_repo.json
-repositoryId=$REPO_ID
-server=$REPO_SERVER
-user=$REPO_USER
-pass=$REPO_PASS
-protocol=https
-port=443
-baseurl="$protocol://$user:$pass@$server:$port"
-
-echo $baseurl
-
-function BailIf
-{
- if [ $1 -ne 0 ]; then
- echo "Failure occurred communicating with $server"
- exit 1
- fi
-}
-
-# List packages, using $1 as a regex to filter results
-function ListPackages
-{
- curl -k "$baseurl/v1/packages" | sed 's/{/\n{/g' | egrep "$1" | sed 's/,/,\n/g' | sed 's/^"/\t"/g'
- echo ""
-}
-
-# Create a new Repo using the specified JSON file
-function AddRepo
-{
- repoFile=$1
- if [ -z $repoFile ]; then
- echo "Error: Must specify a JSON-formatted file. Reference $defaultRepoFile.template"
- exit 1
- fi
- if [ ! -f $repoFile ]; then
- echo "Error: Cannot create repo - $repoFile does not exist"
- exit 1
- fi
- packageUrl=$(grep "url" $repoFile | head -n 1 | awk '{print $2}' | tr -d ',')
- echo "Creating new repo on $server [$packageUrl]"
- curl -i -k "$baseurl/v1/repositories" --data @./$repoFile -H "Content-Type: application/json"
- BailIf $?
- echo ""
-}
-
-# Upload a single package using the specified JSON file
-function AddPackage
-{
- packageFile=$1
- if [ -z $packageFile ]; then
- echo "Error: Must specify a JSON-formatted file. Reference $defaultPackageFile.template"
- exit 1
- fi
- if [ ! -f $packageFile ]; then
- echo "Error: Cannot add package - $packageFile does not exist"
- exit 1
- fi
- packageUrl=$(grep "sourceUrl" $packageFile | head -n 1 | awk '{print $2}')
- echo "Adding package to $server [$packageUrl]"
- curl -i -k "$baseurl/v1/packages" --data @$packageFile -H "Content-Type: application/json"
- BailIf $?
- echo ""
-}
-
-# Upload a single package by dynamically creating a JSON file using a provided URL
-function AddPackageByUrl
-{
- # Parse URL
- url=$(echo "$1")
- if [ -z $url ]; then
- return
- fi
- escapedUrl=$(echo "$url" | sed 's/\//\\\//g')
- set -- "$1"
- oldIFS=$IFS
- IFS="/"; declare -a splitUrl=($*)
- index=${#splitUrl[@]}
- let "index -= 1"
- filename=${splitUrl[$index]}
- set -- "$filename"
- IFS="_"; declare -a splitFile=($*)
- IFS=$oldIFS
- pkgName=${splitFile[0]}
- pkgVer=${splitFile[1]}
- if [ -z $pkgName ] || [ -z $pkgVer ]; then
- echo "ERROR parsing $url"
- return
- fi
- # Create Package .json file
- cp $defaultPackageFile.template $defaultPackageFile
- sed -i "s/PACKAGENAME/$pkgName/g" $defaultPackageFile
- sed -i "s/PACKAGEVERSION/$pkgVer/g" $defaultPackageFile
- sed -i "s/PACKAGEURL/$escapedUrl/g" $defaultPackageFile
- sed -i "s/REPOSITORYID/$repositoryId/g" $defaultPackageFile
- # Test that URL is ok
- wget -q --spider "$url"
- if [[ $? -eq 0 ]]; then
- echo "Ready to upload $pkgName [$pkgVer]"
- else
- echo "ERROR testing URL $url"
- return
- fi
- # Perform Upload
- AddPackage $defaultPackageFile
- # Cleanup
- # rm $defaultPackageFile
-}
-
-# Upload multiple packages by reading urls line-by-line from the specified file
-function AddPackages
-{
- urlFile=$1
- if [ -z $urlFile ]; then
- echo "Error: Must specify a flat text file containing one or more URLs"
- exit 1
- fi
- if [ ! -f $urlFile ]; then
- echo "Error: Cannot add packages. File $urlFile does not exist"
- exit 1
- fi
- for url in $(cat $urlFile); do
- AddPackageByUrl "$url"
- sleep 5
- done
-}
-
-# Delete the specified repo
-function DeleteRepo
-{
- repoId=$1
- if [ -z $repoId ]; then
- echo "Error: Please specify repository ID. Run -listrepos for a list of IDs"
- exit 1
- fi
- curl -I -k -X DELETE "$baseurl/v1/repositories/$repoId"
- BailIf $?
-}
-
-# Delete the specified package
-function DeletePackage
-{
- packageId=$1
- if [ -z $packageId ]; then
- echo "Error: Please specify package ID. Run -listpkgs for a list of IDs"
- exit 1
- fi
- echo Removing pkgId $packageId from repo $repositoryId
- curl -I -k -X DELETE "$baseurl/v1/packages/$packageId"
- BailIf $?
-}
-
-if [[ "$1" == "-listrepos" ]]; then
- echo "Fetching repo list from $server..."
- curl -k "$baseurl/v1/repositories" | sed 's/,/,\n/g' | sed 's/^"/\t"/g'
- echo ""
-elif [[ "$1" == "-listpkgs" ]]; then
- echo "Fetching package list from $server"
- ListPackages $2
-elif [[ "$1" == "-addrepo" ]]; then
- AddRepo $2
-elif [[ "$1" == "-addpkg" ]]; then
- AddPackage $2
-elif [[ "$1" == "-addpkgs" ]]; then
- AddPackages $2
-elif [[ "$1" == "-delrepo" ]]; then
- DeleteRepo $2
-elif [[ "$1" == "-delpkg" ]]; then
- DeletePackage $2
-else
- echo "USAGE: ./repotool.sh -OPTION"
- echo "-listrepos: Gather a list of repos"
- echo "-listpkgs: Gather a list of packages"
- echo "-addrepo [FILENAME] : Create a new repo using the specified JSON file"
- echo "-addpkg [FILENAME] : Add package to repo using the specified JSON file"
- echo "-addpkgs [FILENAME] : Add packages to repo using urls contained in FILENAME"
- echo "-delrepo REPOID : Delete the specified repo by ID"
- echo "-delpkg PKGID : Delete the specified package by ID"
-fi
diff --git a/scripts/unuse-dev.ps1 b/scripts/unuse-dev.ps1
deleted file mode 100644
index fbf5f4c18..000000000
--- a/scripts/unuse-dev.ps1
+++ /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.
-#
-
-# Remove the stage2 output from the path
-$splat = $env:PATH.Split(";")
-$stripped = @($splat | where { $_ -notlike "*artifacts\win7-x64\stage2*" })
-$env:PATH = [string]::Join(";", $stripped)
diff --git a/scripts/use-dev.ps1 b/scripts/use-dev.ps1
deleted file mode 100644
index 1d7225bd6..000000000
--- a/scripts/use-dev.ps1
+++ /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.
-#
-
-# Put the stage2 output on the front of the path
-$stage2 = "$PSScriptRoot\..\artifacts\win10-x64\stage2"
-if (Test-Path $stage2) {
- $splat = $env:PATH.Split(";")
- $stage2 = Convert-Path $stage2
- if ($splat -notcontains $stage2) {
- $env:PATH="$stage2;$env:PATH"
- }
-} else {
- Write-Output "You don't have a dev build in the 'artifacts\win10-x64\stage2' folder!"
-}
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 04b8f25be..000000000
--- a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj
+++ /dev/null
@@ -1,22 +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 @@
-
-
-
-
-
- Expanding
- Rozbalení
-
-
-
- Decompressing
- 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 @@
-
-
-
-
-
- Expanding
- Aufklappen
-
-
-
- Decompressing
- 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 @@
-
-
-
-
-
- Expanding
- Expandiendo
-
-
-
- Decompressing
- 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 @@
-
-
-
-
-
- Expanding
- Développement
-
-
-
- Decompressing
- 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 @@
-
-
-
-
-
- Expanding
- Espansione
-
-
-
- Decompressing
- 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 @@
-
-
-
-
-
- Expanding
- 展開中
-
-
-
- Decompressing
- 圧縮解除中
-
-
-
-
-
\ 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 @@
-
-
-
-
-
- Expanding
- 확장하는 중
-
-
-
- Decompressing
- 압축을 푸는 중
-
-
-
-
-
\ 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 @@
-
-
-
-
-
- Expanding
- Rozwijanie
-
-
-
- Decompressing
- 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 @@
-
-
-
-
-
- Expanding
- Expandindo
-
-
-
- Decompressing
- 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 @@
-
-
-
-
-
- Expanding
- Идет расширение
-
-
-
- Decompressing
- Идет извлечение
-
-
-
-
-
\ 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 @@
-
-
-
-
-
- Expanding
- Genişletme
-
-
-
- Decompressing
- 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 @@
-
-
-
-
-
- Expanding
- 正在扩展
-
-
-
- Decompressing
- 正在解压缩
-
-
-
-
-
\ 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 @@
-
-
-
-
-
- Expanding
- 正在展開
-
-
-
- Decompressing
- 正在解壓縮
-
-
-
-
-
\ 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
index 2b23027fd..8f76e2e04 100644
--- 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
@@ -1,5 +1,4 @@
- SLN file reader/writer
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactoryWithCliRuntime.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactoryWithCliRuntime.cs
index c22af40ba..5c3b64763 100644
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactoryWithCliRuntime.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/PackagedCommandSpecFactoryWithCliRuntime.cs
@@ -13,11 +13,11 @@ namespace Microsoft.DotNet.Cli.Utils
{
public class PackagedCommandSpecFactoryWithCliRuntime : PackagedCommandSpecFactory
{
- public PackagedCommandSpecFactoryWithCliRuntime() : base(AddAditionalParameters)
+ public PackagedCommandSpecFactoryWithCliRuntime() : base(AddAdditionalParameters)
{
}
- private static void AddAditionalParameters(string commandPath, IList arguments)
+ private static void AddAdditionalParameters(string commandPath, IList arguments)
{
if(PrefersCliRuntime(commandPath))
{
diff --git a/src/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs b/src/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs
index 6c23d4c9e..65db78e82 100644
--- a/src/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/EnvironmentProvider.cs
@@ -11,6 +11,8 @@ namespace Microsoft.DotNet.Cli.Utils
{
public class EnvironmentProvider : IEnvironmentProvider
{
+ private static char[] s_pathSeparator = new char[] { Path.PathSeparator };
+ private static char[] s_quote = new char[] { '"' };
private IEnumerable _searchPaths;
private IEnumerable _executableExtensions;
@@ -42,8 +44,8 @@ namespace Microsoft.DotNet.Cli.Utils
searchPaths.AddRange(Environment
.GetEnvironmentVariable("PATH")
- .Split(Path.PathSeparator)
- .Select(p => p.Trim('"')));
+ .Split(s_pathSeparator)
+ .Select(p => p.Trim(s_quote)));
_searchPaths = searchPaths;
}
diff --git a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
index ed1056755..600794faf 100644
--- a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
+++ b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj
@@ -1,5 +1,4 @@
- $(SdkVersion)
@@ -24,7 +23,7 @@
-
+
diff --git a/src/Microsoft.DotNet.Cli.Utils/PathUtility.cs b/src/Microsoft.DotNet.Cli.Utils/PathUtility.cs
index cbbc0d401..e0ad71840 100644
--- a/src/Microsoft.DotNet.Cli.Utils/PathUtility.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/PathUtility.cs
@@ -151,7 +151,7 @@ namespace Microsoft.DotNet.Tools.Common
{
compare = StringComparison.OrdinalIgnoreCase;
// check if paths are on the same volume
- if (!string.Equals(Path.GetPathRoot(path1), Path.GetPathRoot(path2)))
+ if (!string.Equals(Path.GetPathRoot(path1), Path.GetPathRoot(path2), compare))
{
// on different volumes, "relative" path is just path2
return path2;
@@ -273,7 +273,22 @@ namespace Microsoft.DotNet.Tools.Common
foreach (var component in components)
{
- if (!string.IsNullOrEmpty(component))
+ if (string.IsNullOrEmpty(component))
+ {
+ continue;
+ }
+
+ if (string.IsNullOrEmpty(result))
+ {
+ result = component;
+
+ // On Windows, manually append a separator for drive references because Path.Combine won't do so
+ if (result.EndsWith(":") && RuntimeEnvironment.OperatingSystemPlatform == Platform.Windows)
+ {
+ result += Path.DirectorySeparatorChar;
+ }
+ }
+ else
{
result = Path.Combine(result, component);
}
diff --git a/src/Microsoft.DotNet.Configurer/LocalizableStrings.resx b/src/Microsoft.DotNet.Configurer/LocalizableStrings.resx
index 7b56bd336..173004d0d 100644
--- a/src/Microsoft.DotNet.Configurer/LocalizableStrings.resx
+++ b/src/Microsoft.DotNet.Configurer/LocalizableStrings.resx
@@ -120,18 +120,19 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI 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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Failed to prime the NuGet cache. {0} failed with: {1}
@@ -140,7 +141,7 @@ A command is running to initially populate your local package cache, to improve
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
diff --git a/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj b/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj
index 25a33c6f8..bf89d36a3 100644
--- a/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj
+++ b/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj
@@ -1,5 +1,4 @@
- $(CliVersionPrefix)
@@ -19,12 +18,12 @@
+
-
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf
index 69c2a2361..d8fb164af 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.cs.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- Vítá vás .NET Core!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ Vítá vás .NET Core!
+-------------------
Další informace o .NET Core najdete na https://aka.ms/dotnet-docs. Dostupné příkazy si zobrazíte pomocí dotnet --help, případně přejděte na https://aka.ms/dotnet-cli-docs.
Telemetrie
---------------
+----------
Nástroje .NET Core shromažďují data o využití s cílem vylepšit vaše prostředí. Data jsou anonymní a nezahrnují argumenty příkazového řádku. Data shromažďuje Microsoft, který je sdílí s komunitou.
S telemetrií můžete vyjádřit výslovný nesouhlas, a to nastavením proměnné prostředí DOTNET_CLI_TELEMETRY_OPTOUT na 1 prostřednictvím svého oblíbeného rozhraní.
Další informace o telemetrii nástrojů .NET Core si můžete přečíst na webu https://aka.ms/dotnet-cli-telemetry.
@@ -30,10 +31,10 @@ Další informace o telemetrii nástrojů .NET Core si můžete přečíst na we
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Probíhá konfigurace...
--------------------
+----------------------
Běží příkaz pro počáteční naplnění vaší místní mezipaměti balíčků, aby se vylepšila rychlost obnovování a umožnil se offline přístup. Provádění tohoto příkazu může trvat až minutu a proběhne jen jednou.
@@ -41,7 +42,7 @@ Běží příkaz pro počáteční naplnění vaší místní mezipaměti balí
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
Oprávnění ke změně složky {0} bylo zamítnuto.
Tuto chybu můžete opravit pomocí některé z těchto možností:
----------------------
+-----------------------------------------------------------
1. Znovu spusťte tento příkaz pomocí přístupu se zvýšenou úrovní oprávnění.
2. Zakažte software spouštěný při prvním zapnutí počítače tak, že nastavíte proměnnou prostředí DOTNET_SKIP_FIRST_TIME_EXPERIENCE na hodnotu Pravda.
3. Zkopírujte sadu .NET Core SDK do nechráněného umístění a použijte ji z tohoto umístění.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf
index e101ef579..3080527b8 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.de.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- Willkommen bei .NET Core!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ Willkommen bei .NET Core!
+-------------------------
Weitere Informationen zu .NET Core finden Sie unter https://aka.ms/dotnet-docs. Verwenden Sie "dotnet --help", um die verfügbaren Befehle anzuzeigen, oder wechseln Sie zu https://aka.ms/dotnet-cli-docs.
Telemetrie
---------------
+----------
Über die .NET Core-Tools werden Nutzungsdaten erfasst, damit wir die Benutzeroberfläche weiter für Sie verbessern können. Die Daten sind anonym und enthalten keine Befehlszeilenargumente. Die Daten werden von Microsoft gesammelt und mit der Community geteilt.
Sie können die Erfassung von Telemetriedaten deaktivieren, indem Sie die Umgebungsvariable DOTNET_CLI_TELEMETRY_OPTOUT mithilfe Ihrer bevorzugten Shell auf 1 festlegen.
Weitere Informationen zur Telemetrie der .NET Core-Tools finden Sie unter https://aka.ms/dotnet-cli-telemetry.
@@ -30,10 +31,10 @@ Weitere Informationen zur Telemetrie der .NET Core-Tools finden Sie unter https:
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Konfiguration wird durchgeführt...
--------------------
+----------------------------------
Ein Befehl wird ausgeführt, um Ihren lokalen Paketcache erstmals aufzufüllen, die Wiederherstellungsgeschwindigkeit zu verbessern und Onlinezugriff zu ermöglichen. Die Ausführung dieses Befehls nimmt bis zu einer Minute in Anspruch und wird einmalig ausgeführt.
@@ -41,7 +42,7 @@ Ein Befehl wird ausgeführt, um Ihren lokalen Paketcache erstmals aufzufüllen,
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
Die Berechtigung zum Ändern des Ordners "{0}" wurde verweigert.
Im Folgenden finden Sie einige Optionen, um diesen Fehler zu beheben:
----------------------
+---------------------------------------------------------------------
1. Führen Sie diesen Befehl mit erhöhten Zugriffsrechten noch mal aus.
2. Deaktivieren Sie die erste Ausführung, indem Sie die Umgebungsvariable DOTNET_SKIP_FIRST_TIME_EXPERIENCE auf "true" festlegen.
3. Kopieren Sie das .NET Core SDK an einen nicht geschützten Speicherort, und kopieren Sie es von dort.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf
index 49e0cd07d..329577b0e 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.es.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- Bienvenido a .NET Core
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ Bienvenido a .NET Core
+----------------------
Aprenda sobre .NET Core en https://aka.ms/dotnet-docs. Use dotnet --help para ver los comandos disponibles o vaya a https://aka.ms/dotnet-cli-docs.
Telemetría
---------------
+----------
Las herramientas de .NET Core recopilan datos de uso con el fin de mejorar su experiencia. Los datos son anónimos y no incluyen argumentos de la línea de comandos. Microsoft recopila los datos y los comparte con la comunidad.
Si desea optar por no participar en la telemetría, establezca una variable de entorno DOTNET_CLI_TELEMETRY_OPTOUT en 1 con el shell de su preferencia.
Puede leer más información sobre la telemetría de las herramientas de .NET Core en https://aka.ms/dotnet-cli-telemetry.
@@ -30,10 +31,10 @@ Puede leer más información sobre la telemetría de las herramientas de .NET Co
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Configurando...
--------------------
+---------------
Se está ejecutando un comando para rellenar inicialmente la caché de paquetes local, para mejorar la velocidad de restauración y habilitar el acceso sin conexión. Este comando tardará en completarse un minuto y solo sucederá una vez.
@@ -41,7 +42,7 @@ Se está ejecutando un comando para rellenar inicialmente la caché de paquetes
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
Permiso denegado para modificar la carpeta "{0}".
Estas son algunas opciones para corregir este error:
----------------------
+----------------------------------------------------
1. Vuelva a ejecutar este comando con acceso con privilegios elevados.
2. Deshabilite la primera experiencia de ejecución; para ello, establezca la variable de entorno DOTNET_SKIP_FIRST_TIME_EXPERIENCE en true.
3. Copie el SDK de .NET Core en una ubicación no protegida y úselo desde ahí.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf
index fb9d015ce..782859b1d 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.fr.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- Bienvenue dans .NET Core !
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ Bienvenue dans .NET Core !
+--------------------------
En savoir plus sur .NET Core @ https://aka.ms/dotnet-docs. Utilisez dotnet --help pour voir les commandes disponibles, ou accédez à https://aka.ms/dotnet-cli-docs.
Télémétrie
---------------
+----------
Les outils .NET Core collectent des données d'utilisation pour améliorer votre expérience utilisateur. Ces données sont anonymes et n'incluent aucun argument de ligne de commande. Les données sont collectées par Microsoft et partagées par la communauté.
Vous pouvez refuser l'adhésion à la télémétrie en affectant la valeur 1 à la variable d'environnement DOTNET_CLI_TELEMETRY_OPTOUT via l'interpréteur de commandes de votre choix.
Pour plus d'informations sur la télémétrie des outils .NET Core, consultez https://aka.ms/dotnet-cli-telemetry.
@@ -30,10 +31,10 @@ Pour plus d'informations sur la télémétrie des outils .NET Core, consultez ht
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Configuration en cours...
--------------------
+-------------------------
Une commande s'exécute pour remplir votre cache de package local, améliorer la vitesse de restauration et activer l'accès hors connexion. L'exécution de cette commande peut prendre jusqu'à une minute et n'a lieu qu'une seule fois.
@@ -41,7 +42,7 @@ Une commande s'exécute pour remplir votre cache de package local, améliorer la
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
Autorisation refusée pour la modification du dossier '{0}'.
Voici quelques options pour corriger cette erreur :
----------------------
+---------------------------------------------------
1. Réexécutez cette commande avec un accès élevé.
2. Désactivez l'introduction de l'interface logicielle lors de la première utilisation en affectant la valeur true à la variable d'environnement DOTNET_SKIP_FIRST_TIME_EXPERIENCE.
3. Copiez le kit .NET Core SDK à un emplacement non protégé à partir duquel vous l'utiliserez ensuite.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf
index c24c80849..d9a154397 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.it.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- Benvenuti a .NET Core
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ Benvenuti a .NET Core
---------------------
Per altre informazioni su .NET Core, vedere https://aka.ms/dotnet-docs. Per visualizzare i comandi disponibili, usare dotnet --help oppure vedere https://aka.ms/dotnet-cli-docs.
Telemetria
---------------
+----------
Gli strumenti di .NET Core consentono di raccogliere i dati di utilizzo allo scopo di migliorare l'esperienza. I dati sono anonimi e non includono gli argomenti della riga di comando. Vengono raccolti da Microsoft e condivisi con la community.
È possibile escludere la telemetria impostando la variabile di ambiente DOTNET_CLI_TELEMETRY_OPTOUT su 1 nella shell preferita.
Per altre informazioni sulla telemetria degli strumenti di .NET Core, vedere https://aka.ms/dotnet-cli-telemetry.
@@ -30,10 +31,10 @@ Per altre informazioni sulla telemetria degli strumenti di .NET Core, vedere htt
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Configurazione...
--------------------
+-----------------
È in esecuzione un comando per popolare inizialmente la cache dei pacchetti locale, migliorare la velocità di ripristino e abilitare l'accesso offline. Il completamento di questo comando, che viene eseguito una sola volta, richiede circa un minuto.
@@ -41,7 +42,7 @@ A command is running to initially populate your local package cache, to improve
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
L'autorizzazione per modificare la cartella '{0}' è stata negata.
Ecco alcune opzioni per correggere questo errore:
----------------------
+-------------------------------------------------
1. Eseguire di nuovo questo comando con privilegi di accesso elevati.
2. Disabilitare il completamento dell'installazione impostando su true la variabile di ambiente DOTNET_SKIP_FIRST_TIME_EXPERIENCE.
3. Copiare .NET Core SDK in un percorso non protetto e usarlo da tale posizione.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf
index b201c5144..0e18db4ba 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ja.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- .NET Core へようこそ!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ .NET Core へようこそ!
+--------------------
.NET Core について詳しくは、https://aka.ms/dotnet-docs をご覧ください。dotnet --help を使って使用可能なコマンドを確認するか、https://aka.ms/dotnet-cli-docs をご覧ください。
テレメトリ
---------------
+---------
.NET Core ツールは、操作性を向上させるために利用状況データを収集します。データは匿名で、コマンドライン引数が含まれません。データは Microsoft によって収集され、コミュニティと共有されます。
テレメトリを無効にするには、お好きなシェルを使用して、DOTNET_CLI_TELEMETRY_OPTOUT 環境変数を 1 に設定します。
.NET Core ツールのテレメトリについて詳しくは、https://aka.ms/dotnet-cli-telemetry をお読みください。
@@ -30,10 +31,10 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
構成中...
--------------------
+---------
ローカル パッケージ キャッシュを最初に設定し、復元速度を向上させ、オフライン アクセスを可能にするため、コマンドを実行しています。このコマンドは 1 回だけ実行され、完了までに最大 1 分かかる場合があります。
@@ -41,7 +42,7 @@ A command is running to initially populate your local package cache, to improve
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
'{0}' フォルダーを変更するためのアクセス許可が拒否されました。
このエラーを修正するためのいくつかのオプションを次に示します。
----------------------
+--------------------------------------------------------
1. 昇格したアクセス権でこのコマンドを再実行します。
2. 環境変数 DOTNET_SKIP_FIRST_TIME_EXPERIENCE を true に設定して、最初の実行エクスペリエンスを無効にします。
3. 保護されていない場所に .NET Core SDK をコピーし、そこから使用します。
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf
index 6f912a283..ff74df291 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ko.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- .NET Core를 시작합니다!
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ NET Core를 시작합니다!
---------------------
.NET Core에 대한 자세한 내용은 https://aka.ms/dotnet-docs를 참조하세요. 사용 가능한 명령을 보려면 dotnet --help를 사용하거나 https://aka.ms/dotnet-cli-docs를 방문하세요.
원격 분석
---------------
+---------
.NET Core 도구는 사용자 환경 개선을 위해 사용량 데이터를 수집합니다. 데이터는 익명이며 명령줄 인수를 포함하지 않습니다. Microsoft에서 데이터를 수집하여 커뮤니티와 공유합니다.
자주 사용하는 셸에서 DOTNET_CLI_TELEMETRY_OPTOUT 환경 변수를 1로 설정하여 원격 분석을 옵트아웃할 수 있습니다.
.NET Core 도구 원격 분석에 대한 자세한 내용은 https://aka.ms/dotnet-cli-telemetry에서 확인할 수 있습니다.
@@ -30,10 +31,10 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
구성 중...
--------------------
+----------
초기에 로컬 패키지 캐시를 채우고, 복원 속도를 개선하고, 오프라인 액세스를 사용하도록 설정하기 위한 명령을 실행하고 있습니다. 완료하는 데 최대 1분이 소요되며 한 번만 실행됩니다.
@@ -41,7 +42,7 @@ A command is running to initially populate your local package cache, to improve
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
'{0}' 폴더를 수정하는 데 필요한 사용 권한이 거부되었습니다.
이 오류를 해결하기 위한 옵션을 다음과 같습니다.
----------------------
+--------------------------------------------
1. 높은 액세스 권한으로 이 명령을 다시 실행합니다.
2. 환경 변수 DOTNET_SKIP_FIRST_TIME_EXPERIENCE를 true로 설정하여 첫 실행 경험을 사용하지 않습니다.
3. .NET Core SDK를 보호되지 않은 위치로 복사한 후 이 위치에서 사용합니다.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf
index e2d132a85..5d84cc685 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pl.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- .NET Core — Zapraszamy!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ .NET Core — Zapraszamy!
+-----------------------
Więcej informacji o programie .NET Core znajdziesz na stronie https://aka.ms/dotnet-docs. Aby wyświetlić dostępne polecenia, użyj polecenia dotnet --help lub przejdź na stronę https://aka.ms/dotnet-cli-docs.
Telemetria
---------------
+----------
Narzędzia programu .NET Core zbierają dane dotyczące użycia w celu ulepszenia Twojego środowiska pracy. Dane te są anonimowe i nie obejmują argumentów wiersza polecenia. Zbiera je firma Microsoft i udostępnia społeczności.
Z telemetrii można zrezygnować, ustawiając zmienną środowiskową DOTNET_CLI_TELEMETRY_OPTOUT na wartość 1 przy użyciu ulubionej powłoki.
Więcej informacji na temat telemetrii narzędzi programu .NET Core możesz znaleźć na stronie https://aka.ms/dotnet-cli-telemetry.
@@ -30,10 +31,10 @@ Więcej informacji na temat telemetrii narzędzi programu .NET Core możesz znal
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Trwa konfigurowanie…
--------------------
+---------------------
Wykonywane jest polecenie w celu wstępnego wypełnienia lokalnej pamięci podręcznej pakietów, poprawy szybkości przywracania i włączenia dostępu offline. Wykonanie tego polecenia jest jednorazowe i zajmie maksymalnie minutę.
@@ -41,7 +42,7 @@ Wykonywane jest polecenie w celu wstępnego wypełnienia lokalnej pamięci podr
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
Odmowa uprawnień do zmodyfikowania folderu „{0}”.
Oto kilka opcji naprawiania tego błędu:
----------------------
+---------------------------------------
1. Uruchom to polecenie ponownie z podwyższonym poziomem uprawnień.
2. Wyłącz środowisko pierwszego uruchomienia, ustawiając dla zmiennej środowiskowej DOTNET_SKIP_FIRST_TIME_EXPERIENCE wartość true.
3. Skopiuj zestaw .NET Core SDK do lokalizacji niechronionej i tam z niego korzystaj.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf
index 0a789402b..30672c3e3 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.pt-BR.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- Bem-vindo ao .NET Core!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ Bem-vindo ao .NET Core!
+-----------------------
Saiba mais sobre o .NET Core em https://aka.ms/dotnet-docs. Use dotnet --help para ver os comandos disponíveis ou acesse https://aka.ms/dotnet-cli-docs.
Telemetria
---------------
+----------
As ferramentas do .NET Core coletam dados de uso para melhorar sua experiência. Os dados são anônimos e não incluem argumentos de linha de comando. Os dados são coletados pela Microsoft e compartilhados com a comunidade.
É possível recusar a telemetria ao configurar uma variável de ambiente DOTNET_CLI_TELEMETRY_OPTOUT como 1 usando seu shell favorito.
Leia mais sobre a telemetria das ferramentas do .NET Core em https://aka.ms/dotnet-cli-telemetry.
@@ -30,10 +31,10 @@ Leia mais sobre a telemetria das ferramentas do .NET Core em https://aka.ms/dotn
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Configurando...
--------------------
+---------------
Um comando está sendo executado para popular inicialmente o cache do pacote local, a fim de melhorar a velocidade de restauração e habilitar o acesso offline. Esse comando levará até um minuto para ser concluído e só ocorrerá uma vez.
@@ -41,7 +42,7 @@ Um comando está sendo executado para popular inicialmente o cache do pacote loc
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
Permissão negada para modificar a pasta '{0}'.
Aqui estão algumas opções para consertar este erro:
----------------------
+---------------------------------------------------
1. Execute este comando novamente com acesso elevado.
2. Desabilite a primeira experiência de execução ao configurar a variável de ambiente DOTNET_SKIP_FIRST_TIME_EXPERIENCE como verdadeira.
3. Copie o SDK do .NET Core para uma localização não protegida e use-o de lá.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf
index 46ceb61ef..4878d0cad 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.ru.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- Добро пожаловать в .NET Core!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ Добро пожаловать в .NET Core!
+-----------------------------
Дополнительные сведения о .NET Core можно получить по адресу https://aka.ms/dotnet-docs. Для просмотра доступных команд используйте dotnet --help или перейдите на страницу https://aka.ms/dotnet-cli-docs.
Телеметрия
---------------
+----------
Средства .NET Core собирают данные об использовании для улучшения взаимодействия с пользователем. Эти данные анонимны и не включают в себя аргументы командной строки. Сбор данных осуществляется корпорацией Майкрософт, которая предоставляет их сообществу.
Вы можете явно отказаться от телеметрии, присвоив переменной среды DOTNET_CLI_TELEMETRY_OPTOUT значение 1 с помощью предпочитаемой оболочки.
Дополнительные сведения о телеметрии в средствах .NET Core см. по адресу https://aka.ms/dotnet-cli-telemetry.
@@ -30,10 +31,10 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Идет настройка...
--------------------
+-----------------
Выполняется команда для изначального заполнения локального кэша пакетов, повышения скорости восстановления и обеспечения автономного доступа. Ее выполнение может занять до одной минуты и производится только раз.
@@ -41,7 +42,7 @@ A command is running to initially populate your local package cache, to improve
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
Отменено разрешение на изменение папки "{0}".
Ниже приведено несколько способов устранения этой ошибки.
----------------------
+---------------------------------------------------------
1. Повторно выполните эту команду с правами повышенного доступа.
2. Отключите возможность первого запуска, задав для переменной среды DOTNET_SKIP_FIRST_TIME_EXPERIENCE значение "true".
3. Скопируйте пакет SDK для .NET Core в незащищенное расположение и используйте его оттуда.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf
index b5762bc81..8889bad77 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.tr.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- .NET Core’a Hoş Geldiniz!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ .NET Core’a Hoş Geldiniz!
+-------------------------
.NET Core hakkında daha fazla bilgi için bkz. https://aka.ms/dotnet-docs. Kullanılabilir komutları görmek için dotnet --help komutunu kullanın veya https://aka.ms/dotnet-cli-docs adresine gidin.
Telemetri
---------------
+---------
.NET Core araçları, deneyiminizi iyileştirmek için kullanım verileri toplar. Veriler anonimdir ve komut satırı bağımsız değişkenlerini içermez. Veriler Microsoft tarafından toplanır ve topluluk ile paylaşılır.
Sık kullandığınız kabuk aracılığıyla DOTNET_CLI_TELEMETRY_OPTOUT ortam değişkenini 1 değerine ayarlayarak telemetri toplanmasını geri çevirebilirsiniz.
.NET Core araçları telemetrisi hakkında daha faza bilgi için bkz. https://aka.ms/dotnet-cli-telemetry.
@@ -30,8 +31,8 @@ Sık kullandığınız kabuk aracılığıyla DOTNET_CLI_TELEMETRY_OPTOUT ortam
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Yapılandırılıyor...
-------------------
Yerel paket önbelleğinizi başlangıçta doldurmak, geri yükleme hızını artırmak ve çevrimdışı erişimi etkinleştirmek için bir komut çalıştırılıyor. Bu komutun tamamlanması yaklaşık bir dakika sürer ve bu işlem yalnızca bir kez gerçekleştirilir.
@@ -41,7 +42,7 @@ Yerel paket önbelleğinizi başlangıçta doldurmak, geri yükleme hızını ar
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
'{0}' klasörünü değiştirme izni verilmedi.
Bu hatayı düzeltmek için bazı seçenekler:
----------------------
+-----------------------------------------
1. Bu komutu yükseltilmiş erişim ile yeniden çalıştırın.
2. DOTNET_SKIP_FIRST_TIME_EXPERIENCE ortam değişkenini true olarak ayarlayarak ilk çalıştırma deneyimini devre dışı bırakın.
3. .NET Core SDK’sını korumasız bir konuma kopyalayarak oradan kullanın.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.xlf
index 64e3c6463..9d5a25e5b 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.xlf
@@ -6,17 +6,18 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI 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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf
index 7c5bfae32..2f91a7d24 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hans.xlf
@@ -5,19 +5,20 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- 欢迎使用 .NET Core!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ 欢迎使用 .NET Core!
+------------------
若要详细了解 .NET Core,请访问 https://aka.ms/dotnet-docs。使用 dotnet --help 查看可用的命令或转到 https://aka.ms/dotnet-cli-docs。
遥测
---------------
+----
.NET Core 收集使用情况数据,以便改善用户体验。数据是匿名的且不包含命令行参数。数据由 Microsoft 收集,并与社区共享。
可选择使用你最喜爱的 shell 将 DOTNET_CLI_TELEMETRY_OPTOUT 环境变量设置为 1,从而退出遥测。
若要深入了解 .NET Core 工具遥测,请访问 https://aka.ms/dotnet-cli-telemetry。
@@ -30,10 +31,10 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
正在配置...
--------------------
+----------
正在运行一项命令,以初步填充本地包缓存,从而提高还原速度并启用脱机访问。此命令最长需要一分钟才能完成,且仅可运行一次。
@@ -41,7 +42,7 @@ A command is running to initially populate your local package cache, to improve
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
diff --git a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf
index 5efc8642e..84f6acee3 100644
--- a/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf
+++ b/src/Microsoft.DotNet.Configurer/xlf/LocalizableStrings.zh-Hant.xlf
@@ -5,15 +5,16 @@
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.
+Learn more about .NET Core: https://aka.ms/dotnet-docs
+Use 'dotnet --help' to see available commands or visit: 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.
- 歡迎使用 .NET Core!
----------------------
+---------
+The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
+
+Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
+ 歡迎使用 .NET Core!
+------------------
深入了解 .NET Core @ https://aka.ms/dotnet-docs。使用 dotnet --help 可查看可用的命令,或前往 https://aka.ms/dotnet-cli-docs。
遙測
@@ -30,10 +31,10 @@ You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-te
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.
+--------------
+A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
正在設定...
--------------------
+-----------
執行命令以初步填入您的本機套件快取,以改善還原速度並允許離線存取。此命令最長需要一分鐘的時間才可完成,且只會進行一次。
@@ -41,7 +42,7 @@ A command is running to initially populate your local package cache, to improve
Permission denied to modify the '{0}' folder.
Here are some options to fix this error:
----------------------
+----------------------------------------
1. Re-run this command with elevated access.
2. Disabled the first run experience by setting the environment variable DOTNET_SKIP_FIRST_TIME_EXPERIENCE to true.
3. Copy the .NET Core SDK to a non-protected location and use it from there.
@@ -49,7 +50,7 @@ Here are some options to fix this error:
權限無法修改 '{0}' 資料夾。
以下為修正此錯誤的一些選項:
----------------------
+-------------------------
1. 利用較高的存取權再次執行此命令。
2. 將環境變數 DOTNET_SKIP_FIRST_TIME_EXPERIENCE 設定為 true,停用第一次的執行體驗。
3. 將 .NET Core SDK 複製到不受保護的位置,並於該處使用此 SDK。
diff --git a/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj b/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj
index a5c6d9d6a..c4c930565 100644
--- a/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj
+++ b/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj
@@ -1,5 +1,4 @@
- Abstractions for making code that uses file system and environment testable.
diff --git a/src/Microsoft.DotNet.MSBuildSdkResolver/Interop.NETStandard.cs b/src/Microsoft.DotNet.MSBuildSdkResolver/Interop.NETStandard.cs
index 74abc2a61..b672a5dfb 100644
--- a/src/Microsoft.DotNet.MSBuildSdkResolver/Interop.NETStandard.cs
+++ b/src/Microsoft.DotNet.MSBuildSdkResolver/Interop.NETStandard.cs
@@ -1,10 +1,10 @@
// 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.
-// NOTE: Currently, only the NET46 build ships (with Visual Studio/desktop msbuild),
-// but the netstandard1.5 adaptation here acts a proof-of-concept for cross-platform
+// NOTE: the NET46 build ships with Visual Studio/desktop msbuild on Windows.
+// The netstandard1.5 adaptation here acts a proof-of-concept for cross-platform
// portability of the underlying hostfxr API and gives us build and test coverage
-// on non-Windows machines.
+// on non-Windows machines. It also ships with msbuild on Mono.
#if NETSTANDARD1_5
using System;
diff --git a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
index ca8867c75..55d357272 100644
--- a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
+++ b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj
@@ -1,5 +1,4 @@
- $(SdkVersion)
diff --git a/src/Microsoft.DotNet.TestFramework/Properties/AssemblyInfo.cs b/src/Microsoft.DotNet.TestFramework/Properties/AssemblyInfo.cs
deleted file mode 100644
index 110018e7f..000000000
--- a/src/Microsoft.DotNet.TestFramework/Properties/AssemblyInfo.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.
-
-using System.Reflection;
-
-[assembly: AssemblyMetadataAttribute("Serviceable", "True")]
diff --git a/src/dotnet/HelpException.cs b/src/dotnet/HelpException.cs
index 98f2eb6f7..f1f9eb5b4 100644
--- a/src/dotnet/HelpException.cs
+++ b/src/dotnet/HelpException.cs
@@ -6,7 +6,6 @@ namespace Microsoft.DotNet.Cli
///
/// Allows control flow to be interrupted in order to display help in the console.
///
- [Obsolete("This is intended to facilitate refactoring during parser replacement and should not be used after that work is done.")]
public class HelpException : Exception
{
public HelpException(string message) : base(message)
diff --git a/src/dotnet/MsbuildProject.cs b/src/dotnet/MsbuildProject.cs
index 860d38799..34055cacc 100644
--- a/src/dotnet/MsbuildProject.cs
+++ b/src/dotnet/MsbuildProject.cs
@@ -256,7 +256,7 @@ namespace Microsoft.DotNet.Tools
string fullPath = Path.GetFullPath(reference);
ret.Add(fullPath);
- ret.Add(PathUtility.GetRelativePath(ProjectDirectory, fullPath));
+ ret.Add(Path.GetRelativePath(ProjectDirectory, fullPath));
return ret;
}
diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs
index 6fb3c6512..06c11b819 100644
--- a/src/dotnet/Program.cs
+++ b/src/dotnet/Program.cs
@@ -77,7 +77,6 @@ namespace Microsoft.DotNet.Cli
{
// CommandLineApplication is a bit restrictive, so we parse things ourselves here. Individual apps should use CLA.
- bool? verbose = null;
var success = true;
var command = string.Empty;
var lastArg = 0;
@@ -92,7 +91,8 @@ namespace Microsoft.DotNet.Cli
{
if (IsArg(args[lastArg], "d", "diagnostics"))
{
- verbose = true;
+ Environment.SetEnvironmentVariable(CommandContext.Variables.Verbose, bool.TrueString);
+ CommandContext.SetVerbose(true);
}
else if (IsArg(args[lastArg], "version"))
{
@@ -159,9 +159,8 @@ namespace Microsoft.DotNet.Cli
? Enumerable.Empty()
: args.Skip(lastArg + 1).ToArray();
- if (verbose.HasValue)
+ if (CommandContext.IsVerbose())
{
- Environment.SetEnvironmentVariable(CommandContext.Variables.Verbose, verbose.ToString());
Console.WriteLine($"Telemetry is: {(telemetryClient.Enabled ? "Enabled" : "Disabled")}");
}
@@ -170,7 +169,12 @@ namespace Microsoft.DotNet.Cli
int exitCode;
if (BuiltInCommandsCatalog.Commands.TryGetValue(topLevelCommandParserResult.Command, out var builtIn))
{
- TelemetryEventEntry.SendFiltered(Parser.Instance.ParseFrom($"dotnet {topLevelCommandParserResult.Command}", appArgs.ToArray()));
+ var parseResult = Parser.Instance.ParseFrom($"dotnet {topLevelCommandParserResult.Command}", appArgs.ToArray());
+ if (!parseResult.Errors.Any())
+ {
+ TelemetryEventEntry.SendFiltered(parseResult);
+ }
+
exitCode = builtIn.Command(appArgs.ToArray());
}
else
diff --git a/src/dotnet/SlnFileExtensions.cs b/src/dotnet/SlnFileExtensions.cs
index 24848dffa..16dce1b31 100644
--- a/src/dotnet/SlnFileExtensions.cs
+++ b/src/dotnet/SlnFileExtensions.cs
@@ -23,7 +23,7 @@ namespace Microsoft.DotNet.Tools.Common
throw new ArgumentException();
}
- var relativeProjectPath = PathUtility.GetRelativePath(
+ var relativeProjectPath = Path.GetRelativePath(
PathUtility.EnsureTrailingSlash(slnFile.BaseDirectory),
fullProjectPath);
diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.resx b/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.resx
index c18e94039..61a8f320f 100644
--- a/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.resx
+++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/LocalizableStrings.resx
@@ -162,4 +162,7 @@
PACKAGE_DIRECTORY
+
+ Unable to generate a temporary file for project '{0}'. Cannot add package reference. Please clear the temp directory and try again.
+
\ No newline at end of file
diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/Program.cs b/src/dotnet/commands/dotnet-add/dotnet-add-package/Program.cs
index a72a413a1..c0af31625 100644
--- a/src/dotnet/commands/dotnet-add/dotnet-add-package/Program.cs
+++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/Program.cs
@@ -66,8 +66,18 @@ namespace Microsoft.DotNet.Tools.Add.PackageReference
if (!_appliedCommand.HasOption("no-restore"))
{
- // Create a Dependency Graph file for the project
- tempDgFilePath = Path.GetTempFileName();
+
+ try
+ {
+ // Create a Dependency Graph file for the project
+ tempDgFilePath = Path.GetTempFileName();
+ }
+ catch (IOException ioex)
+ {
+ // Catch IOException from Path.GetTempFileName() and throw a graceful exception to the user.
+ throw new GracefulException(string.Format(LocalizableStrings.CmdDGFileIOException, projectFilePath), ioex);
+ }
+
GetProjectDependencyGraph(projectFilePath, tempDgFilePath);
}
diff --git a/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.cs.xlf
index 11241842a..1526517de 100644
--- a/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.cs.xlf
+++ b/src/dotnet/commands/dotnet-add/dotnet-add-package/xlf/LocalizableStrings.cs.xlf
@@ -77,6 +77,11 @@
PACKAGE_NAME
+
+ Unable to generate a temporary file for project '{0}'. Cannot add package reference. Please clear the temp directory and try again.
+ Unable to generate a temporary file for project '{0}'. Cannot add package reference. Please clear the temp directory and try again.
+
+