Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/architecture/grpc-for-wcf-developers/protobuf-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ message StockPrices {
}
```

In the generated code, `map` fields use the `Google.Protobuf.Collections.MapField<TKey, TValue>` class. This class implements the standard .NET collection interfaces, including <xref:System.Collections.Generic.IDictionary%602>.
In the generated code, `map` fields are represented by read-only properties of the [`Google.Protobuf.Collections.MapField<TKey, TValue>`][map-field] type. This type implements the standard .NET collection interfaces, including <xref:System.Collections.Generic.IDictionary%602>.

Map fields can't be directly repeated in a message definition. But you can create a nested message that contains a map and use `repeated` on the message type, as in the following example:

Expand Down Expand Up @@ -44,6 +44,8 @@ public Order CreateOrder(Dictionary<string, string> attributes)

For more information about Protobuf, see the official [Protobuf documentation](https://developers.google.com/protocol-buffers/docs/overview).

[map-field]: https://developers.google.cn/protocol-buffers/docs/reference/csharp/class/google/protobuf/collections/map-field-t-key-t-value-

>[!div class="step-by-step"]
>[Previous](protobuf-enums.md)
>[Next](wcf-services-to-grpc-comparison.md)
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ message Person {
}
```

In the generated code, `repeated` fields are represented by the `Google.Protobuf.Collections.RepeatedField<T>` generic type rather than any of the built-in .NET collection types.
In the generated code, `repeated` fields are represented by read-only properties of the [`Google.Protobuf.Collections.RepeatedField<T>`][repeated-field] type rather than any of the built-in .NET collection types. This type implements all the standard .NET collection interfaces, such as <xref:System.Collections.Generic.IList%601> and <xref:System.Collections.Generic.IEnumerable%601>. So you can use LINQ queries or convert it to an array or a list easily.

The `RepeatedField<T>` type includes the code required to serialize and deserialize the list to the binary wire format. It implements all the standard .NET collection interfaces, such as <xref:System.Collections.Generic.IList%601> and <xref:System.Collections.Generic.IEnumerable%601>. So you can use LINQ queries or convert it to an array or a list easily.
The `RepeatedField<T>` type includes the code required to serialize and deserialize the list to the binary wire format.

[repeated-field]: https://developers.google.cn/protocol-buffers/docs/reference/csharp/class/google/protobuf/collections/repeated-field-t-

>[!div class="step-by-step"]
>[Previous](protobuf-nested-types.md)
Expand Down
8 changes: 7 additions & 1 deletion docs/core/compatibility/aspnetcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ ms.author: scaddie

ASP.NET Core provides the web app development features used by .NET Core.

The following breaking changes are documented on this page:
Select one of the following links for breaking changes in a specific version:

* [ASP.NET Core 5.0](#aspnet-core-50)
* [ASP.NET Core 3.1](#aspnet-core-31)
* [ASP.NET Core 3.0](#aspnet-core-30)

The following breaking changes in ASP.NET Core 3.0, 3.1, and 5.0 are documented on this page:

- [Obsolete Antiforgery, CORS, Diagnostics, MVC, and Routing APIs removed](#obsolete-antiforgery-cors-diagnostics-mvc-and-routing-apis-removed)
- [Authentication: Google+ deprecation](#authentication-google-deprecated-and-replaced)
Expand Down
6 changes: 3 additions & 3 deletions docs/core/tutorials/debugging-with-visual-studio-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This tutorial introduces the debugging tools available in Visual Studio Code for

## Prerequisites

- This tutorial works with the console app that you create in [Create a .NET Core console application in Visual Studio Code](with-visual-studio-code.md).
- This tutorial works with the console app that you create in [Create a .NET Core console application using Visual Studio Code](with-visual-studio-code.md).

## Use Debug build configuration

Expand All @@ -21,7 +21,7 @@ By default, Visual Studio Code launch settings use the Debug build configuration

1. Start Visual Studio Code.

1. Open the folder of the project that you created in [Create a .NET Core console application in Visual Studio Code](with-visual-studio-code.md).
1. Open the folder of the project that you created in [Create a .NET Core console application using Visual Studio Code](with-visual-studio-code.md).

## Set a breakpoint

Expand Down Expand Up @@ -218,4 +218,4 @@ dotnet run --configuration Release
In this tutorial, you used Visual Studio Code debugging tools. In the next tutorial, you publish a deployable version of the app.

> [!div class="nextstepaction"]
> [Publish a .NET Core console application with Visual Studio Code](publishing-with-visual-studio-code.md)
> [Publish a .NET Core console application using Visual Studio Code](publishing-with-visual-studio-code.md)
6 changes: 3 additions & 3 deletions docs/core/tutorials/debugging-with-visual-studio-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This tutorial introduces the debugging tools available in Visual Studio for Mac.

## Prerequisites

- This tutorial works with the console app that you create in [Create a .NET Core console application in Visual Studio for Mac](with-visual-studio-mac.md).
- This tutorial works with the console app that you create in [Create a .NET Core console application using Visual Studio for Mac](with-visual-studio-mac.md).

## Use Debug build configuration

Expand All @@ -21,7 +21,7 @@ By default, Visual Studio uses the Debug build configuration, so you don't need

1. Start Visual Studio for Mac.

1. Open the project that you created in [Create a .NET Core console application in Visual Studio for Mac](with-visual-studio-mac.md).
1. Open the project that you created in [Create a .NET Core console application using Visual Studio for Mac](with-visual-studio-mac.md).

The current build configuration is shown on the toolbar. The following toolbar image shows that Visual Studio is configured to compile the Debug version of the app:

Expand Down Expand Up @@ -172,4 +172,4 @@ To build and test the Release version of the console application, do the followi
In this tutorial, you used Visual Studio debugging tools. In the next tutorial, you publish a deployable version of the app.

> [!div class="nextstepaction"]
> [Publish a .NET Core console application with Visual Studio for Mac](publishing-with-visual-studio-mac.md)
> [Publish a .NET Core console application using Visual Studio for Mac](publishing-with-visual-studio-mac.md)
6 changes: 3 additions & 3 deletions docs/core/tutorials/debugging-with-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This tutorial introduces the debugging tools available in Visual Studio.

## Prerequisites

- This tutorial works with the console app that you create in [Create a .NET Core console application in Visual Studio 2019](with-visual-studio.md).
- This tutorial works with the console app that you create in [Create a .NET Core console application using Visual Studio](with-visual-studio.md).

## Use Debug build configuration

Expand All @@ -25,7 +25,7 @@ In the Debug configuration, a program compiles with full symbolic debug informat

1. Start Visual Studio.

1. Open the project that you created in [Create a .NET Core console application in Visual Studio 2019](with-visual-studio.md).
1. Open the project that you created in [Create a .NET Core console application using Visual Studio](with-visual-studio.md).

The current build configuration is shown on the toolbar. The following toolbar image shows that Visual Studio is configured to compile the Debug version of the app:

Expand Down Expand Up @@ -182,4 +182,4 @@ When you press <kbd>F5</kbd> or choose **Build Solution** from the **Build** men
In this tutorial, you used Visual Studio debugging tools. In the next tutorial, you publish a deployable version of the app.

> [!div class="nextstepaction"]
> [Publish a .NET Core console application with Visual Studio](publishing-with-visual-studio.md)
> [Publish a .NET Core console application using Visual Studio](publishing-with-visual-studio.md)
6 changes: 3 additions & 3 deletions docs/core/tutorials/publishing-with-visual-studio-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ The .NET Core CLI is used to publish the app, so you can follow this tutorial wi

## Prerequisites

- This tutorial works with the console app that you create in [Create a .NET Core console application in Visual Studio Code](with-visual-studio-code.md).
- This tutorial works with the console app that you create in [Create a .NET Core console application using Visual Studio Code](with-visual-studio-code.md).

## Publish the app

1. Start Visual Studio Code.

1. Open the *HelloWorld* project folder that you created in [Create a .NET Core console application in Visual Studio Code](with-visual-studio-code.md).
1. Open the *HelloWorld* project folder that you created in [Create a .NET Core console application using Visual Studio Code](with-visual-studio-code.md).

1. Choose **View** > **Terminal** from the main menu.

Expand Down Expand Up @@ -106,4 +106,4 @@ In the following steps, you'll look at the files created by the publish process.
In this tutorial, you published a console app. In the next tutorial, you create a class library.

> [!div class="nextstepaction"]
> [Create a .NET Standard library in Visual Studio Code](library-with-visual-studio-code.md)
> [Create a .NET Standard library using Visual Studio Code](library-with-visual-studio-code.md)
6 changes: 3 additions & 3 deletions docs/core/tutorials/publishing-with-visual-studio-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ This tutorial shows how to publish a console app so that other users can run it.

## Prerequisites

- This tutorial works with the console app that you create in [Create a .NET Core console application in Visual Studio for Mac](with-visual-studio-mac.md).
- This tutorial works with the console app that you create in [Create a .NET Core console application using Visual Studio for Mac](with-visual-studio-mac.md).

## Publish the app

1. Start Visual Studio for Mac.

1. Open the HelloWorld project that you created in [Create a .NET Core console application in Visual Studio for Mac](with-visual-studio-mac.md).
1. Open the HelloWorld project that you created in [Create a .NET Core console application using Visual Studio for Mac](with-visual-studio-mac.md).

1. Make sure that Visual Studio is building the Release version of your application. If necessary, change the build configuration setting on the toolbar from **Debug** to **Release**.

Expand Down Expand Up @@ -82,4 +82,4 @@ As the preceding image shows, the published output includes the following files:
In this tutorial, you published a console app. In the next tutorial, you create a class library.

> [!div class="nextstepaction"]
> [Create a .NET Standard library in Visual Studio for mac](library-with-visual-studio-mac.md)
> [Create a .NET Standard library using Visual Studio for Mac](library-with-visual-studio-mac.md)
6 changes: 3 additions & 3 deletions docs/core/tutorials/publishing-with-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ This tutorial shows how to publish a console app so that other users can run it.

## Prerequisites

- This tutorial works with the console app that you create in [Create a .NET Core console application in Visual Studio 2019](with-visual-studio.md).
- This tutorial works with the console app that you create in [Create a .NET Core console application using Visual Studio](with-visual-studio.md).

## Publish the app

1. Start Visual Studio.

1. Open the *HelloWorld* project that you created in [Create a .NET Core console application in Visual Studio](with-visual-studio.md).
1. Open the *HelloWorld* project that you created in [Create a .NET Core console application using Visual Studio](with-visual-studio.md).

1. Make sure that Visual Studio is using the Release build configuration. If necessary, change the build configuration setting on the toolbar from **Debug** to **Release**.

Expand Down Expand Up @@ -106,4 +106,4 @@ In the following steps, you'll look at the files created by the publish process.
In this tutorial, you published a console app. In the next tutorial, you create a class library.

> [!div class="nextstepaction"]
> [Create a .NET Standard library in Visual Studio](library-with-visual-studio.md)
> [Create a .NET Standard library using Visual Studio](library-with-visual-studio.md)
2 changes: 1 addition & 1 deletion docs/core/tutorials/with-visual-studio-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ Enhance the application to prompt the user for their name and display it along w
In this tutorial, you created a .NET Core console application. In the next tutorial, you debug the app.

> [!div class="nextstepaction"]
> [Debug a .NET Core console application in Visual Studio](debugging-with-visual-studio-mac.md)
> [Debug a .NET Core console application using Visual Studio for Mac](debugging-with-visual-studio-mac.md)
2 changes: 1 addition & 1 deletion docs/core/tutorials/with-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ Enhance the application to prompt the user for their name and display it along w
In this tutorial, you created a .NET Core console application. In the next tutorial, you debug the app.

> [!div class="nextstepaction"]
> [Debug a .NET Core console application in Visual Studio](debugging-with-visual-studio.md)
> [Debug a .NET Core console application using Visual Studio](debugging-with-visual-studio.md)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ helpviewer_keywords:
- "/warn compiler option [C#]"
- "w compiler option [C#]"
- "warn compiler option [C#]"
ms.custom: "updateeachrelease"
ms.assetid: 5f80ff59-4991-4382-9f9a-77da18446e71
---
# -warn (C# Compiler Options)
Expand All @@ -24,15 +25,17 @@ The **-warn** option specifies the warning level for the compiler to display.

## Arguments
`option`
The warning level you want displayed for the compilation: Lower numbers show only high severity warnings; higher numbers show more warnings. Valid values are 0-4:
|Warning level|Meaning|
|-------------------|-------------|
|0|Turns off emission of all warning messages.|
The warning level you want displayed for the compilation: Lower numbers show only high severity warnings; higher numbers show more warnings. The value must be zero or a positive integer:

|Warning level|Meaning|
|-------------------|-------------|
|0|Turns off emission of all warning messages.|
|1|Displays severe warning messages.|
|2|Displays level 1 warnings plus certain, less-severe warnings, such as warnings about hiding class members.|
|3|Displays level 2 warnings plus certain, less-severe warnings, such as warnings about expressions that always evaluate to `true` or `false`.|
|4 (the default)|Displays all level 3 warnings plus informational warnings.|
|4 (the default)|Displays all level 3 warnings plus informational warnings.|
|5|Displays level 4 warnings plus [additional warnings](https://github.com/dotnet/roslyn/blob/a6013f3213c902c0973b2d371c3007217d610533/docs/compilers/CSharp/Warnversion%20Warning%20Waves.md) from the compiler shipped with C# 9.0.|
|Greater than 5|Any value greater than 5 will be treated as 5. You generally put arbitrary large value (for example, `9999`) to make sure you always have all warnings if the compiler is updated with new warning levels.|

## Remarks
To get information about an error or warning, you can look up the error code in the Help Index. For other ways to get information about an error or warning, see [C# Compiler Errors](../compiler-messages/index.md).
Expand Down
51 changes: 36 additions & 15 deletions docs/fsharp/tutorials/fsharp-interactive/index.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
---
title: F# Interactive (fsi.exe) Reference
description: Learn how F# Interactive (fsi.exe) is used to run F# code interactively at the console or to execute F# scripts.
ms.date: 05/16/2016
title: F# Interactive (dotnet) Reference
description: Learn how F# Interactive (dotnet fsi) is used to run F# code interactively at the console or to execute F# scripts.
ms.date: 08/20/2020
f1_keywords:
- VS.ToolsOptionsPages.F#_Tools.F#_Interactive
---
# Interactive programming with F\#

> [!NOTE]
> This article currently describes the experience for Windows only.
F# Interactive (dotnet fsi) is used to run F# code interactively at the console, or to execute F# scripts. In other words, F# interactive executes a REPL (Read, Evaluate, Print Loop) for the F# language.

F# Interactive (fsi.exe) is used to run F# code interactively at the console, or to execute F# scripts. In other words, F# interactive executes a REPL (Read, Evaluate, Print Loop) for the F# language.

To run F# Interactive from the console, run fsi.exe. You will find fsi.exe in:

```console
C:\Program Files (x86)\Microsoft Visual Studio\2019\<sku>\Common7\IDE\CommonExtensions\Microsoft\FSharp
```

where `sku` is either `Community`, `Professional`, or `Enterprise`.
To run F# Interactive from the console, run `dotnet fsi`. You will find `dotnet fsi` in any .NET SDK.

For information about command line options available, see [F# Interactive Options](../../language-reference/fsharp-interactive-options.md).

Expand All @@ -38,7 +29,7 @@ You can control the F# Interactive command line arguments (options) by adjusting

## Scripting with F\#

Scripts use the file extension **.fsx** or **.fsscript**. Instead of compiling source code and then later running the compiled assembly, you can just run **fsi.exe** and specify the filename of the script of F# source code, and F# interactive reads the code and executes it in real time.
Scripts use the file extension **.fsx** or **.fsscript**. Instead of compiling source code and then later running the compiled assembly, you can just run **dotnet fsi** and specify the filename of the script of F# source code, and F# interactive reads the code and executes it in real time.

## Differences between the interactive, scripting, and compiled environments

Expand Down Expand Up @@ -88,6 +79,36 @@ test
90
```

## Package Management in F# Interactive

[!NOTE] Package management is available as a preview feature in versions of `dotnet fsi` shipped in the `3.1.300` and greater versions of the .NET SDK, as well as all `5.*` versions of the .NET SDK. To enable it in this preview release, run `dotnet fsi` with the `--langversion:preview` argument.

The `#r` syntax for referencing a DLL in F# Interactive can also be used to reference a nuget package via the following syntax:

```fsharp
#r "nuget: <package name>
```

For example, to reference the `FSharp.Data` package, use the following `#r` reference:

```fsharp
#r "nuget: FSharp.Data"
```

After executing this line, the latest version of the `FSharp.Data` package will be downloaded to your nuget cache and referenced in the current F# Interactive session.

In addition to the package name, specific versions of a package can be referenced via a short syntax:

```fsharp
#r "nuget: FSharp.Data, 3.3.2"
```

or in a more explicit fashion:

```fsharp
#r "nuget: FSharp.Data, Version=3.3.2"
```

## Related articles

|Title|Description|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@
<Reference Include="System.Data.Linq" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@
<Reference Include="System.Data.Linq" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@
<Reference Include="System.Data.Linq" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@
<Reference Include="System.Data.Linq" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@
<Reference Include="System.Data.Linq" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
Loading