You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more information, see [Supported OS lifecycle policy](https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md) and [.NET RID Catalog](rid-catalog.md).
53
53
54
-
## Open source
54
+
## Free and open source
55
55
56
-
.NET is open source, using [MIT and Apache 2 licenses](https://github.com/dotnet/runtime/blob/main/LICENSE.TXT). .NET is a project of the [.NET Foundation](https://dotnetfoundation.org/).
56
+
.NET is free and open source, using [MIT and Apache 2 licenses](https://github.com/dotnet/runtime/blob/main/LICENSE.TXT). .NET is a project of the [.NET Foundation](https://dotnetfoundation.org/).
57
57
58
58
For more information, see the [list of project repositories on GitHub.com](https://github.com/dotnet/core/blob/main/Documentation/core-repos.md).
59
59
@@ -69,9 +69,9 @@ For more information, see the [list of project repositories on GitHub.com](https
69
69
70
70
For more information, see [Releases and support for .NET Core and .NET 5](releases-and-support.md).
71
71
72
-
## Implementations
72
+
## .NET Core, .NET Framework, Mono, UWP
73
73
74
-
.NET comes in different flavors, more formally known as *implementations*. .NET 5+ (including .NET Core) is the latest implementation and runs on any platform. .NET Framework is the original implementation of .NET, and runs only on Windows. Mono is used when a small runtime is required. Universal Windows Platform (UWP) is used to build modern Windows apps.
74
+
.NET comes in different flavors, more formally known as *implementations*. .NET 5+ (including .NET Core) is the latest implementation and runs on any platform. .NET Framework is the original implementation of .NET, and runs only on Windows. [Mono](../standard/glossary.md#mono) is used when a small runtime is required. [Universal Windows Platform (UWP)](../standard/glossary.md#uwp) is used to build modern Windows apps.
75
75
76
76
Each implementation includes a runtime and a class library. It may also include application frameworks and development tools.
77
77
@@ -407,14 +407,7 @@ For more information, see [Unsafe code and pointers](../csharp/language-referenc
407
407
408
408
## Next steps
409
409
410
-
> [!div class="nextstepaction"]
411
-
> [Choose a .NET tutorial](tutorials/index.md)
412
-
413
-
> [!div class="nextstepaction"]
414
-
> [Try .NET in your browser](../csharp/tour-of-csharp/tutorials/numbers-in-csharp.yml)
415
-
416
-
> [!div class="nextstepaction"]
417
-
> [Take a tour of C#](../csharp/tour-of-csharp/index.md)
418
-
419
-
> [!div class="nextstepaction"]
420
-
> [Take a tour of F#](../fsharp/tour.md)
410
+
*[Choose a .NET tutorial](tutorials/index.md)
411
+
*[Try .NET in your browser](../csharp/tour-of-csharp/tutorials/numbers-in-csharp.yml)
412
+
*[Take a tour of C#](../csharp/tour-of-csharp/index.md)
Copy file name to clipboardExpand all lines: docs/core/sdk.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,25 @@
1
1
---
2
2
title: .NET SDK overview
3
-
description: Find out about the .NET SDK, which is a set of libraries and tools used to create .NET projects.
4
-
ms.date: 07/31/2019
3
+
description: Learn about the .NET SDK (formerly known as the .NET Core SDK), which is a set of libraries and tools used to create .NET projects.
4
+
ms.date: 02/24/2022
5
5
ms.technology: dotnet-cli
6
6
---
7
-
# .NET SDK overview
7
+
# What is the .NET SDK?
8
8
9
9
The .NET SDK is a set of libraries and tools that allow developers to create .NET applications and libraries. It contains the following components that are used to build and run applications:
As with any tooling, the first thing is to get the tools to your machine. Depending on your scenario, you can install the SDK using one of the following methods:
17
+
As with any tooling, the first thing is to get the tools on your machine. Depending on your scenario, you can install the SDK using one of the following methods:
18
18
19
19
- Use the native installers.
20
20
- Use the installation shell script.
21
21
22
-
The native installers are primarily meant for developer's machines. The SDK is distributed using each supported platform's
22
+
The native installers are primarily meant for developers' machines. The SDK is distributed using each supported platform's
23
23
native install mechanism, such as DEB packages on Ubuntu or MSI bundles on Windows. These installers install
24
24
and set up the environment as needed for the user to use the SDK immediately after the install. However, they also
25
25
require administrative privileges on the machine. You can find the SDK to install on the
@@ -32,10 +32,11 @@ caveat above). You can find more information in the [install script reference](t
32
32
interested in how to set up the SDK on your CI build server, see the [Using .NET SDK and tools in Continuous Integration (CI)](tools/using-ci-with-cli.md) article.
33
33
34
34
By default, the SDK installs in a "side-by-side" (SxS) manner, which means multiple versions
35
-
can coexist at any given time on a single machine. How the version gets picked when you're running CLI commands is explained in more detail in the [Select the .NET version to use](versions/selection.md) article.
35
+
can coexist at any given time on a single machine. For information about how the version gets picked when you're running CLI commands, see [Select the .NET version to use](versions/selection.md).
Copy file name to clipboardExpand all lines: docs/core/tools/telemetry.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
-
title: .NET SDK telemetry
3
-
description: Discover the .NET SDK telemetry features that collect usage information for analysis, which data is collected, and how to disable it.
2
+
title: .NET SDK and .NET CLI telemetry
3
+
description: The .NET SDK and the .NET CLI collect usage information and send it to Microsoft. Learn what data is collected and how to opt out.
4
4
author: KathleenDollard
5
-
ms.date: 08/27/2019
5
+
ms.date: 02/24/2022
6
6
---
7
-
# .NET SDK telemetry
7
+
# .NET SDK and .NET CLI telemetry
8
8
9
-
The [.NET SDK](index.md) includes a telemetry feature that collects usage data and exception information when the .NET CLI crashes. The .NET CLI comes with the .NET SDK and is the set of verbs that enable you to build, test, and publish your .NET apps. It's important that the .NET team understands how the tools are used so they can be improved. Information on failures helps the team resolve problems and fix bugs.
9
+
The [.NET SDK](index.md) includes a telemetry feature that collects usage data and sends it to Microsoft when you use [.NET CLI](index.md) commands. The usage data includes exception information when the .NET CLI crashes. The .NET CLI comes with the .NET SDK and is the set of verbs that enable you to build, test, and publish your .NET apps. Telemetry data helps the .NET team understand how the tools are used so they can be improved. Information on failures helps the team resolve problems and fix bugs.
10
10
11
-
The collected data is published in aggregate under the [Creative Commons Attribution License](https://creativecommons.org/licenses/by/4.0/).
11
+
The collected data is published in aggregate under the [Creative Commons Attribution License](https://creativecommons.org/licenses/by/4.0/). Some of the collected data is published at [.NET CLI Telemetry Data](https://dotnet.microsoft.com/platform/telemetry).
12
12
13
13
## Scope
14
14
15
-
`dotnet` has two functions: to run apps, and to execute CLI commands. Telemetry *isn't collected* when using `dotnet` to start an application in the following format:
15
+
`dotnet` has two functions: to run apps and to execute CLI commands. Telemetry *isn't collected* when using `dotnet` to start an application in the following format:
16
16
17
17
-`dotnet [path-to-app].dll`
18
18
@@ -71,7 +71,7 @@ The telemetry feature collects the following data:
71
71
| >=2.1.300 | Kernel version. |
72
72
| >=2.1.300 | Libc release/version. |
73
73
| >=3.0.100 | Whether the output was redirected (true or false). |
74
-
| >=3.0.100 | On a CLI/SDK crash, the exception type and its stack trace (only CLI/SDK code is included in the stack trace sent). For more information, see [.NET CLI/SDK crash exception telemetry collected](#net-clisdk-crash-exception-telemetry-collected). |
74
+
| >=3.0.100 | On a CLI/SDK crash, the exception type and its stack trace (only CLI/SDK code is included in the stack trace sent). For more information, see [Crash exception telemetry](#crash-exception-telemetry). |
75
75
| >=5.0.100 | Hashed TargetFrameworkVersion used for build (MSBuild property) |
76
76
| >=5.0.100 | Hashed RuntimeIdentifier used for build (MSBuild property) |
77
77
| >=5.0.100 | Hashed SelfContained used for build (MSBuild property) |
@@ -122,13 +122,11 @@ The `dotnet new` template instantiation command collects additional data for Mic
If the .NET CLI/SDK crashes, it collects the name of the exception and stack trace of the CLI/SDK code. This information is collected to assess problems and improve the quality of the .NET SDK and CLI. This article provides information about the data we collect. It also provides tips on how users building their own version of the .NET SDK can avoid inadvertent disclosure of personal or sensitive information.
128
128
129
-
### Types of collected data
130
-
131
-
.NET CLI collects information for CLI/SDK exceptions only, not exceptions in your application. The collected data contains the name of the exception and the stack trace. This stack trace is of CLI/SDK code.
129
+
The .NET CLI collects information for CLI/SDK exceptions only, not exceptions in your application. The collected data contains the name of the exception and the stack trace. This stack trace is of CLI/SDK code.
132
130
133
131
The following example shows the kind of data that is collected:
134
132
@@ -147,13 +145,13 @@ at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryC
147
145
at Microsoft.DotNet.Cli.Program.Main(String[] args)
148
146
```
149
147
150
-
###Avoid inadvertent disclosure of information
148
+
## Avoid inadvertent disclosure of information
151
149
152
150
.NET contributors and anyone else running a version of the .NET SDK that they built themselves should consider the path to their SDK source code. If a crash occurs while using a .NET SDK that is a custom debug build or configured with custom build symbol files, the SDK source file path from the build machine is collected as part of the stack trace and isn't hashed.
153
151
154
152
Because of this, custom builds of the .NET SDK shouldn't be located in directories whose path names expose personal or sensitive information.
Copy file name to clipboardExpand all lines: docs/standard/base-types/formatting-types.md
+10-21Lines changed: 10 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: "Formatting types in .NET"
3
-
description: Learn how to format types in .NET. Understand how to use or override the ToString method. Learn about culture-sensitive, composite, and custom formatting.
4
-
ms.date: "03/30/2017"
2
+
title: "Overview: How to format numbers, dates, enums, and other types in .NET"
3
+
description: "Learn how to convert instances of .NET types to formatted strings. Override the ToString method, make formatting culture-sensitive, and use ICustomFormatter."
4
+
ms.date: 02/25/2022
5
5
dev_langs:
6
6
- "csharp"
7
7
- "vb"
@@ -24,26 +24,13 @@ helpviewer_keywords:
24
24
- "base types [.NET], formatting"
25
25
- "custom formatting [.NET]"
26
26
- "strings [.NET], formatting"
27
-
ms.assetid: 0d1364da-5b30-4d42-8e6b-03378343343f
28
27
---
29
-
# Format types in .NET
28
+
# Overview: How to format numbers, dates, enums, and other types in .NET
30
29
31
-
Formatting is the process of converting an instance of a class, structure, or enumeration value to its string representation, often so that the resulting string can be displayed to users or deserialized to restore the original data type. This conversion can pose a number of challenges:
32
-
33
-
- The way that values are stored internally does not necessarily reflect the way that users want to view them. For example, a telephone number might be stored in the form 8009999999, which is not user-friendly. It should instead be displayed as 800-999-9999. See the [Custom Format Strings](#custom-format-strings) section for an example that formats a number in this way.
34
-
35
-
- Sometimes the conversion of an object to its string representation is not intuitive. For example, it is not clear how the string representation of a Temperature object or a Person object should appear. For an example that formats a Temperature object in a variety of ways, see the [Standard Format Strings](#standard-format-strings) section.
36
-
37
-
- Values often require culture-sensitive formatting. For example, in an application that uses numbers to reflect monetary values, numeric strings should include the current culture's currency symbol, group separator (which, in most cultures, is the thousands separator), and decimal symbol. For an example, see the [Culture-sensitive formatting with format providers](#culture-sensitive-formatting-with-format-providers) section.
38
-
39
-
- An application may have to display the same value in different ways. For example, an application may represent an enumeration member by displaying a string representation of its name or by displaying its underlying value. For an example that formats a member of the <xref:System.DayOfWeek> enumeration in different ways, see the [Standard Format Strings](#standard-format-strings) section.
30
+
Formatting is the process of converting an instance of a class or structure, or an enumeration value, to a string representation. The purpose is to display the resulting string to users or to deserialize it later to restore the original data type. This article introduces the formatting mechanisms that .NET provides.
40
31
41
32
> [!NOTE]
42
-
> Formatting converts the value of a type into a string representation. Parsing is the inverse of formatting. A parsing operation creates an instance of a data type from its string representation. For information about converting strings to other data types, see [Parsing Strings](parsing-strings.md).
43
-
44
-
.NET provides rich formatting support that enables developers to address these requirements.
45
-
46
-
## Formatting in .NET
33
+
> Parsing is the inverse of formatting. A parsing operation creates an instance of a data type from its string representation. For more information, see [Parsing Strings](parsing-strings.md). For information about serialization and deserialization, see [Serialization in .NET](../serialization/index.md).
47
34
48
35
The basic mechanism for formatting is the default implementation of the <xref:System.Object.ToString%2A?displayProperty=nameWithType> method, which is discussed in the [Default Formatting Using the ToString Method](#default-formatting-using-the-tostring-method) section later in this topic. However, .NET provides several ways to modify and extend its default formatting support. These include the following:
49
36
@@ -56,7 +43,7 @@ The basic mechanism for formatting is the default implementation of the <xref:Sy
56
43
57
44
For more information about format specifiers, see the [ToString Method and Format Strings](#the-tostring-method-and-format-strings) section.
58
45
59
-
- Using format providers to take advantage of the formatting conventions of a specific culture. For example, the following statement displays a currency value by using the formatting conventions of the en-US culture.
46
+
- Using format providers to implement the formatting conventions of a specific culture. For example, the following statement displays a currency value by using the formatting conventions of the en-US culture.
@@ -67,6 +54,8 @@ The basic mechanism for formatting is the default implementation of the <xref:Sy
67
54
68
55
- Using composite formatting to embed the string representation of a value in a larger string. For more information, see the [Composite Formatting](#composite-formatting) section.
69
56
57
+
- Using string interpolation, a more readable syntax to embed the string representation of a value in a larger string. For more information, see [String interpolation](../../csharp/language-reference/tokens/interpolated.md).
58
+
70
59
- Implementing <xref:System.ICustomFormatter> and <xref:System.IFormatProvider> to provide a complete custom formatting solution. For more information, see the [Custom Formatting with ICustomFormatter](#custom-formatting-with-icustomformatter) section.
71
60
72
61
The following sections examine these methods for converting an object to its string representation.
@@ -341,7 +330,7 @@ The following example uses the `ByteByByteFormatter` class to format integer val
0 commit comments