Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into live #39584

Merged
merged 8 commits into from
Feb 17, 2024
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
6 changes: 3 additions & 3 deletions docs/azure/includes/dotnet-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@
| Azure.Communication.Administration | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Communication.Administration/1.0.0-beta.3) | | |
| Azure.Communication.CallingServer | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Communication.CallingServer/1.0.0-beta.3) | | |
| Azure.Core.Expressions.DataFactory | NuGet [1.0.0-beta.6](https://www.nuget.org/packages/Azure.Core.Expressions.DataFactory/1.0.0-beta.6) | | GitHub [1.0.0-beta.6](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Core.Expressions.DataFactory_1.0.0-beta.6/sdk/core/Azure.Core.Expressions.DataFactory/) |
| Communication Calling Windows Client | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.4.0)<br>NuGet [1.5.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.5.0-beta.1) | | |
| Communication Calling Windows Client | NuGet [1.4.0](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.4.0)<br>NuGet [1.5.0-beta.2](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.5.0-beta.2) | | |
| Unknown Display Name | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.DocumentIntelligence/1.0.0-beta.1) | | |
| Unknown Display Name | NuGet [12.0.0-beta.1](https://www.nuget.org/packages/Azure.Storage.DataMovement.Files.Shares/12.0.0-beta.1) | | |
| Unknown Display Name | NuGet [1.0.2](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.Analyzers/1.0.2) | | |
Expand Down Expand Up @@ -372,7 +372,7 @@
| Mobile Server - Cross Domain | NuGet [2.0.3](https://www.nuget.org/packages/Microsoft.Azure.Mobile.Server.CrossDomain/2.0.3) | | |
| News Search | NuGet [2.1.0-preview.1](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.BingNewsSearch/2.1.0-preview.1) | | GitHub [2.1.0-preview.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Search.BingNewsSearch_2.1.0-preview.1/sdk/cognitiveservices/Search.BingNewsSearch) |
| News Search | NuGet [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Search.NewsSearch/2.0.0) | | |
| Notification Hubs | NuGet [4.1.0](https://www.nuget.org/packages/Microsoft.Azure.NotificationHubs/4.1.0) | | GitHub [4.1.0](https://github.com/Azure/azure-notificationhubs-dotnet) |
| Notification Hubs | NuGet [4.1.0](https://www.nuget.org/packages/Microsoft.Azure.NotificationHubs/4.1.0)<br>NuGet [4.2.0-beta1](https://www.nuget.org/packages/Microsoft.Azure.NotificationHubs/4.2.0-beta1) | | GitHub [4.1.0](https://github.com/Azure/azure-notificationhubs-dotnet) |
| Personalizer | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.CognitiveServices.Personalizer/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.CognitiveServices.Personalizer_1.0.0/sdk/cognitiveservices/Personalizer) |
| Quantum Jobs | NuGet [1.0.0-beta.3](https://www.nuget.org/packages/Azure.Quantum.Jobs/1.0.0-beta.3) | | |
| Relay | NuGet [3.0.1](https://www.nuget.org/packages/Microsoft.Azure.Relay/3.0.1) | [docs](https://learn.microsoft.com/dotnet/api/overview/azure/service-bus-relay) | GitHub [3.0.1](https://github.com/Azure/azure-relay-dotnet/tree/2.0.1) |
Expand Down Expand Up @@ -491,7 +491,7 @@
| SignalR - Protocols | NuGet [1.24.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Protocols/1.24.0) | | GitHub [1.24.0](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR.Protocols) |
| SignalR - Serverless Protocols | NuGet [1.10.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Serverless.Protocols/1.10.0) | | GitHub [1.10.0](https://github.com/Azure/azure-functions-signalrservice-extension/tree/v1.2.0/src/Microsoft.Azure.SignalR.Serverless.Protocols) |
| SignalR Management | NuGet [1.24.0](https://www.nuget.org/packages/Microsoft.Azure.SignalR.Management/1.24.0) | | GitHub [1.24.0](https://github.com/Azure/azure-signalr/tree/v1.5.0/src/Microsoft.Azure.SignalR.Management) |
| SQL Database Elastic Scale Client | NuGet [2.4.0](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Client/2.4.0)<br>NuGet [2.4.1-preview1](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Client/2.4.1-preview1) | | GitHub [2.4.0](https://github.com/Azure/elastic-db-tools/tree/v2.3.0/Src/ElasticScale.Client) |
| SQL Database Elastic Scale Client | NuGet [2.4.1](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Client/2.4.1) | | GitHub [2.4.1](https://github.com/Azure/elastic-db-tools/tree/v2.3.0/Src/ElasticScale.Client) |
| SQL Database Elastic Scale Service SplitMerge | NuGet [1.2.0](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.ElasticScale.Service.SplitMerge/1.2.0) | | |
| SQL Database Jobs | NuGet [0.8.3362.1](https://www.nuget.org/packages/Microsoft.Azure.SqlDatabase.Jobs/0.8.3362.1) | | |
| Storage APIs for Microsoft.Azure.WebJobs.Host | NuGet [5.0.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Host.Storage/5.0.0) | | GitHub [5.0.0](https://github.com/Azure/azure-webjobs-sdk/tree/storage-v4.0.1/src/Microsoft.Azure.WebJobs.Host.Storage) |
Expand Down
8 changes: 4 additions & 4 deletions docs/core/compatibility/sdk/8.0/custombuildeventargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ This change is a [behavioral change](../../categories.md#behavioral-change).

Use one of the following newly introduced, built-in events for extensibility instead of your custom derived build event:

- `Microsoft.Build.Framework.ExtendedCustomBuildEventArgs`
- `Microsoft.Build.Framework.ExtendedBuildErrorEventArgs`
- `Microsoft.Build.Framework.ExtendedBuildMessageEventArgs`
- `Microsoft.Build.Framework.ExtendedBuildWarningEventArgs`
- <xref:Microsoft.Build.Framework.ExtendedCustomBuildEventArgs>
- <xref:Microsoft.Build.Framework.ExtendedBuildErrorEventArgs>
- <xref:Microsoft.Build.Framework.ExtendedBuildMessageEventArgs>
- <xref:Microsoft.Build.Framework.ExtendedBuildWarningEventArgs>

Alternatively, you can temporarily disable the check by explicitly setting the environment variable `MSBUILDCUSTOMBUILDEVENTWARNING` to something other than `1`.

Expand Down
110 changes: 110 additions & 0 deletions docs/core/testing/unit-testing-mstest-sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
title: MSTest SDK overview
author: MarcoRossignoli
description: Learn about the MSTest.Sdk and how to configure profiles and extensions with MSBuild properties.
ms.author: mrossignoli
ms.date: 02/13/2024
---

# MSTest SDK overview

`MSTest.Sdk` is an [MSBuild project SDK](/visualstudio/msbuild/how-to-use-project-sdk) for building MSTest apps.
It's possible to build an MSTest app without this SDK, however, the MSTest SDK is:

* Tailored towards providing a first-class experience for testing with MSTest
* The recommended target for most users.
* Yet easy to configure for others.

The MSTest SDK will discover and run your tests using the [`MSTest runner`](./unit-testing-mstest-runner-intro.md)

How to use the `MSTest.Sdk` in a project:

```xml
<Project Sdk="MSTest.Sdk/3.3.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<!-- references to the code to test -->
</Project>
```

> [!NOTE]
> `/3.3.0` is given as example as it's the first version providing the SDK but it can be replaced with any newer version.
> Alternatively, you can set the SDK version at solution level using the _global.json_. For more information, see [Use MSBuild project SDKs](/visualstudio/msbuild/how-to-use-project-sdk?#how-project-sdks-are-resolved).

When you `build` the project all the needed components will be restored and installed using the standard NuGet workflow set by your project.

You don't need anything else to build and run your tests and you can use the same tooling (for example, `dotnet test` or Visual Studio) used by a ["classic" MSTest project](./unit-testing-with-mstest.md).

## Register extensions

The `MSTest runner` comes with a set of [extensions](./unit-testing-mstest-runner-extensions.md) that you can enable using an MSBuild property with the pattern `Enable[NugetPackageNameWithoutDots]`.

For example, to enable the crash dump extension in the [Microsoft.Testing.Extensions.CrashDump](https://www.nuget.org/packages/Microsoft.Testing.Extensions.CrashDump) NuGet package use the following property `EnableMicrosoftTestingExtensionsCrashDump`:

```xml
<Project Sdk="MSTest.Sdk/3.3.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<EnableMicrosoftTestingExtensionsCrashDump>true</EnableMicrosoftTestingExtensionsCrashDump>
</PropertyGroup>
<!-- references to the code to test -->
</Project>
```

### Available extensions

| Extension package | MSBuild property | 'Default' profile | 'AllMicrosoft' profile |
| -------- | ----------- | ----------- | ----------- |
| `Microsoft.Testing.Extensions.CodeCoverage` | `<EnableMicrosoftTestingExtensionsCodeCoverage>true</EnableMicrosoftTestingExtensionsCodeCoverage>` | ✔️ | ✔️ |
| `Microsoft.Testing.Extensions.TrxReport` | `<EnableMicrosoftTestingExtensionsTrxReport>true</EnableMicrosoftTestingExtensionsTrxReport>` | ✔️ | ✔️ |
| `Microsoft.Testing.Extensions.CrashDump` | `<EnableMicrosoftTestingExtensionsCrashDump>true</EnableMicrosoftTestingExtensionsCrashDump>` | ❌ | ✔️ |
| `Microsoft.Testing.Extensions.HangDump` | `<EnableMicrosoftTestingExtensionsHangDump>true</EnableMicrosoftTestingExtensionsHangDump>` | ❌ | ✔️ |
| `Microsoft.Testing.Extensions.Retry` | `<EnableMicrosoftTestingExtensionsRetry>true</EnableMicrosoftTestingExtensionsRetry>` | ❌ | ✔️ |
| `Microsoft.Testing.Extensions.HotReload` | `<EnableMicrosoftTestingExtensionsHotReload>true</EnableMicrosoftTestingExtensionsHotReload>` | ❌ | ✔️ |

The `MSTest.Sdk` simplifies the registration of extensions by including a pre-packaged set of them under different profiles, as shown in the preceding table.

To enable a specific profile, use the `TestingExtensionsProfile` MSBuild property.
For example, if you wish to enable all Microsoft testing extensions, you can configure the `TestingExtensionsProfile` as shown below:

```xml
<Project Sdk="MSTest.Sdk/3.3.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TestingExtensionsProfile>AllMicrosoft</TestingExtensionsProfile>
</PropertyGroup>
<!-- references to the code to test -->
</Project>
```

> [!NOTE]
> If you don't specify a custom `TestingExtensionsProfile`, the `Default` profile will be applied.

If you prefer not to use the default profile, you can set it to `None`:

```xml
<Project Sdk="MSTest.Sdk/3.3.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TestingExtensionsProfile>None</TestingExtensionsProfile>
</PropertyGroup>
<!-- references to the code to test -->
</Project>
```

You can always opt-out specific extension setting to false its respective MSBuild property.
For instance you can opt-out the default `MS Code Coverage` by setting `<EnableMicrosoftTestingExtensionsCodeCoverage>false</EnableMicrosoftTestingExtensionsCodeCoverage>`. Full-example below:

```xml
<Project Sdk="MSTest.Sdk/3.3.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<EnableMicrosoftTestingExtensionsCodeCoverage>false</EnableMicrosoftTestingExtensionsCodeCoverage>
</PropertyGroup>
<!-- references to the code to test -->
</Project>
```

> [!WARNING]
> Please review the licensing terms for each extension as they may vary.
44 changes: 1 addition & 43 deletions docs/core/tools/dotnet-new-sdk-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,7 @@ When you install the [.NET SDK](https://dotnet.microsoft.com/download), you rece
dotnet new list
```

The following table shows the templates that come pre-installed with the .NET SDK. The default language for the template is shown inside the brackets. Click on the short name link to see the specific template options.

| Templates | Short name | Language | Tags | Introduced |
|----------------------------------------------|---------------------------------------|--------------|---------------------------------------|------------------|
| Console Application | [`console`](#console) | [C#], F#, VB | Common/Console | 1.0 |
| Class library | [`classlib`](#classlib) | [C#], F#, VB | Common/Library | 1.0 |
| WPF Application | [`wpf`](#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) |
| WPF Class library | [`wpflib`](#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) |
| WPF Custom Control Library | [`wpfcustomcontrollib`](#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) |
| WPF User Control Library | [`wpfusercontrollib`](#wpf) | [C#], VB | Common/WPF | 3.0 (5.0 for VB) |
| Windows Forms (WinForms) Application | [`winforms`](#winforms) | [C#], VB | Common/WinForms | 3.0 (5.0 for VB) |
| Windows Forms (WinForms) Class library | [`winformslib`](#winforms) | [C#], VB | Common/WinForms | 3.0 (5.0 for VB) |
| Worker Service | [`worker`](#web-others) | [C#] | Common/Worker/Web | 3.0 |
| Unit Test Project | [`mstest`](#test) | [C#], F#, VB | Test/MSTest | 1.0 |
| NUnit 3 Test Project | [`nunit`](#nunit) | [C#], F#, VB | Test/NUnit | 2.1.400 |
| NUnit 3 Test Item | `nunit-test` | [C#], F#, VB | Test/NUnit | 2.2 |
| xUnit Test Project | [`xunit`](#test) | [C#], F#, VB | Test/xUnit | 1.0 |
| Razor Component | `razorcomponent` | [C#] | Web/ASP.NET | 3.0 |
| Razor Page | [`page`](#page) | [C#] | Web/ASP.NET | 2.0 |
| MVC ViewImports | [`viewimports`](#namespace) | [C#] | Web/ASP.NET | 2.0 |
| MVC ViewStart | `viewstart` | [C#] | Web/ASP.NET | 2.0 |
| Blazor Server App | [`blazorserver`](#blazorserver) | [C#] | Web/Blazor | 3.0 |
| Blazor Server App Empty | [`blazorserver-empty`](#blazorserver) | [C#] | Web/Blazor | 7.0 |
| Blazor Web App | [`blazor`](#blazor) | [C#] | Web/Blazor | 8.0.100 |
| Blazor WebAssembly App | [`blazorwasm`](#blazorwasm) | [C#] | Web/Blazor/WebAssembly | 3.1.300 |
| Blazor WebAssembly App Empty | [`blazorwasm-empty`](#blazorwasm) | [C#] | Web/Blazor/WebAssembly | 7.0 |
| ASP.NET Core Empty | [`web`](#web) | [C#], F# | Web/Empty | 1.0 |
| ASP.NET Core Web App (Model-View-Controller) | [`mvc`](#web-options) | [C#], F# | Web/MVC | 1.0 |
| ASP.NET Core Web App | [`webapp, razor`](#web-options) | [C#] | Web/MVC/Razor Pages | 2.2, 2.0 |
| ASP.NET Core with Angular | [`angular`](#spa) | [C#] | Web/MVC/SPA | 2.0 |
| ASP.NET Core with React.js | [`react`](#spa) | [C#] | Web/MVC/SPA | 2.0 |
| Razor Class Library | [`razorclasslib`](#razorclasslib) | [C#] | Web/Razor/Library/Razor Class Library | 2.1 |
| ASP.NET Core Web API | [`webapi`](#webapi) | [C#], F# | Web/Web API/API/Service/WebAPI | 1.0 |
| ASP.NET Core API | [`webapiaot`](#webapiaot) | [C#] | Web/Web API/API/Service | 8.0 |
| ASP.NET Core gRPC Service | [`grpc`](#web-others) | [C#] | Web/gRPC | 3.0 |
| dotnet gitignore file | `gitignore` | | Config | 3.0 |
| global.json file | [`globaljson`](#globaljson) | | Config | 2.0 |
| NuGet Config | `nugetconfig` | | Config | 1.0 |
| Dotnet local tool manifest file | `tool-manifest` | | Config | 3.0 |
| Web Config | `webconfig` | | Config | 1.0 |
| Solution File | `sln` | | Solution | 1.0 |
| Protocol Buffer File | [`proto`](#namespace) | | Web/gRPC | 3.0 |
| EditorConfig file | `editorconfig`(#editorconfig) | | Config | 6.0 |
[!INCLUDE [](../../../includes/templates.md)]

## Template options

Expand Down
Loading
Loading