Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit d789266

Browse files
authored
Merge branch 'release/2.1.3xx' into merges/release/2.1.2xx-to-release/2.1.3xx
2 parents 7932dc6 + 32f29b6 commit d789266

File tree

964 files changed

+34821
-9198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

964 files changed

+34821
-9198
lines changed

.editorconfig

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# editorconfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Default settings:
7+
# A newline ending every file
8+
# Use 4 spaces as indentation
9+
[*]
10+
insert_final_newline = true
11+
indent_style = space
12+
indent_size = 4
13+
14+
[project.json]
15+
indent_size = 2
16+
17+
# C# files
18+
[*.cs]
19+
# New line preferences
20+
csharp_new_line_before_open_brace = all
21+
csharp_new_line_before_else = true
22+
csharp_new_line_before_catch = true
23+
csharp_new_line_before_finally = true
24+
csharp_new_line_before_members_in_object_initializers = true
25+
csharp_new_line_before_members_in_anonymous_types = true
26+
csharp_new_line_within_query_expression_clauses = true
27+
28+
# Indentation preferences
29+
csharp_indent_block_contents = true
30+
csharp_indent_braces = false
31+
csharp_indent_case_contents = true
32+
csharp_indent_switch_labels = true
33+
csharp_indent_labels = flush_left
34+
35+
# avoid this. unless absolutely necessary
36+
dotnet_style_qualification_for_field = false:suggestion
37+
dotnet_style_qualification_for_property = false:suggestion
38+
dotnet_style_qualification_for_method = false:suggestion
39+
dotnet_style_qualification_for_event = false:suggestion
40+
41+
# only use var when it's obvious what the variable type is
42+
csharp_style_var_for_built_in_types = false:none
43+
csharp_style_var_when_type_is_apparent = false:none
44+
csharp_style_var_elsewhere = false:suggestion
45+
46+
# use language keywords instead of BCL types
47+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
48+
dotnet_style_predefined_type_for_member_access = true:suggestion
49+
50+
# name all constant fields using PascalCase
51+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
52+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
53+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
54+
55+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
56+
dotnet_naming_symbols.constant_fields.required_modifiers = const
57+
58+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
59+
60+
# internal and private fields should be _camelCase
61+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
62+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
63+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
64+
65+
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
66+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
67+
68+
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
69+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
70+
71+
# Code style defaults
72+
dotnet_sort_system_directives_first = true
73+
csharp_preserve_single_line_blocks = true
74+
csharp_preserve_single_line_statements = false
75+
76+
# Expression-level preferences
77+
dotnet_style_object_initializer = true:suggestion
78+
dotnet_style_collection_initializer = true:suggestion
79+
dotnet_style_explicit_tuple_names = true:suggestion
80+
dotnet_style_coalesce_expression = true:suggestion
81+
dotnet_style_null_propagation = true:suggestion
82+
83+
# Expression-bodied members
84+
csharp_style_expression_bodied_methods = false:none
85+
csharp_style_expression_bodied_constructors = false:none
86+
csharp_style_expression_bodied_operators = false:none
87+
csharp_style_expression_bodied_properties = true:none
88+
csharp_style_expression_bodied_indexers = true:none
89+
csharp_style_expression_bodied_accessors = true:none
90+
91+
# Pattern matching
92+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
93+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
94+
csharp_style_inlined_variable_declaration = true:suggestion
95+
96+
# Null checking preferences
97+
csharp_style_throw_expression = true:suggestion
98+
csharp_style_conditional_delegate_call = true:suggestion
99+
100+
# Space preferences
101+
csharp_space_after_cast = false
102+
csharp_space_after_colon_in_inheritance_clause = true
103+
csharp_space_after_comma = true
104+
csharp_space_after_dot = false
105+
csharp_space_after_keywords_in_control_flow_statements = true
106+
csharp_space_after_semicolon_in_for_statement = true
107+
csharp_space_around_binary_operators = before_and_after
108+
csharp_space_around_declaration_statements = do_not_ignore
109+
csharp_space_before_colon_in_inheritance_clause = true
110+
csharp_space_before_comma = false
111+
csharp_space_before_dot = false
112+
csharp_space_before_open_square_brackets = false
113+
csharp_space_before_semicolon_in_for_statement = false
114+
csharp_space_between_empty_square_brackets = false
115+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
116+
csharp_space_between_method_call_name_and_opening_parenthesis = false
117+
csharp_space_between_method_call_parameter_list_parentheses = false
118+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
119+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
120+
csharp_space_between_method_declaration_parameter_list_parentheses = false
121+
csharp_space_between_parentheses = false
122+
csharp_space_between_square_brackets = false
123+
124+
# C++ Files
125+
[*.{cpp,h,in}]
126+
curly_bracket_next_line = true
127+
indent_brace_style = Allman
128+
129+
# Xml project files
130+
[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
131+
indent_size = 2
132+
133+
# Xml build files
134+
[*.builds]
135+
indent_size = 2
136+
137+
# Xml files
138+
[*.{xml,stylecop,resx,ruleset}]
139+
indent_size = 2
140+
141+
# Xml config files
142+
[*.{props,targets,config,nuspec}]
143+
indent_size = 2
144+
145+
# Shell scripts
146+
[*.sh]
147+
end_of_line = lf
148+
[*.{cmd, bat}]
149+
end_of_line = crlf

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@
5151
*.vbproj text=auto
5252
*.fsproj text=auto
5353
*.dbproj text=auto
54+
*.xlf text=auto
5455
*.sln text=auto eol=crlf

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ dlldata.c
9999
# DNX
100100
project.lock.json
101101
artifacts/
102+
bin/
102103

103104
*_i.c
104105
*_p.c

Directory.Build.props

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
3+
<!--
4+
Projects which don't import dir.props:
5+
6+
build\RestoreDependency.proj
7+
build\Signing.proj
8+
build\package\Installer.DEB.proj
9+
build\sdks\sdks.csproj
10+
build\templates\templates.csproj
11+
build\test\RunTest.proj
12+
build_projects\Microsoft.DotNet.Cli.Build.SelfTest\InvokeWithStage2.proj
13+
build_projects\update-dependencies\update-dependencies.csproj
14+
tools\TestAssetsDependencies\TestAssetsDependencies.csproj
15+
16+
-->
17+
18+
<PropertyGroup>
19+
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
20+
21+
<NuGetPackagesDir>$(NUGET_PACKAGES)</NuGetPackagesDir>
22+
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
23+
24+
<RelativeCLIBuildBinaries>build_projects/dotnet-cli-build/bin</RelativeCLIBuildBinaries>
25+
<RelativeCLIBuildDllName>dotnet-cli-build.dll</RelativeCLIBuildDllName>
26+
<CLIBuildDll>$(RepoRoot)/$(RelativeCLIBuildBinaries)/$(RelativeCLIBuildDllName)</CLIBuildDll>
27+
<BuildTasksFeedDll>$(RepoRoot)/build_projects/dotnet-cli-build/bin/Microsoft.DotNet.Build.Tasks.Feed.dll</BuildTasksFeedDll>
28+
29+
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
30+
<DisableImplicitPackageTargetFallback>true</DisableImplicitPackageTargetFallback>
31+
32+
<CliTargetFramework>netcoreapp2.1</CliTargetFramework>
33+
</PropertyGroup>
34+
35+
<Import Project="build/InitRepo.props" />
36+
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(GitCommitInfoProps)" />
37+
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(HostInfoProps)" />
38+
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(BuildInfoProps)" />
39+
40+
<Import Project="build/BranchInfo.props" />
41+
<Import Project="build/AzureInfo.props" />
42+
43+
<Import Project="build/DependencyVersions.props" />
44+
<Import Project="build/Version.props" />
45+
<Import Project="build/DerivedHostMachineInfo.props" />
46+
<Import Project="build/Branding.props" />
47+
48+
<Import Project="build/FileExtensions.props" />
49+
<Import Project="build/InputDirectories.props" />
50+
<Import Project="build/MSBuildExtensions.props" />
51+
<Import Project="build/SetupPreviousStage.props" />
52+
<Import Project="build/OutputDirectories.props" />
53+
54+
<ImportGroup Condition=" '$(BuildingSigningProject)' != 'true' ">
55+
<!-- These imports aren't required for signing, and some of them have syntax which isn't supported in MSBuild 14,
56+
which is what the signing build uses -->
57+
<Import Project="build/BundledTools.props" />
58+
<Import Project="build/BundledSdks.props" />
59+
<Import Project="build/BundledTemplates.props" />
60+
<Import Project="build/BundledDotnetTools.props" />
61+
62+
<Import Project="build/BuildDefaults.props" />
63+
<Import Project="build/BundledRuntimes.props" />
64+
<Import Project="build/CrossGen.props" />
65+
<Import Project="build/BackwardsCompatibilityRuntimes.props" />
66+
67+
<Import Project="build/InstallerInfo.props" />
68+
<Import Project="build/GenerateResxSource.targets" />
69+
</ImportGroup>
70+
71+
</Project>

Documentation/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Documents Index
88
- [.NET Core native pre-requisities document](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md)
99
- [Roadmap and OS support](https://github.com/dotnet/core/blob/master/roadmap.md)
1010
- [Comprehensive CLI documentation](https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/tools/)
11+
- [ASP.NET Core Command Line Tools](general/aspnetcore-tools.md)
1112

1213
## Working with the CLI repo
1314

@@ -16,7 +17,7 @@ Documents Index
1617

1718
## Troubleshooting and issues reporting
1819

19-
- [CLI Known Issues](https://github.com/dotnet/core/blob/master/cli/known-issues.md)
20+
- [CLI Known Issues](https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0.0-known-issues.md)
2021
- [Filing migration issues](migration-issues.md)
2122

2223
## Specifications
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ASP.NET Core Command Line Tools
2+
===============================
3+
4+
The .NET Core CLI includes some commands that are specific to ASP.NET Core projects.
5+
6+
- dotnet dev-certs
7+
- dotnet user-secrets
8+
- dotnet sql-cache
9+
10+
For more information on these tools, see <https://github.com/aspnet/DotNetTools>.

Documentation/general/intro-to-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The way the `dotnet` driver finds the command it is instructed to run using `dot
4545
Adding a new command to the .NET Core CLI
4646
=========================================
4747

48-
If you want to contribute to the actual .NET Core CLI by adding a new command that you think would be useful, please refer to the [developer guide](developer-guide.md) in this directory. It contains all of the guidance on both the process as well as the infrastructure that you need to adhere to when adding a new command to the CLI toolchain.
48+
If you want to contribute to the actual .NET Core CLI by adding a new command that you think would be useful, please refer to the [developer guide](../project-docs/developer-guide.md) in this directory. It contains all of the guidance on both the process as well as the infrastructure that you need to adhere to when adding a new command to the CLI toolchain.
4949

5050
After you familiarize yourself with the process of working with the source code in the repo, please consult the [CLI UX guidelines](cli-ux-guidelines.md) to get to know the user experience tenants the CLI has.
5151

Documentation/general/tab-completion.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# .NET CLI Tab Completion
22

3-
In version 2.0 of the .NET Core CLI, we have added support for providing suggestions when you press `tab`. While it's not yet enabled by default, you can try it out today by installing a [preview build](https://github.com/dotnet/cli#installers-and-binaries) from the master branch or by building from source.
3+
In version 2.0 of the .NET Core CLI, we have added support for providing suggestions when you press `tab`. While it's not yet enabled by default, you can try it out in PowerShell, bash, or zsh by following the instructions below.
44

55
Here are some examples of what it provides:
66

@@ -26,17 +26,18 @@ If you just installed `dotnet` you may see the first-run output:
2626
```
2727
Welcome to .NET Core!
2828
---------------------
29-
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.
29+
Learn more about .NET Core: https://aka.ms/dotnet-docs
30+
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
3031
3132
Telemetry
32-
--------------
33-
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.
34-
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
35-
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
33+
---------
34+
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.
35+
36+
Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
3637
3738
Configuring...
38-
-------------------
39-
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.
39+
--------------
40+
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.
4041
Decompressing 100% 4936 ms
4142
Expanding 100% 17195 ms
4243
```
@@ -68,4 +69,4 @@ To enable tab completion in zsh, edit your `.zshrc` file to add the contents of
6869

6970
## How it works
7071

71-
Each of these scripts provides a hook for completions for its respective shell. The logic that determines which suggestions to provide is in the CLI itself, configured using [our new parser](https://github.com/dotnet/CliCommandLineParser). You can see a code example [here](https://github.com/dotnet/cli/blob/master/src/dotnet/commands/dotnet-add/dotnet-add-package/AddPackageParser.cs#L23).
72+
Each of these scripts provides a hook for completions for its respective shell. The logic that determines which suggestions to provide is in the CLI itself, configured using [our new parser](https://github.com/dotnet/CliCommandLineParser). You can see a code example [here](https://github.com/dotnet/cli/blob/master/src/dotnet/commands/dotnet-add/dotnet-add-package/AddPackageParser.cs).

0 commit comments

Comments
 (0)