diff --git a/.openpublishing.redirection.standard.json b/.openpublishing.redirection.standard.json index b2079ad7ab323..44291283c667d 100644 --- a/.openpublishing.redirection.standard.json +++ b/.openpublishing.redirection.standard.json @@ -318,6 +318,11 @@ "redirect_url": "/previous-versions/dotnet/framework/data/xml/xslt/outputs-from-an-xsltransform", "redirect_document_id": false }, + { + "source_path_from_root": "/docs/standard/data/sqlite/xamarin.md", + "redirect_url": "/dotnet/standard/data/sqlite/", + "redirect_document_id": false + }, { "source_path_from_root": "/docs/standard/data/xml/resolving-external-xslt-style-sheets-and-documents.md", "redirect_url": "/previous-versions/dotnet/framework/data/xml/xslt/resolving-external-xslt-style-sheets-and-documents", diff --git a/docs/ai/quickstarts/quickstart-local-ai.md b/docs/ai/quickstarts/quickstart-local-ai.md index d8abcfe1562fe..848788b95b812 100644 --- a/docs/ai/quickstarts/quickstart-local-ai.md +++ b/docs/ai/quickstarts/quickstart-local-ai.md @@ -101,21 +101,21 @@ The Semantic Kernel SDK provides many services and features to connect to AI mod Tell me three facts about .NET. AI response: - 1. **Cross-Platform Development:** One of the significant strengths of .NET, + 1. **Cross-Platform Development:** One of the significant strengths of .NET, particularly its newer iterations (.NET Core and .NET 5+), is cross-platform support. It allows developers to build applications that run on Windows, Linux, macOS, and various other operating systems seamlessly, enhancing flexibility and reducing barriers for a wider range of users. - 2. **Rich Ecosystem and Library Support:** .NET has an incredibly rich ecosystem, - comprising an extensive collection of libraries (such as those provided by the - official NuGet Package Manager), tools, and services. This allows developers - to work on web applications (.NET Framework for desktop apps and ASP.NET Core - for modern web applications), mobile applications (.NET MAUI or Xamarin.Forms), - IoT solutions, AI/ML projects, and much more with a vast array of pre-built + 2. **Rich Ecosystem and Library Support:** .NET has a rich ecosystem, + comprising an extensive collection of libraries (such as those provided by the + official NuGet Package Manager), tools, and services. This allows developers + to work on web applications (.NET for desktop apps and ASP.NET Core + for modern web applications), mobile applications (.NET MAUI), + IoT solutions, AI/ML projects, and much more with a vast array of prebuilt components available at their disposal. - - 3. **Type Safety:** .NET operates under the Common Language Infrastructure (CLI) + + 3. **Type Safety:** .NET operates under the Common Language Infrastructure (CLI) model and employs managed code for executing applications. This approach inherently offers strong type safety checks which help in preventing many runtime errors that are common in languages like C/C++. It also enables features such as garbage collection, @@ -133,11 +133,11 @@ The Semantic Kernel SDK provides many services and features to connect to AI mod AI Response: **Cross-platform Capabilities:** .NET allows building for various operating systems through platforms like .NET Core, promoting accessibility (Windows, Linux, macOS). - + **Extensive Ecosystem:** Offers a vast library selection via NuGet and tools for web - (.NET Framework), mobile development (Maui/Xamarin.Forms), IoT, AI, providing rich + (.NET Framework), mobile development (.NET MAUI), IoT, AI, providing rich capabilities to developers. - + **Type Safety & Reliability:** .NET's CLI model enforces strong typing and automatic garbage collection, mitigating runtime errors, thus enhancing application stability. ``` diff --git a/docs/ai/quickstarts/snippets/build-chat-app/openai/ExtensionsOpenAI.csproj b/docs/ai/quickstarts/snippets/build-chat-app/openai/ExtensionsOpenAI.csproj index d4fa4000b3a97..71534274d4f36 100644 --- a/docs/ai/quickstarts/snippets/build-chat-app/openai/ExtensionsOpenAI.csproj +++ b/docs/ai/quickstarts/snippets/build-chat-app/openai/ExtensionsOpenAI.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/ai/quickstarts/snippets/prompt-completion/openai/ExtensionsOpenAI.csproj b/docs/ai/quickstarts/snippets/prompt-completion/openai/ExtensionsOpenAI.csproj index d4fa4000b3a97..71534274d4f36 100644 --- a/docs/ai/quickstarts/snippets/prompt-completion/openai/ExtensionsOpenAI.csproj +++ b/docs/ai/quickstarts/snippets/prompt-completion/openai/ExtensionsOpenAI.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/architecture/blazor-for-web-forms-developers/introduction.md b/docs/architecture/blazor-for-web-forms-developers/introduction.md index ec2f34a82a816..78461d1e3c341 100644 --- a/docs/architecture/blazor-for-web-forms-developers/introduction.md +++ b/docs/architecture/blazor-for-web-forms-developers/introduction.md @@ -27,7 +27,7 @@ When .NET and ASP.NET Web Forms first shipped, the platform ecosystem looked muc Most modern web frameworks are now also open-source, which has a number of benefits. Users aren't beheld to a single project owner to fix bugs and add features. Open-source projects provide improved transparency on development progress and upcoming changes. Open-source projects enjoy contributions from an entire community, and they foster a supportive open-source ecosystem. Despite the risks of open-source, many consumers and contributors have found suitable mitigations that enable them to enjoy the benefits of an open-source ecosystem in a safe and reasonable way. Examples of such mitigations include contributor license agreements, friendly licenses, pedigree scans, and supporting foundations. -The .NET community has embraced both cross-platform support and open-source. .NET Core is an open-source and cross-platform implementation of .NET that runs on a plethora of platforms, including Windows, macOS, and various Linux distributions. Xamarin provides Mono, an open-source version of .NET. Mono runs on Android, iOS, and a variety of other form factors, including watches and smart TVs. In 2020, Microsoft released [.NET 5](https://devblogs.microsoft.com/dotnet/announcing-net-5-0/) that reconciled .NET Core and Mono into "a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences." +The .NET community has embraced both cross-platform support and open-source. .NET Core is an open-source and cross-platform implementation of .NET that runs on a plethora of platforms, including Windows, macOS, and various Linux distributions. Mono is an open-source version of .NET that runs on Android, iOS, and a variety of other form factors, including watches and smart TVs. In 2020, Microsoft released [.NET 5](https://devblogs.microsoft.com/dotnet/announcing-net-5-0/) that reconciled .NET Core and Mono into "a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences." Will ASP.NET Web Forms benefit from the move to open-source and cross-platform support? The answer, unfortunately, is no, or at least not to the same extent as the rest of the platform. The .NET team [made it clear](https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-net/) that ASP.NET Web Forms won't be ported to .NET Core or .NET 8. Why is that? diff --git a/docs/architecture/cloud-native/map-eshoponcontainers-azure-services.md b/docs/architecture/cloud-native/map-eshoponcontainers-azure-services.md index c7d4ce25e7f6e..bce0c202dd02c 100644 --- a/docs/architecture/cloud-native/map-eshoponcontainers-azure-services.md +++ b/docs/architecture/cloud-native/map-eshoponcontainers-azure-services.md @@ -8,7 +8,7 @@ ms.date: 04/06/2022 [!INCLUDE [download-alert](includes/download-alert.md)] -Although not required, Azure is well-suited to supporting the eShopOnContainers because the project was built to be a cloud-native application. The application is built with .NET, so it can run on Linux or Windows containers depending on the Docker host. The application is made up of multiple autonomous microservices, each with its own data. The different microservices showcase different approaches, ranging from simple CRUD operations to more complex DDD and CQRS patterns. Microservices communicate with clients over HTTP and with one another via message-based communication. The application supports multiple platforms for clients as well, since it adopts HTTP as a standard communication protocol and includes ASP.NET Core and Xamarin mobile apps that run on Android, iOS, and Windows platforms. +Although not required, Azure is well-suited to supporting the eShopOnContainers because the project was built to be a cloud-native application. The application is built with .NET, so it can run on Linux or Windows containers depending on the Docker host. The application is made up of multiple autonomous microservices, each with its own data. The different microservices showcase different approaches, ranging from simple CRUD operations to more complex DDD and CQRS patterns. Microservices communicate with clients over HTTP and with one another via message-based communication. The application supports multiple platforms for clients as well, since it adopts HTTP as a standard communication protocol and includes ASP.NET Core and Xamarin mobile apps that run on Android, iOS, and Windows platforms. (Xamarin is unsupported as of May 2024.) The application's architecture is shown in Figure 2-5. On the left are the client apps, broken up into mobile, traditional Web, and Web Single Page Application (SPA) flavors. On the right are the server-side components that make up the system, each of which can be hosted in Docker containers and Kubernetes clusters. The traditional web app is powered by the ASP.NET Core MVC application shown in yellow. This app and the mobile and web SPA applications communicate with the individual microservices through one or more API gateways. The API gateways follow the "backends for front ends" (BFF) pattern, meaning that each gateway is designed to support a given front-end client. The individual microservices are listed to the right of the API gateways and include both business logic and some kind of persistence store. The different services make use of SQL Server databases, Redis cache instances, and MongoDB/CosmosDB stores. On the far right is the system's Event Bus, which is used for communication between the microservices. diff --git a/docs/architecture/maui/introduction.md b/docs/architecture/maui/introduction.md index b0ddbad1f28d1..76e081f056b5e 100644 --- a/docs/architecture/maui/introduction.md +++ b/docs/architecture/maui/introduction.md @@ -101,7 +101,7 @@ In addition, unit tests are provided for some of the classes in the eShop multi- ## Multi-Platform app solution -The eShop multi-platform app solution organizes the source code and other resources into a multiple projects. All of the core mobile components are contained in a singular project named eShopContainers. This is a feature introduced with .NET 6 that allows a project to target multiple outputs which helps eliminate the need for multiple platform projects that we would have used in Xamarin.Forms and earlier .NET versions. An additional project is included for unit testing. +The eShop multi-platform app solution organizes the source code and other resources into a multiple projects. All of the core mobile components are contained in a singular project named eShopContainers. This is a feature introduced with .NET 6 that allows a project to target multiple outputs which helps eliminate the need for multiple platform projects that we would have used in earlier .NET versions. An additional project is included for unit testing. While this project has all of its components stored in a singular project, it is worth considering separating it into multiple projects based on your needs. For example, if you have multiple implementations of service providers based off of a service with their own dependencies, it may make sense to break those service provider implementations out into their own separate project. Good candidates for project separation include shared models, service implementations, api client components, database or caching layers. Any place where you feel that the business could re-use a component in another project is a potential candidate for separation. These projects can then be packaged via [NuGet](/nuget/) for easy distribution and versioning. diff --git a/docs/architecture/microservices/architect-microservice-container-applications/microservice-based-composite-ui-shape-layout.md b/docs/architecture/microservices/architect-microservice-container-applications/microservice-based-composite-ui-shape-layout.md index 8dc9b831962e7..53c618060a187 100644 --- a/docs/architecture/microservices/architect-microservice-container-applications/microservice-based-composite-ui-shape-layout.md +++ b/docs/architecture/microservices/architect-microservice-container-applications/microservice-based-composite-ui-shape-layout.md @@ -27,33 +27,33 @@ Figure 4-21 shows a version of this composite UI approach. This approach is simp Each of those UI composition microservices would be similar to a small API Gateway. But in this case, each one is responsible for a small UI area. -A composite UI approach that's driven by microservices can be more challenging or less so, depending on what UI technologies you're using. For instance, you won't use the same techniques for building a traditional web application that you use for building an SPA or for native mobile app (as when developing Xamarin apps, which can be more challenging for this approach). +A composite UI approach that's driven by microservices can be more challenging or less so, depending on what UI technologies you're using. For instance, you won't use the same techniques for building a traditional web application that you use for building an SPA or for native mobile app (which can be more challenging for this approach). -The [eShopOnContainers](https://aka.ms/MicroservicesArchitecture) sample application uses the monolithic UI approach for multiple reasons. First, it's an introduction to microservices and containers. A composite UI is more advanced but also requires further complexity when designing and developing the UI. Second, eShopOnContainers also provides a native mobile app based on Xamarin, which would make it more complex on the client C\# side. +The [eShopOnContainers](https://aka.ms/MicroservicesArchitecture) sample application uses the monolithic UI approach for multiple reasons. First, it's an introduction to microservices and containers. A composite UI is more advanced but also requires further complexity when designing and developing the UI. Second, eShopOnContainers also provides a native mobile app based on Xamarin (unsupported as of May 2024), which would make it more complex on the client C\# side. However, we encourage you to use the following references to learn more about composite UI based on microservices. ## Additional resources -- **Micro Frontends (Martin Fowler's blog)** +- **Micro Frontends (Martin Fowler's blog)** - -- **Micro Frontends (Michael Geers site)** + +- **Micro Frontends (Michael Geers site)** - -- **Composite UI using ASP.NET (Particular's Workshop)** + +- **Composite UI using ASP.NET (Particular's Workshop)** -- **Ruben Oostinga. The Monolithic Frontend in the Microservices Architecture** +- **Ruben Oostinga. The Monolithic Frontend in the Microservices Architecture** -- **Mauro Servienti. The secret of better UI composition** +- **Mauro Servienti. The secret of better UI composition** -- **Viktor Farcic. Including Front-End Web Components Into Microservices** +- **Viktor Farcic. Including Front-End Web Components Into Microservices** -- **Managing Frontend in the Microservices Architecture** +- **Managing Frontend in the Microservices Architecture** >[!div class="step-by-step"] diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/client-side-validation.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/client-side-validation.md index a3bd536537107..e9cd880c8e1e0 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/client-side-validation.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/client-side-validation.md @@ -17,7 +17,7 @@ Even when using client-side validation, you should always validate your commands Therefore, in client-side code you typically validate the ViewModels. You could also validate the client output DTOs or commands before you send them to the services. -The implementation of client-side validation depends on what kind of client application you are building. It will be different if you are validating data in a web MVC web application with most of the code in .NET, a SPA web application with that validation being coded in JavaScript or TypeScript, or a mobile app coded with Xamarin and C#. +The implementation of client-side validation depends on what kind of client application you are building. It will be different if you're validating data in an MVC web application with most of the code in .NET versus a SPA web application with the validation code in JavaScript or TypeScript. ## Additional resources diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index e1df10c0a6e5c..472cd4d048e97 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -477,7 +477,7 @@ | App Service - API Apps Service | NuGet [0.9.64](https://www.nuget.org/packages/Microsoft.Azure.AppService.ApiApps.Service/0.9.64) | | | | Code Analyzers for Durable Functions | NuGet [0.5.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask.Analyzers/0.5.0) | | GitHub [0.5.0](https://github.com/Azure/azure-functions-durable-extension/tree/Analyzer-v0.3.0/src/WebJobs.Extensions.DurableTask.Analyzers) | | Cosmos DB - BulkExecutor | NuGet [2.5.1-preview](https://www.nuget.org/packages/Microsoft.Azure.CosmosDB.BulkExecutor/2.5.1-preview) | | GitHub [2.5.1-preview](https://github.com/Azure/azure-cosmosdb-bulkexecutor-dotnet-getting-started) | -| Cosmos DB - Direct | NuGet [3.37.6](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Direct/3.37.6) | | GitHub [3.37.6](https://github.com/Azure/azure-cosmos-dotnet-v3) | +| Cosmos DB - Direct | NuGet [3.37.7](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Direct/3.37.7) | | GitHub [3.37.7](https://github.com/Azure/azure-cosmos-dotnet-v3) | | Cosmos DB - Encryption | NuGet [2.0.3](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.3)
NuGet [2.1.0-preview4](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.1.0-preview4) | | GitHub [2.0.3](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/releases/encryption/1.0.0-preview4/Microsoft.Azure.Cosmos.Encryption) | | Cosmos DB - Encryption | NuGet [1.0.0-preview07](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview07) | | | | Extensions - Caching Cosmos | NuGet [1.7.0](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Cosmos/1.7.0) | | GitHub [1.7.0](https://github.com/Azure/Microsoft.Extensions.Caching.Cosmos/tree/v1.0.0-preview4) | diff --git a/docs/azure/index.yml b/docs/azure/index.yml index bf77dd2013e8f..470dcb9085236 100644 --- a/docs/azure/index.yml +++ b/docs/azure/index.yml @@ -122,20 +122,11 @@ conceptualContent: - title: Create mobile apps links: - itemType: learn - text: Consume REST services from Azure in Xamarin apps - url: /training/modules/consume-rest-services/ - - itemType: quickstart - text: Create a Xamarin.Forms app with .NET SDK and Azure Cosmos DB's API for MongoDB - url: /azure/cosmos-db/create-mongodb-xamarin - - itemType: quickstart - text: Azure Blob storage client library with Xamarin.Forms - url: /azure/storage/blobs/storage-quickstart-blobs-xamarin - - itemType: tutorial - text: Send push notifications to Xamarin.Forms apps using ASP.NET Core and Azure Notification Hubs - url: /azure/notification-hubs/notification-hubs-backend-service-xamarin-forms - - itemType: concept - text: Add authentication and manage user identities in your mobile apps - url: /azure/developer/mobile-apps/authentication + text: Consume REST web services in .NET MAUI apps + url: /training/modules/consume-rest-services-maui/ + - itemType: overview + text: Mobile architecture design + url: /azure/architecture/guide/mobile/mobile-start-here - title: Work with storage & data links: - itemType: concept diff --git a/docs/azure/sdk/snippets/aspnetcore-guidance/MinApiSample/MinApiSample.csproj b/docs/azure/sdk/snippets/aspnetcore-guidance/MinApiSample/MinApiSample.csproj index bbc80f7adbf3d..c835802c1be77 100644 --- a/docs/azure/sdk/snippets/aspnetcore-guidance/MinApiSample/MinApiSample.csproj +++ b/docs/azure/sdk/snippets/aspnetcore-guidance/MinApiSample/MinApiSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/azure/sdk/snippets/logging/LoggingSampleApp.csproj b/docs/azure/sdk/snippets/logging/LoggingSampleApp.csproj index 847e0f2c21acc..270bac94cb585 100644 --- a/docs/azure/sdk/snippets/logging/LoggingSampleApp.csproj +++ b/docs/azure/sdk/snippets/logging/LoggingSampleApp.csproj @@ -9,7 +9,7 @@ - + diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md new file mode 100644 index 0000000000000..91ded5b8daec0 --- /dev/null +++ b/docs/core/compatibility/10.0.md @@ -0,0 +1,22 @@ +--- +title: Breaking changes in .NET 10 +titleSuffix: "" +description: Navigate to the breaking changes in .NET 10. +ms.date: 12/19/2024 +no-loc: [Blazor, Razor, Kestrel] +--- +# Breaking changes in .NET 10 + +If you're migrating an app to .NET 10, the breaking changes listed here might affect you. Changes are grouped by technology area, such as ASP.NET Core or Windows Forms. + +[!INCLUDE [binary-source-behavioral](includes/binary-source-behavioral.md)] + +> [!NOTE] +> +> This article is a work in progress. It's not a complete list of breaking changes in .NET 10. To query breaking changes that are still pending publication, see [Issues of .NET](https://issuesof.net/?q=%20is:open%20-label:Documented%20is:issue%20(label:%22Breaking%20Change%22%20or%20label:breaking-change)%20(repo:dotnet/docs%20or%20repo:aspnet/Announcements)%20group:repo%20(label:%22:checkered_flag:%20Release:%20.NET%2010%22%20or%20label:10.0.0)%20sort:created-desc). + +## Core .NET libraries + +| Title | Type of change | Introduced version | +|------------------------------------------------------------------------------------------|---------------------|--------------------| +| [API obsoletions with non-default diagnostic IDs](core-libraries/10.0/obsolete-apis.md) | Source incompatible | Preview 1 | diff --git a/docs/core/compatibility/core-libraries/10.0/obsolete-apis.md b/docs/core/compatibility/core-libraries/10.0/obsolete-apis.md new file mode 100644 index 0000000000000..2a5e9c98f4344 --- /dev/null +++ b/docs/core/compatibility/core-libraries/10.0/obsolete-apis.md @@ -0,0 +1,45 @@ +--- +title: "Breaking change: .NET 10 obsoletions with custom IDs" +titleSuffix: "" +description: Learn about the APIs that have been marked as obsolete in .NET 10 with a custom diagnostic ID. +ms.date: 01/14/2025 +--- +# API obsoletions with non-default diagnostic IDs (.NET 10) + +Some APIs have been marked as obsolete, starting in .NET 10. This breaking change is specific to APIs that have been marked as obsolete *with a custom diagnostic ID*. Suppressing the default obsoletion diagnostic ID, which is [CS0618](../../../../csharp/language-reference/compiler-messages/cs0618.md) for the C# compiler, does not suppress the warnings that the compiler generates when these APIs are used. + +## Change description + +In previous .NET versions, these APIs can be used without any build warning. In .NET 10 and later versions, use of these APIs produces a compile-time warning or error with a custom diagnostic ID. The use of custom diagnostic IDs allows you to suppress the obsoletion warnings individually instead of blanket-suppressing all obsoletion warnings. + +The following table lists the custom diagnostic IDs and their corresponding warning messages for obsoleted APIs. + +| Diagnostic ID | Description | Severity | +|---------------|-------------|----------| +| [SYSLIB0059](../../../../fundamentals/syslib-diagnostics/syslib0059.md) | callbacks aren't run before the process exits. Use instead. | Warning | + +## Version introduced + +.NET 9 + +## Type of breaking change + +These obsoletions can affect [source compatibility](../../categories.md#source-compatibility). + +## Recommended action + +- Follow the specific guidance provided for the each diagnostic ID using the URL link provided on the warning. + +- Warnings or errors for these obsoletions can't be suppressed using the standard diagnostic ID for obsolete types or members; use the custom `SYSLIBxxxx` diagnostic ID value instead. + +## Affected APIs + +### SYSLIB0059 + +- + +## See also + +- [API obsoletions with non-default diagnostic IDs (.NET 9)](../9.0/obsolete-apis-with-custom-diagnostics.md) +- [API obsoletions with non-default diagnostic IDs (.NET 8)](../8.0/obsolete-apis-with-custom-diagnostics.md) +- [Obsolete features in .NET 5+](../../../../fundamentals/syslib-diagnostics/obsoletions-overview.md) diff --git a/docs/core/compatibility/core-libraries/8.0/obsolete-apis-with-custom-diagnostics.md b/docs/core/compatibility/core-libraries/8.0/obsolete-apis-with-custom-diagnostics.md index dc47cff662dc2..5ae18b896ee94 100644 --- a/docs/core/compatibility/core-libraries/8.0/obsolete-apis-with-custom-diagnostics.md +++ b/docs/core/compatibility/core-libraries/8.0/obsolete-apis-with-custom-diagnostics.md @@ -562,6 +562,8 @@ The `SYSLIB0051` API obsoletions are organized here by namespace. ## See also +- [API obsoletions with non-default diagnostic IDs (.NET 10)](../10.0/obsolete-apis.md) +- [API obsoletions with non-default diagnostic IDs (.NET 9)](../9.0/obsolete-apis-with-custom-diagnostics.md) - [API obsoletions with non-default diagnostic IDs (.NET 7)](../7.0/obsolete-apis-with-custom-diagnostics.md) - [API obsoletions with non-default diagnostic IDs (.NET 6)](../6.0/obsolete-apis-with-custom-diagnostics.md) - [API obsoletions with non-default diagnostic IDs (.NET 5)](../5.0/obsolete-apis-with-custom-diagnostics.md) diff --git a/docs/core/compatibility/core-libraries/9.0/obsolete-apis-with-custom-diagnostics.md b/docs/core/compatibility/core-libraries/9.0/obsolete-apis-with-custom-diagnostics.md index 2c3e57cf1946c..d8f2e54b3d1ef 100644 --- a/docs/core/compatibility/core-libraries/9.0/obsolete-apis-with-custom-diagnostics.md +++ b/docs/core/compatibility/core-libraries/9.0/obsolete-apis-with-custom-diagnostics.md @@ -106,6 +106,7 @@ These obsoletions can affect [source compatibility](../../categories.md#source-c ## See also +- [API obsoletions with non-default diagnostic IDs (.NET 10)](../10.0/obsolete-apis.md) - [API obsoletions with non-default diagnostic IDs (.NET 8)](../8.0/obsolete-apis-with-custom-diagnostics.md) - [API obsoletions with non-default diagnostic IDs (.NET 7)](../7.0/obsolete-apis-with-custom-diagnostics.md) - [API obsoletions with non-default diagnostic IDs (.NET 6)](../6.0/obsolete-apis-with-custom-diagnostics.md) diff --git a/docs/core/compatibility/sdk/9.0/nugetaudit-transitive-packages.md b/docs/core/compatibility/sdk/9.0/nugetaudit-transitive-packages.md index ea3b7b1ced163..0a6e8c59c5fb7 100644 --- a/docs/core/compatibility/sdk/9.0/nugetaudit-transitive-packages.md +++ b/docs/core/compatibility/sdk/9.0/nugetaudit-transitive-packages.md @@ -14,7 +14,7 @@ In .NET 8, [NuGetAudit](../8.0/dotnet-restore-audit.md) was introduced to emit w ## New behavior Starting in .NET 9, `NuGetAuditMode` defaults to `all` if it hasn't been explicitly set. This setting means that *transitive packages* (dependencies of packages your project directly references) with known vulnerabilities now cause warnings to be reported. -If your project treats errors as warnings, this behavior can cause restore failures. +If your project treats warnings as errors, this behavior can cause restore failures. ## Version introduced diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 3d804e24526e5..6b4e9d80db1f6 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -4,6 +4,14 @@ items: - name: Breaking changes by version expanded: true items: + - name: .NET 10 + items: + - name: Overview + href: 10.0.md + - name: Core .NET libraries + items: + - name: API obsoletions with non-default diagnostic IDs + href: core-libraries/10.0/obsolete-apis.md - name: .NET 9 items: - name: Overview @@ -1302,6 +1310,10 @@ items: href: https://github.com/dotnet/dotnet-docker/discussions/3699 - name: Core .NET libraries items: + - name: .NET 10 + items: + - name: API obsoletions with non-default diagnostic IDs + href: core-libraries/10.0/obsolete-apis.md - name: .NET 9 items: - name: Adding a ZipArchiveEntry sets header general-purpose bit flags diff --git a/docs/core/diagnostics/dotnet-dsrouter.md b/docs/core/diagnostics/dotnet-dsrouter.md index d84b2dcd63bcd..19c6d2260fe60 100644 --- a/docs/core/diagnostics/dotnet-dsrouter.md +++ b/docs/core/diagnostics/dotnet-dsrouter.md @@ -263,6 +263,5 @@ If there's no need to collect a trace during application startup, it's possible ## See also -- [Android .NET Tracing](https://github.com/xamarin/xamarin-android/blob/d17-0/Documentation/guides/tracing.md) - [.NET MAUI Tracing](https://github.com/dotnet/maui/wiki/Profiling-.NET-MAUI-Apps) - [.NET Diagnostics Tracing on mobile](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md) diff --git a/docs/core/diagnostics/snippets/health-checks/health-checks.csproj b/docs/core/diagnostics/snippets/health-checks/health-checks.csproj index 66d9baec8251e..7a7d8a5defddd 100644 --- a/docs/core/diagnostics/snippets/health-checks/health-checks.csproj +++ b/docs/core/diagnostics/snippets/health-checks/health-checks.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/core/diagnostics/snippets/resource-monitoring/resource-monitoring.csproj b/docs/core/diagnostics/snippets/resource-monitoring/resource-monitoring.csproj index a15f95e597789..4842e768bba91 100644 --- a/docs/core/diagnostics/snippets/resource-monitoring/resource-monitoring.csproj +++ b/docs/core/diagnostics/snippets/resource-monitoring/resource-monitoring.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/ai/ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj b/docs/core/extensions/snippets/ai/ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj index be3d111984a25..472b50b4f76bb 100644 --- a/docs/core/extensions/snippets/ai/ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj +++ b/docs/core/extensions/snippets/ai/ConsoleAI.CacheResponses/ConsoleAI.CacheResponses.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/core/extensions/snippets/ai/ConsoleAI.CustomClientMiddle/ConsoleAI.CustomClientMiddle.csproj b/docs/core/extensions/snippets/ai/ConsoleAI.CustomClientMiddle/ConsoleAI.CustomClientMiddle.csproj index be4820d0ade34..f4296fe4b5cda 100644 --- a/docs/core/extensions/snippets/ai/ConsoleAI.CustomClientMiddle/ConsoleAI.CustomClientMiddle.csproj +++ b/docs/core/extensions/snippets/ai/ConsoleAI.CustomClientMiddle/ConsoleAI.CustomClientMiddle.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/core/extensions/snippets/ai/ConsoleAI.CustomEmbeddingsMiddle/ConsoleAI.CustomEmbeddingsMiddle.csproj b/docs/core/extensions/snippets/ai/ConsoleAI.CustomEmbeddingsMiddle/ConsoleAI.CustomEmbeddingsMiddle.csproj index 0f51adef5a2a3..dfd7ef5d1f522 100644 --- a/docs/core/extensions/snippets/ai/ConsoleAI.CustomEmbeddingsMiddle/ConsoleAI.CustomEmbeddingsMiddle.csproj +++ b/docs/core/extensions/snippets/ai/ConsoleAI.CustomEmbeddingsMiddle/ConsoleAI.CustomEmbeddingsMiddle.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj b/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj index a316541731032..51228f4e332aa 100644 --- a/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj +++ b/docs/core/extensions/snippets/configuration/console-custom-logging/console-custom-logging.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/console-di/console-di.csproj b/docs/core/extensions/snippets/configuration/console-di/console-di.csproj index 069e6bb9b9022..ce39cacc81bf9 100644 --- a/docs/core/extensions/snippets/configuration/console-di/console-di.csproj +++ b/docs/core/extensions/snippets/configuration/console-di/console-di.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj b/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj index 8ceaeb2af7ecd..5826be3fd2d02 100644 --- a/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj +++ b/docs/core/extensions/snippets/configuration/console-indexer/console-indexer.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj b/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj index 372e76475a9d1..ffb820d3e930f 100644 --- a/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj +++ b/docs/core/extensions/snippets/configuration/console-xml/console-xml.csproj @@ -23,9 +23,9 @@ - - - + + + diff --git a/docs/core/extensions/snippets/configuration/console/console.csproj b/docs/core/extensions/snippets/configuration/console/console.csproj index 234de0eac571c..66107ebc08681 100644 --- a/docs/core/extensions/snippets/configuration/console/console.csproj +++ b/docs/core/extensions/snippets/configuration/console/console.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/dependency-injection/dependency-injection.csproj b/docs/core/extensions/snippets/configuration/dependency-injection/dependency-injection.csproj index 54f1410305e30..c2e6c790f1237 100644 --- a/docs/core/extensions/snippets/configuration/dependency-injection/dependency-injection.csproj +++ b/docs/core/extensions/snippets/configuration/dependency-injection/dependency-injection.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/di-anti-patterns/di-anti-patterns.csproj b/docs/core/extensions/snippets/configuration/di-anti-patterns/di-anti-patterns.csproj index 416fe76c3937d..bd5c3c411cc65 100644 --- a/docs/core/extensions/snippets/configuration/di-anti-patterns/di-anti-patterns.csproj +++ b/docs/core/extensions/snippets/configuration/di-anti-patterns/di-anti-patterns.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/options-action/options-action.csproj b/docs/core/extensions/snippets/configuration/options-action/options-action.csproj index 28bbb86e66ebf..3e28b846983b4 100644 --- a/docs/core/extensions/snippets/configuration/options-action/options-action.csproj +++ b/docs/core/extensions/snippets/configuration/options-action/options-action.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj b/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj index 51db87db39ae0..97f895d425609 100644 --- a/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj +++ b/docs/core/extensions/snippets/configuration/options-postconfig/options-postconfig.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj b/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj index 703985c10e58f..085a38817c104 100644 --- a/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj +++ b/docs/core/extensions/snippets/configuration/worker-scope/worker-scope.csproj @@ -8,7 +8,7 @@ - - + + diff --git a/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj b/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj index cd43faafac711..a7ec54f2308f0 100644 --- a/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj +++ b/docs/core/extensions/snippets/configuration/worker-service/worker-service.csproj @@ -9,7 +9,7 @@ - - + + diff --git a/docs/core/extensions/snippets/localization/example/example.csproj b/docs/core/extensions/snippets/localization/example/example.csproj index 2d534564f8144..d56d1dca70ec8 100644 --- a/docs/core/extensions/snippets/localization/example/example.csproj +++ b/docs/core/extensions/snippets/localization/example/example.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/core/extensions/snippets/workers/timer-service/App.TimerHostedService.csproj b/docs/core/extensions/snippets/workers/timer-service/App.TimerHostedService.csproj index f01423ed92920..cb58c9731ee3f 100644 --- a/docs/core/extensions/snippets/workers/timer-service/App.TimerHostedService.csproj +++ b/docs/core/extensions/snippets/workers/timer-service/App.TimerHostedService.csproj @@ -8,6 +8,6 @@ - + diff --git a/docs/core/resilience/snippets/http-resilience/http-resilience.csproj b/docs/core/resilience/snippets/http-resilience/http-resilience.csproj index ec467dee36e37..852ce7f30e9c7 100644 --- a/docs/core/resilience/snippets/http-resilience/http-resilience.csproj +++ b/docs/core/resilience/snippets/http-resilience/http-resilience.csproj @@ -18,9 +18,9 @@ - - - + + + diff --git a/docs/core/testing/index.md b/docs/core/testing/index.md index 3d01b5f736073..221dc0ca560af 100644 --- a/docs/core/testing/index.md +++ b/docs/core/testing/index.md @@ -39,7 +39,7 @@ Keep in mind there are [best practices](unit-testing-best-practices.md) for writ ### xUnit -[xUnit](https://xunit.net) is a free, open-source, community-focused unit testing tool for .NET. The original inventor of NUnit v2 wrote xUnit.net. xUnit.net is the latest technology for unit testing .NET apps. It also works with ReSharper, CodeRush, TestDriven.NET, and [Xamarin](https://dotnet.microsoft.com/apps/xamarin). xUnit.net is a project of the [.NET Foundation](https://dotnetfoundation.org) and operates under its code of conduct. +[xUnit](https://xunit.net) is a free, open-source, community-focused unit testing tool for .NET. The original inventor of NUnit v2 wrote xUnit.net. xUnit.net is the latest technology for unit testing .NET apps. It also works with ReSharper, CodeRush, and TestDriven.NET. xUnit.net is a project of the [.NET Foundation](https://dotnetfoundation.org) and operates under its code of conduct. For more information, see the following resources: diff --git a/docs/core/whats-new/dotnet-core-2-0.md b/docs/core/whats-new/dotnet-core-2-0.md index a0e3fb6dddc6a..8ccf6ff535da7 100644 --- a/docs/core/whats-new/dotnet-core-2-0.md +++ b/docs/core/whats-new/dotnet-core-2-0.md @@ -150,7 +150,6 @@ You can now install the .NET Core SDK independently of Visual Studio. This makes - [Microservices and Docker containers](../../architecture/microservices/index.md) - [Web applications with ASP.NET](../../architecture/modern-web-apps-azure/index.md) -- [Mobile applications with Xamarin](/xamarin/xamarin-forms/enterprise-application-patterns/index) - [Applications that are deployed to the Cloud with Azure](/azure/architecture/reference-architectures/index) ## See also diff --git a/docs/core/whats-new/snippets/dotnet-8/csharp/ConsoleApp/Project.csproj b/docs/core/whats-new/snippets/dotnet-8/csharp/ConsoleApp/Project.csproj index 346db5a69f871..4c674177b2c40 100644 --- a/docs/core/whats-new/snippets/dotnet-8/csharp/ConsoleApp/Project.csproj +++ b/docs/core/whats-new/snippets/dotnet-8/csharp/ConsoleApp/Project.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/docs/core/whats-new/snippets/dotnet-9/csharp/Project.csproj b/docs/core/whats-new/snippets/dotnet-9/csharp/Project.csproj index 708e4f77c26ce..e546010dd94f6 100644 --- a/docs/core/whats-new/snippets/dotnet-9/csharp/Project.csproj +++ b/docs/core/whats-new/snippets/dotnet-9/csharp/Project.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/DotNet.GitHubAction.csproj b/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/DotNet.GitHubAction.csproj index bce3a9c32ca2f..7729794095b63 100644 --- a/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/DotNet.GitHubAction.csproj +++ b/docs/devops/snippets/create-dotnet-github-action/DotNet.GitHubAction/DotNet.GitHubAction.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/docs/fsharp/language-reference/namespaces.md b/docs/fsharp/language-reference/namespaces.md index ebf2db0057868..01ccc83788ff4 100644 --- a/docs/fsharp/language-reference/namespaces.md +++ b/docs/fsharp/language-reference/namespaces.md @@ -82,16 +82,16 @@ type PeelState = Peeled | Unpeeled // This exception depends on the type below. exception DontSqueezeTheBananaException of Banana -type Banana(orientation : Orientation) = +type Banana(orientation: Orientation) = member val IsPeeled = false with get, set member val Orientation = orientation with get, set - member val Sides: PeelState list = [ Unpeeled; Unpeeled; Unpeeled; Unpeeled] with get, set + member val Sides: PeelState list = [Unpeeled; Unpeeled; Unpeeled; Unpeeled] with get, set member self.Peel() = BananaHelpers.peel self // Note the dependency on the BananaHelpers module. member self.SqueezeJuiceOut() = raise (DontSqueezeTheBananaException self) // This member depends on the exception above. module BananaHelpers = - let peel (b: Banana) = + let peel (banana: Banana) = let flip (banana: Banana) = match banana.Orientation with | Up -> @@ -99,15 +99,17 @@ module BananaHelpers = banana | Down -> banana + // Update the peel state for all sides of the banana. let peelSides (banana: Banana) = banana.Sides |> List.map (function | Unpeeled -> Peeled | Peeled -> Peeled) - match b.Orientation with - | Up -> b |> flip |> peelSides - | Down -> b |> peelSides + // Apply the flipping and peeling logic based on the orientation. + match banana.Orientation with + | Up -> banana |> flip |> peelSides + | Down -> banana |> peelSides ``` Note that the exception `DontSqueezeTheBananaException` and the class `Banana` both refer to each other. Additionally, the module `BananaHelpers` and the class `Banana` also refer to each other. This wouldn't be possible to express in F# if you removed the `rec` keyword from the `MutualReferences` namespace. diff --git a/docs/fsharp/tools/fsharp-interactive/index.md b/docs/fsharp/tools/fsharp-interactive/index.md index dd30cb2813832..931a6608b883e 100644 --- a/docs/fsharp/tools/fsharp-interactive/index.md +++ b/docs/fsharp/tools/fsharp-interactive/index.md @@ -70,7 +70,7 @@ The code's formatting is preserved, and there is a double semicolon (`;;`) termi Evaluating code interactively in F# Interactive can be a great learning tool, but you'll quickly find that it's not as productive as writing code in a normal editor. To support normal code editing, you can write F# scripts. -Scripts use the file extension **.fsx**. 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. For example, consider the following script called `Script.fsx`: +Scripts use the file extension **.fsx**. 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, and F# Interactive reads the code and executes it in real time. For example, consider the following script called `Script.fsx`: ```fsharp let getOddSquares xs = @@ -88,6 +88,41 @@ dotnet fsi Script.fsx [1; 9; 25; 49; 81] ``` +### Executing Scripts with a Shebang + +To make F# scripts executable without explicitly invoking `dotnet fsi`, you can use a shebang line at the top of the script. This enables you to run the script directly from the terminal, like a shell script. + +For example, create a script file called `ExecutableScript.fsx` with the following content: + +```fsharp +#!/usr/bin/env -S dotnet fsi + +let getOddSquares xs = + xs + |> List.filter (fun x -> x % 2 <> 0) + |> List.map (fun x -> x * x) + +printfn "%A" (getOddSquares [1..10]) +``` + +1. **Make the Script Executable:** + Use the `chmod` command to make the script executable: + + ```bash + chmod +x ExecutableScript.fsx + ``` + +2. **Run the Script Directly:** + Now, you can execute the script directly from the terminal: + + ```bash + ./ExecutableScript.fsx + ``` + +> **Note**: Shebang functionality (`#!`) is specific to Unix-like systems such as Linux and MacOS. On Windows, you can execute scripts using `dotnet fsi Script.fsx` directly in the terminal or command prompt. + +This feature allows for a more seamless experience when working with F# scripts in environments like Linux and macOS. + F# scripting is natively supported in [Visual Studio](../../get-started/get-started-visual-studio.md) and [Visual Studio Code](../../get-started/get-started-vscode.md). ## Referencing packages in F# Interactive diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2024.md b/docs/fundamentals/code-analysis/quality-rules/ca2024.md new file mode 100644 index 0000000000000..83a889f5bc2e3 --- /dev/null +++ b/docs/fundamentals/code-analysis/quality-rules/ca2024.md @@ -0,0 +1,107 @@ +--- +title: "CA2024: Do not use StreamReader.EndOfStream in async methods" +description: "Learn about code analysis rule CA2024 - Do not use StreamReader.EndOfStream in async methods" +ms.date: 01/16/2025 +ms.topic: reference +f1_keywords: + - CA2024 + - DoNotUseEndOfStreamInAsyncMethodsAnalyzer +helpviewer_keywords: + - CA2024 +author: mpidash +dev_langs: +- CSharp +- VB +--- + +# CA2024: Do not use StreamReader.EndOfStream in async methods + +| Property | Value | +|-------------------------------------|------------------------------------------------------| +| **Rule ID** | CA2024 | +| **Title** | Do not use StreamReader.EndOfStream in async methods | +| **Category** | [Reliability](reliability-warnings.md) | +| **Fix is breaking or non-breaking** | Non-breaking | +| **Enabled by default in .NET 10** | As warning | + +## Cause + +A call to is made inside an async method. + +## Rule description + +The property can cause unintended synchronous blocking when no data is buffered. Instead, use directly, which returns `null` when reaching the end of the stream. + +## How to fix violations + +To fix a violation, directly call and check the return value for `null`. + +## Example + +The following code snippet shows a violation of CA2024: + +```csharp +public async Task Example(StreamReader streamReader) +{ + while (!streamReader.EndOfStream) + { + string? line = await streamReader.ReadLineAsync(); + // Do something with line. + } +} +``` + +```vb +Public Async Function Example(streamReader As StreamReader) As Task + While Not streamReader.EndOfStream + Dim line As String = Await streamReader.ReadLineAsync() + ' Do something with line. + End While +End Function +``` + +The following code snippet fixes the violation: + +```csharp +public async Task Example(StreamReader streamReader) +{ + string? line; + while ((line = await streamReader.ReadLineAsync()) is not null) + { + // Do something with line. + } +} +``` + +```vb +Public Async Function Example(streamReader As StreamReader) As Task + Dim line As String = Await streamReader.ReadLineAsync() + While line IsNot Nothing + ' Do something with line. + line = Await streamReader.ReadLineAsync() + End While +End Function +``` + +## When to suppress warnings + +You shouldn't suppress warnings from this rule, as your app might hang if you don't fix the violations. + +## Suppress a warning + +If you just want to suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule. + +```csharp +#pragma warning disable CA2024 +// The code that's violating the rule is on this line. +#pragma warning restore CA2024 +``` + +To disable the rule for a file, folder, or project, set its severity to `none` in the [configuration file](../configuration-files.md). + +```ini +[*.{cs,vb}] +dotnet_diagnostic.CA2024.severity = none +``` + +For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). diff --git a/docs/fundamentals/code-analysis/quality-rules/index.md b/docs/fundamentals/code-analysis/quality-rules/index.md index 67a16fb26a64c..9ca888949c314 100644 --- a/docs/fundamentals/code-analysis/quality-rules/index.md +++ b/docs/fundamentals/code-analysis/quality-rules/index.md @@ -189,6 +189,7 @@ The following table lists code quality analysis rules. > | [CA2020: Prevent behavioral change caused by built-in operators of IntPtr/UIntPtr](ca2020.md) | Some built-in operators added in .NET 7 behave differently than the user-defined operators in .NET 6 and earlier versions. Some operators that used to throw in unchecked context while overflowing don't throw anymore unless wrapped within checked context. Some operators that previously didn't throw in checked context now throw unless wrapped within unchecked context. | > | [CA2021: Don't call Enumerable.Cast\ or Enumerable.OfType\ with incompatible types](ca2021.md) | A call to or specifies a type parameter that's incompatible with the type of the input collection. | > | [CA2022: Avoid inexact read with Stream.Read](ca2022.md) | A call to `Stream.Read` might return fewer bytes than requested, resulting in unreliable code if the return value isn't checked. | +> | [CA2024: Do not use StreamReader.EndOfStream in async methods](ca2024.md) | The property can cause unintended synchronous blocking when no data is buffered. Instead, use directly, which returns `null` when reaching the end of the stream. | > | [CA2100: Review SQL queries for security vulnerabilities](ca2100.md) | A method sets the System.Data.IDbCommand.CommandText property by using a string that is built from a string argument to the method. This rule assumes that the string argument contains user input. A SQL command string that is built from user input is vulnerable to SQL injection attacks. | > | [CA2101: Specify marshalling for P/Invoke string arguments](ca2101.md) | A platform invoke member allows partially trusted callers, has a string parameter, and does not explicitly marshal the string. This can cause a potential security vulnerability. | > | [CA2109: Review visible event handlers](ca2109.md) | A public or protected event-handling method was detected. Event-handling methods should not be exposed unless absolutely necessary. | diff --git a/docs/fundamentals/code-analysis/quality-rules/reliability-warnings.md b/docs/fundamentals/code-analysis/quality-rules/reliability-warnings.md index 19400284ef2b3..4104f7ec1c4c7 100644 --- a/docs/fundamentals/code-analysis/quality-rules/reliability-warnings.md +++ b/docs/fundamentals/code-analysis/quality-rules/reliability-warnings.md @@ -33,3 +33,5 @@ Reliability rules support library and application reliability, such as correct m | [CA2019: `ThreadStatic` fields should not use inline initialization](ca2019.md) | A field that's annotated with is initialized inline or explicitly in a `static` (`Shared` in Visual Basic) constructor. | | [CA2020: Prevent behavioral change caused by built-in operators of IntPtr/UIntPtr](ca2020.md) | Some built-in operators added in .NET 7 behave differently than the user-defined operators in .NET 6 and earlier versions. Some operators that used to throw in unchecked context while overflowing don't throw anymore unless wrapped within checked context. Some operators that previously didn't throw in checked context now throw unless wrapped within unchecked context. | | [CA2021: Don't call Enumerable.Cast\ or Enumerable.OfType\ with incompatible types](ca2021.md) | A call to or specifies a type parameter that's incompatible with the type of the input collection. | +| [CA2022: Avoid inexact read with Stream.Read](ca2022.md) | A call to `Stream.Read` might return fewer bytes than requested, resulting in unreliable code if the return value isn't checked. | +| [CA2024: Do not use StreamReader.EndOfStream in async methods](ca2024.md) | The property can cause unintended synchronous blocking when no data is buffered. Instead, use directly, which returns `null` when reaching the end of the stream. | diff --git a/docs/fundamentals/implementations.md b/docs/fundamentals/implementations.md index fc85a575fae76..f7b59b7e803cf 100644 --- a/docs/fundamentals/implementations.md +++ b/docs/fundamentals/implementations.md @@ -44,7 +44,7 @@ For more information, see the [.NET Framework guide](../framework/index.yml). ## Mono -Mono is a .NET implementation that is mainly used when a small runtime is required. It is the runtime that powers Xamarin applications on Android, macOS, iOS, tvOS, and watchOS and is focused primarily on a small footprint. Mono also powers games built using the Unity engine. +Mono is a .NET implementation that is mainly used when a small runtime is required. It is the runtime that powered Xamarin applications (now unsupported) on Android, macOS, iOS, tvOS, and watchOS and is focused primarily on a small footprint. Mono also powers games built using the Unity engine. It supports all of the currently published .NET Standard versions. diff --git a/docs/fundamentals/runtime-libraries/system-net-http-httpclient.md b/docs/fundamentals/runtime-libraries/system-net-http-httpclient.md index f38aaf91a2a7d..cf20a5f515fe0 100644 --- a/docs/fundamentals/runtime-libraries/system-net-http-httpclient.md +++ b/docs/fundamentals/runtime-libraries/system-net-http-httpclient.md @@ -52,9 +52,6 @@ On each platform, tries to use the best availa | Windows/Mono | | | Windows/UWP | Windows native (HTTP 2.0 capable) | | Windows/.NET Core 1.0-2.0 | Windows native (HTTP 2.0 capable) | -| Android/Xamarin | Selected at build-time. Can either use or be configured to use Android's native [`HttpURLConnection`](https://developer.xamarin.com/api/type/Java.Net.HttpURLConnection/) | -| iOS, tvOS, watchOS/Xamarin | Selected at build-time. Can either use or be configured to use Apple's [`NSUrlSession`](https://developer.xamarin.com/api/type/MonoTouch.Foundation.NSUrlSession/) (HTTP 2.0 capable) | -| macOS/Xamarin | Selected at build-time. Can either use or be configured to use Apple's [`NSUrlSession`](https://developer.xamarin.com/api/type/MonoTouch.Foundation.NSUrlSession/) (HTTP 2.0 capable) | | macOS/Mono | | | macOS/.NET Core 1.0-2.0 | `libcurl`-based HTTP transport (HTTP 2.0 capable) | | Linux/Mono | | diff --git a/docs/fundamentals/syslib-diagnostics/obsoletions-overview.md b/docs/fundamentals/syslib-diagnostics/obsoletions-overview.md index 4b6eef5a77a24..b7ca9e2eef5c1 100644 --- a/docs/fundamentals/syslib-diagnostics/obsoletions-overview.md +++ b/docs/fundamentals/syslib-diagnostics/obsoletions-overview.md @@ -2,7 +2,7 @@ title: Obsolete features in .NET 5+ titleSuffix: "" description: Learn about APIs that are marked as obsolete in .NET 5 and later versions that produce SYSLIB compiler warnings. -ms.date: 08/07/2024 +ms.date: 01/14/2025 --- # Obsolete features in .NET 5+ @@ -78,6 +78,8 @@ The following table provides an index to the `SYSLIB0XXX` obsoletions in .NET 5+ | [SYSLIB0055](syslib0055.md) | Warning | `AdvSimd.ShiftRightLogicalRoundedNarrowingSaturate*` methods with signed parameters are obsolete. Use the unsigned overloads instead. | | [SYSLIB0056](syslib0056.md) | Warning | `Assembly.LoadFrom` with a custom `AssemblyHashAlgorithm` is obsolete. Use overloads without an `AssemblyHashAlgorithm`. | | [SYSLIB0057](syslib0057.md) | Warning | `X509Certificate2` and `X509Certificate` constructors for binary and file content are obsolete. | +| SYSLIB0058 | Warning | The `KeyExchangeAlgorithm`, `KeyExchangeStrength`, `CipherAlgorithm`, `CipherAlgorithmStrength`, `HashAlgorithm`, and `HashStrength` properties of are obsolete. Use instead. | +| [SYSLIB0059](syslib0059.md) | Warning | callbacks aren't run before the process exits. Use instead. | ## Suppress warnings diff --git a/docs/fundamentals/syslib-diagnostics/syslib0059.md b/docs/fundamentals/syslib-diagnostics/syslib0059.md new file mode 100644 index 0000000000000..a0aa4cb0af9a1 --- /dev/null +++ b/docs/fundamentals/syslib-diagnostics/syslib0059.md @@ -0,0 +1,48 @@ +--- +title: SYSLIB0059 warning - SystemEvents.EventsThreadShutdown callbacks aren't run before the process exits +description: Learn about the obsoletion of SystemEvents.EventsThreadShutdown that generates compile-time warning SYSLIB0059. +ms.date: 08/01/2024 +f1_keywords: + - SYSLIB0059 +--- +# SYSLIB0059: SystemEvents.EventsThreadShutdown callbacks aren't run before the process exits + +The event is obsolete, starting in .NET 10. Referencing this event in code generates warning `SYSLIB0059` at compile time. + +## Reason for obsoletion + +The previous shutdown handling in could block the finalizer thread during app shutdown. To avoid blocking the finalizer thread, no longer has shutdown handling, which means that the event is no longer called. To surface this behavior change, the event was marked obsolete. + +## Workaround + +Use instead. + +## Suppress a warning + +If you must use the obsolete API, you can suppress the warning in code or in your project file. + +To suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the warning. + +```csharp +// Disable the warning. +#pragma warning disable SYSLIB0059 + +// Code that uses obsolete API. +// ... + +// Re-enable the warning. +#pragma warning restore SYSLIB0059 +``` + +To suppress all the `SYSLIB0059` warnings in your project, add a `` property to your project file. + +```xml + + + ... + $(NoWarn);SYSLIB0059 + + +``` + +For more information, see [Suppress warnings](obsoletions-overview.md#suppress-warnings). diff --git a/docs/index.yml b/docs/index.yml index bd76746e1555a..2199bf156c660 100644 --- a/docs/index.yml +++ b/docs/index.yml @@ -265,14 +265,6 @@ additionalContent: links: - url: /dotnet/maui text: .NET Multi-platform App UI (.NET MAUI) - - url: /xamarin/xamarin-forms - text: Xamarin.Forms - - url: /xamarin/ios - text: Xamarin.iOS - - url: /xamarin/android - text: Xamarin.Android - - url: /azure/developer/mobile-apps - text: Develop Xamarin apps with Azure # Card - title: Desktop links: @@ -288,8 +280,6 @@ additionalContent: text: Windows Forms (.NET Framework) - url: /dotnet/maui text: .NET Multi-platform App UI (.NET MAUI) - - url: /xamarin/mac - text: Xamarin for macOS # Card - title: Microservices links: diff --git a/docs/navigate/data-access/toc.yml b/docs/navigate/data-access/toc.yml index 7e1517098c22d..e61d9e961b3bc 100644 --- a/docs/navigate/data-access/toc.yml +++ b/docs/navigate/data-access/toc.yml @@ -705,8 +705,6 @@ items: href: ../../standard/data/sqlite/dapper-limitations.md - name: System.Data.SQLite href: ../../standard/data/sqlite/compare.md - - name: Xamarin - href: ../../standard/data/sqlite/xamarin.md - name: Supplemental API remarks for System.Data types items: - name: CommandBehavior enum diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml index 33f7ed0c9aa30..413e1b7ab298a 100644 --- a/docs/navigate/tools-diagnostics/toc.yml +++ b/docs/navigate/tools-diagnostics/toc.yml @@ -1147,6 +1147,8 @@ items: href: ../../fundamentals/code-analysis/quality-rules/ca2021.md - name: CA2022 href: ../../fundamentals/code-analysis/quality-rules/ca2022.md + - name: CA2024 + href: ../../fundamentals/code-analysis/quality-rules/ca2024.md - name: Security rules items: - name: Overview @@ -1816,6 +1818,8 @@ items: href: ../../fundamentals/syslib-diagnostics/syslib0056.md - name: SYSLIB0057 href: ../../fundamentals/syslib-diagnostics/syslib0057.md + - name: SYSLIB0059 + href: ../../fundamentals/syslib-diagnostics/syslib0059.md - name: Experimental features items: - name: Overview @@ -1823,7 +1827,6 @@ items: href: ../../fundamentals/syslib-diagnostics/experimental-overview.md - name: SYSLIB5003 href: ../../fundamentals/syslib-diagnostics/syslib5003.md - displayProperty: syslib5003 - name: Source-generated code items: - name: Overview diff --git a/docs/orleans/grains/snippets/transactions/Client/Client.csproj b/docs/orleans/grains/snippets/transactions/Client/Client.csproj index 0adfb6c4178cb..b5710a2dda1cc 100644 --- a/docs/orleans/grains/snippets/transactions/Client/Client.csproj +++ b/docs/orleans/grains/snippets/transactions/Client/Client.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/orleans/grains/snippets/transactions/Server/Server.csproj b/docs/orleans/grains/snippets/transactions/Server/Server.csproj index ca030b3b53513..192c71ebebf67 100644 --- a/docs/orleans/grains/snippets/transactions/Server/Server.csproj +++ b/docs/orleans/grains/snippets/transactions/Server/Server.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client/BroadcastChannel.Client.csproj b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client/BroadcastChannel.Client.csproj index 0939705df0dbb..b1ec675b7bf7e 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client/BroadcastChannel.Client.csproj +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Client/BroadcastChannel.Client.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj index 2fd8a9de00860..98751415f69c9 100644 --- a/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj +++ b/docs/orleans/streaming/snippets/broadcastchannel/BroadcastChannel.Silo/BroadcastChannel.Silo.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/Client/Client.csproj b/docs/orleans/tutorials-and-samples/snippets/minimal/Client/Client.csproj index a91ec6e988c53..4eb6e79f14bb4 100644 --- a/docs/orleans/tutorials-and-samples/snippets/minimal/Client/Client.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/Client/Client.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/GrainInterfaces/GrainInterfaces.csproj b/docs/orleans/tutorials-and-samples/snippets/minimal/GrainInterfaces/GrainInterfaces.csproj index e4737fc7196b3..c93f17f2e95b6 100644 --- a/docs/orleans/tutorials-and-samples/snippets/minimal/GrainInterfaces/GrainInterfaces.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/GrainInterfaces/GrainInterfaces.csproj @@ -7,7 +7,7 @@ - + diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/Grains/Grains.csproj b/docs/orleans/tutorials-and-samples/snippets/minimal/Grains/Grains.csproj index 41fb6c473318c..0b21c74565214 100644 --- a/docs/orleans/tutorials-and-samples/snippets/minimal/Grains/Grains.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/Grains/Grains.csproj @@ -8,7 +8,7 @@ - + diff --git a/docs/orleans/tutorials-and-samples/snippets/minimal/Silo/Silo.csproj b/docs/orleans/tutorials-and-samples/snippets/minimal/Silo/Silo.csproj index 5aa0c768fc176..b40b82131d75f 100644 --- a/docs/orleans/tutorials-and-samples/snippets/minimal/Silo/Silo.csproj +++ b/docs/orleans/tutorials-and-samples/snippets/minimal/Silo/Silo.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/docs/standard/analyzers/platform-compat-analyzer.md b/docs/standard/analyzers/platform-compat-analyzer.md index 78cbe801d68f0..3c4c71d622776 100644 --- a/docs/standard/analyzers/platform-compat-analyzer.md +++ b/docs/standard/analyzers/platform-compat-analyzer.md @@ -7,18 +7,18 @@ ms.date: 09/20/2021 # Platform compatibility analyzer -You've probably heard the motto of "One .NET": a single, unified platform for building any type of application. The .NET 5 SDK includes ASP.NET Core, Entity Framework Core, WinForms, WPF, Xamarin, and ML.NET, and will add support for more platforms over time. .NET 5 strives to provide an experience where you don't have to reason about the different flavors of .NET, but doesn't attempt to fully abstract away the underlying operating system (OS). You'll continue to be able to call platform-specific APIs, for example, P/Invokes, WinRT, or the Xamarin bindings for iOS and Android. +You've probably heard the motto of "One .NET": a single, unified platform for building any type of application. The .NET SDK includes ASP.NET Core, Entity Framework Core, Windows Forms, WPF, and ML.NET, and will add support for more platforms over time. .NET 5+ strives to provide an experience where you don't have to reason about the different flavors of .NET, but doesn't attempt to fully abstract away the underlying operating system (OS). You'll continue to be able to call platform-specific APIs, for example, P/Invokes and WinRT. -But using platform-specific APIs on a component means the code no longer works across all platforms. We needed a way to detect this at design time so developers get diagnostics when they inadvertently use platform-specific APIs. To achieve this goal, .NET 5 introduces the [platform compatibility analyzer](../../fundamentals/code-analysis/quality-rules/ca1416.md) and complementary APIs to help developers identify and use platform-specific APIs where appropriate. +But using platform-specific APIs on a component means the code no longer works across all platforms. We needed a way to detect this at design time so developers get diagnostics when they inadvertently use platform-specific APIs. To achieve this goal, .NET 5 introduced the [platform compatibility analyzer](../../fundamentals/code-analysis/quality-rules/ca1416.md) and complementary APIs to help developers identify and use platform-specific APIs where appropriate. -The new APIs include: +The complementary APIs include: - to annotate APIs as being platform-specific and to annotate APIs as being unsupported on a particular OS. These attributes can optionally include the version number, and have already been applied to some platform-specific APIs in the core .NET libraries. - `Is()` and `IsVersionAtLeast(int major, int minor = 0, int build = 0, int revision = 0)` static methods in the class for safely calling platform-specific APIs. For example, can be used to guard a call to a Windows-specific API, and () can be used to guard a versioned Windows-specific API call. See these [examples](#guard-platform-specific-apis-with-guard-methods) of how these methods can be used as guards of platform-specific API references. ## Prerequisites -The platform compatibility analyzer is one of the Roslyn code quality analyzers. Starting in .NET 5, these analyzers are [included with the .NET SDK](../../fundamentals/code-analysis/overview.md). The platform compatibility analyzer is enabled by default only for projects that target `net5.0` or a later version. However, you can [enable it](../../fundamentals/code-analysis/quality-rules/ca1416.md#configure-code-to-analyze) for projects that target other frameworks. +The platform compatibility analyzer is one of the Roslyn code quality analyzers. These analyzers are [included with the .NET SDK](../../fundamentals/code-analysis/overview.md). The platform compatibility analyzer is enabled by default only for projects that target `net5.0` or a later version. However, you can [enable it](../../fundamentals/code-analysis/quality-rules/ca1416.md#configure-code-to-analyze) for projects that target other frameworks. ## How the analyzer determines platform dependency @@ -60,7 +60,7 @@ The analyzer does not check target framework moniker (TFM) target platforms from ### Platform inclusion -.NET 6 introduces the concept of *platform inclusion*, where one platform can be a subset of another platform. An annotation for the subset platform implies the same support (or lack thereof) for the superset platform. If a platform check method in the type has a `SupportedOSPlatformGuard("supersetPlatform")]` attribute, then `supersetPlatform` is considered a superset of the OS platform that the method checks for. +.NET 6 introduced the concept of *platform inclusion*, where one platform can be a subset of another platform. An annotation for the subset platform implies the same support (or lack thereof) for the superset platform. If a platform check method in the type has a `SupportedOSPlatformGuard("supersetPlatform")]` attribute, then `supersetPlatform` is considered a superset of the OS platform that the method checks for. For example, the method is attributed `[SupportedOSPlatformGuard("MacCatalyst")]`. Therefore, the following statements apply: @@ -81,7 +81,7 @@ Consider the following coverage matrix, where ✔️ indicates that the platform The following code snippet shows how you can combine attributes to set the right level of support. ```csharp - // MacCatalyst is a superset of iOS therefore supported on iOS and MacCatalyst + // MacCatalyst is a superset of iOS therefore supported on iOS and MacCatalyst [SupportedOSPlatform("iOS")] public void ApiOnlySupportedOnIOSAndMacCatalyst() { } @@ -89,11 +89,11 @@ The following code snippet shows how you can combine attributes to set the right [SupportedOSPlatform("MacCatalyst")] public void ApiOnlySupportedOnMacCatalyst() { } - [SupportedOSPlatform("iOS")] // Supported on iOS and MacCatalyst + [SupportedOSPlatform("iOS")] // Supported on iOS and MacCatalyst [UnsupportedOSPlatform("MacCatalyst")] // Removes implied MacCatalyst support public void ApiOnlySupportedOnIos() { } - // Unsupported on iOS and MacCatalyst + // Unsupported on iOS and MacCatalyst [UnsupportedOSPlatform("iOS")] public void ApiUnsupportedOnIOSAndMacCatalyst(); @@ -101,7 +101,7 @@ The following code snippet shows how you can combine attributes to set the right [UnsupportedOSPlatform("MacCatalyst")] public void ApiUnsupportedOnMacCatalyst() { } - [UnsupportedOSPlatform("iOS")] // Unsupported on iOS and MacCatalyst + [UnsupportedOSPlatform("iOS")] // Unsupported on iOS and MacCatalyst [SupportedOSPlatform("MacCatalyst")] // Removes implied MacCatalyst unsupportedness public void ApiUnsupportedOnIos() { } ``` diff --git a/docs/standard/analyzers/portability-analyzer.md b/docs/standard/analyzers/portability-analyzer.md index 4c05b26763fd2..2a5074040b4ae 100644 --- a/docs/standard/analyzers/portability-analyzer.md +++ b/docs/standard/analyzers/portability-analyzer.md @@ -1,6 +1,6 @@ --- title: The .NET Portability Analyzer - .NET -description: Learn how to use the .NET Portability Analyzer tool to evaluate how portable your code is among the various .NET implementations, including .NET Core, .NET Standard, UWP, and Xamarin. +description: Learn how to use the .NET Portability Analyzer tool to evaluate how portable your code is among the various .NET implementations, including .NET Core, .NET Standard, and UWP. ms.date: 04/22/2022 ms.assetid: 0375250f-5704-4993-a6d5-e21c499cea1e --- diff --git a/docs/standard/class-libraries.md b/docs/standard/class-libraries.md index a4c728201f01e..d04ec683730a0 100644 --- a/docs/standard/class-libraries.md +++ b/docs/standard/class-libraries.md @@ -11,7 +11,7 @@ Class libraries are the [shared library](https://en.wikipedia.org/wiki/Library_% There are three types of class libraries that you can use: -* **Platform-specific** class libraries have access to all the APIs in a given platform (for example, .NET Framework on Windows, Xamarin iOS), but can only be used by apps and libraries that target that platform. +* **Platform-specific** class libraries have access to all the APIs in a given platform (for example, .NET Framework on Windows), but can only be used by apps and libraries that target that platform. * **Portable** class libraries have access to a subset of APIs, and can be used by apps and libraries that target multiple platforms. * **.NET Standard** class libraries are a merger of the platform-specific and portable library concept into a single model that provides the best of both. diff --git a/docs/standard/data/sqlite/xamarin.md b/docs/standard/data/sqlite/xamarin.md deleted file mode 100644 index 5c6000c342e0a..0000000000000 --- a/docs/standard/data/sqlite/xamarin.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: Xamarin limitations -ms.date: 12/13/2019 -description: Describes some of the limitations you will encounter when using Xamarin. ---- -# Xamarin limitations - -Microsoft.Data.Sqlite targets .NET Standard 2.0 and is supported on Xamarin. The following table shows which platforms the default SQLitePCLRaw bundle provides native SQLite binaries for. See [Custom SQLite versions](custom-versions.md) for details on using a different bundle or providing your own native SQLite binaries. - -| Platform | SQLite binaries | -| --- | --- | -| **Xamarin.Android** | — | -|     `arm64-v8a` | ✔ | -|     `armeabi-v7a` | ✔ | -|     `x86` | ✔ | -|     `x86_64` | ✔ | -| **Xamarin.iOS** | ✔ | -| **Xamarin.Mac** | ✔ | -| **Xamarin.TVOS** | ✔ | -| **UWP** | — | -|     `arm` | ✔ | -|     `arm64` | ✔ | -|     `x64` | ✔ | -|     `x86` | ✔ | - -## iOS - -Microsoft.Data.Sqlite tries to automatically initialize SQLitePCLRaw bundles. Unfortunately, because of limitations in the ahead-of-time (AOT) compilation for Xamarin.iOS, the attempt fails and you get the following error. - -> You need to call `SQLitePCL.raw.SetProvider()`. If you're using a bundle package, this is done by calling `SQLitePCL.Batteries.Init()`. - -To initialize the bundle, add the following line of code to your app before using Microsoft.Data.Sqlite. - -```csharp -SQLitePCL.Batteries_V2.Init(); -``` - -## See also - -* [Async limitations](async.md) -* [Custom SQLite versions](custom-versions.md) diff --git a/docs/standard/frameworks.md b/docs/standard/frameworks.md index dd3ad3ef99fa6..9a3d0032a5cc9 100644 --- a/docs/standard/frameworks.md +++ b/docs/standard/frameworks.md @@ -14,7 +14,7 @@ When you target a framework in an app or library, you're specifying the set of A An app or library can target a version of [.NET Standard](net-standard.md). .NET Standard versions represent standardized sets of APIs across all .NET implementations. For example, a library can target .NET Standard 1.6 and gain access to APIs that function across .NET Core and .NET Framework using the same codebase. -An app or library can also target a specific .NET implementation to gain access to implementation-specific APIs. For example, an app that targets Xamarin.iOS (for example, `Xamarin.iOS10`) has access to Xamarin-provided iOS API wrappers for iOS 10, or an app that targets Universal Windows Platform (UWP, `uap10.0`) has access to APIs that compile for devices that run Windows 10. +An app or library can also target a specific .NET implementation to gain access to implementation-specific APIs. For example, an app that targets Universal Windows Platform (UWP, `uap10.0`) has access to APIs that compile for devices that run Windows 10. For some target frameworks, such as .NET Framework, the APIs are defined by the assemblies that the framework installs on a system and may include application framework APIs (for example, ASP.NET). @@ -103,7 +103,7 @@ Use these guidelines to determine which TFM to use in your app: - Apps that are portable to multiple platforms should target a base TFM, for example, `net9.0`. This includes most libraries but also ASP.NET Core and Entity Framework. - Platform-specific libraries should target platform-specific flavors. For example, WinForms and WPF projects should target `net9.0-windows`. -- Cross-platform application models (Xamarin Forms, ASP.NET Core) and bridge packs (Xamarin Essentials) should at least target the base TFM, for example, `net9.0`, but might also target additional platform-specific flavors to light-up more APIs or features. +- Cross-platform application models (for example, ASP.NET Core) should at least target the base TFM, for example, `net9.0`, but might also target additional platform-specific flavors to light-up more APIs or features. #### OS version in TFMs diff --git a/docs/standard/get-started.md b/docs/standard/get-started.md index 0e9aa845ab0d0..b0d9e06008d6d 100644 --- a/docs/standard/get-started.md +++ b/docs/standard/get-started.md @@ -19,7 +19,7 @@ The following step-by-step tutorials run on Windows, Linux, or macOS, except as * [Create a remote procedure call web app](/aspnet/core/tutorials/grpc/grpc-start) * [Create a real-time web app](/aspnet/core/tutorials/signalr) * [Create a serverless function in the cloud](/azure/azure-functions/functions-create-first-function-vs-code?pivots=programming-language-csharp) -* [Create a mobile app for Android and iOS](https://dotnet.microsoft.com/learn/xamarin/hello-world-tutorial/intro) (Windows) +* [Build your first multi-platform app using .NET MAUI](https://dotnet.microsoft.com/learn/maui/first-app-tutorial/intro) * Create a Windows desktop app * [WPF](/visualstudio/get-started/csharp/tutorial-wpf) * [Windows Forms](/visualstudio/ide/create-csharp-winform-visual-studio) diff --git a/docs/standard/glossary.md b/docs/standard/glossary.md index c86628f00355e..aaa534e3bae9d 100644 --- a/docs/standard/glossary.md +++ b/docs/standard/glossary.md @@ -171,7 +171,7 @@ The words library and [framework](#framework) are often used synonymously. ## Mono -An open source, [cross-platform](#cross-platform) [.NET implementation](#implementation-of-net) that's used when a small runtime is required. It's the runtime that powers Xamarin applications on Android, Mac, iOS, tvOS, and watchOS and is focused primarily on apps that require a small footprint. +An open source, [cross-platform](#cross-platform) [.NET implementation](#implementation-of-net) that's used when a small runtime is required. It's the runtime that powered Xamarin applications (unsupported as of May 2024) on Android, Mac, iOS, tvOS, and watchOS. Mono focuses primarily on apps that require a small footprint. It supports all of the currently published .NET Standard versions. @@ -326,7 +326,7 @@ A set of programming technologies that are used together to build and run applic The collection of APIs that a .NET app or library relies on. -An app or library can target a version of [.NET Standard](#net-standard) (for example, .NET Standard 2.0), which is a specification for a standardized set of APIs across all [.NET implementations](#implementation-of-net). An app or library can also target a version of a specific .NET implementation, in which case it gets access to implementation-specific APIs. For example, an app that targets Xamarin.iOS gets access to Xamarin-provided iOS API wrappers. +An app or library can target a version of [.NET Standard](#net-standard) (for example, .NET Standard 2.0), which is a specification for a standardized set of APIs across all [.NET implementations](#implementation-of-net). An app or library can also target a version of a specific .NET implementation, in which case it gets access to implementation-specific APIs. For some target frameworks (for example, [.NET Framework](#net-framework)) the available APIs are defined by the assemblies that a .NET implementation installs on a system, which can include application framework APIs (for example, ASP.NET, WinForms). For package-based target frameworks, the framework APIs are defined by the packages installed in the app or library. diff --git a/docs/standard/library-guidance/cross-platform-targeting.md b/docs/standard/library-guidance/cross-platform-targeting.md index 327e0fa5523a8..6fc2e3c0960a2 100644 --- a/docs/standard/library-guidance/cross-platform-targeting.md +++ b/docs/standard/library-guidance/cross-platform-targeting.md @@ -119,8 +119,6 @@ public static class GpsLocation ``` -✔️ CONSIDER using [MSBuild.Sdk.Extras](https://github.com/onovotny/MSBuildSdkExtras) when multi-targeting for UWP and Xamarin as it greatly simplifies your project file. - ❌ AVOID changing the assembly name or using different assembly names for each TFM your library compiles. Due to dependencies between libraries, multi-targeting with different assembly names per TFM can break package consumers. An assembly should have the same name across all TFMs. ## Older targets diff --git a/docs/standard/library-guidance/strong-naming.md b/docs/standard/library-guidance/strong-naming.md index 3b530ffda0669..9d5506ab6525c 100644 --- a/docs/standard/library-guidance/strong-naming.md +++ b/docs/standard/library-guidance/strong-naming.md @@ -22,7 +22,7 @@ The downside to strong naming is that .NET Framework on Windows enables strict l ``` -When .NET developers complain about strong naming, what they're usually complaining about is strict assembly loading. Fortunately, this issue is isolated to .NET Framework. .NET 5+, .NET Core, Xamarin, UWP, and most other .NET implementations don't have strict assembly loading, which is the main downside of strong naming. +When .NET developers complain about strong naming, what they're usually complaining about is strict assembly loading. Fortunately, this issue is isolated to .NET Framework. .NET 5+, .NET Core, UWP, and most other .NET implementations don't have strict assembly loading, which is the main downside of strong naming. One important aspect of strong naming on .NET Framework is that it's viral: a strong-named assembly can only reference other strong-named assemblies. If your library isn't strong named, then .NET Framework apps and libraries that need strong naming can't use it. diff --git a/docs/standard/native-interop/abi-support.md b/docs/standard/native-interop/abi-support.md index 728422d02bdcf..d7ff0a0644f00 100644 --- a/docs/standard/native-interop/abi-support.md +++ b/docs/standard/native-interop/abi-support.md @@ -60,7 +60,6 @@ The Objective-C language follows the C language's ABI and is [supported in .NET] Additional links: -* [Objective-Sharpie](/previous-versions/xamarin/cross-platform/macios/binding/) * [Objective-C binding walkthrough](/dotnet/maui/migration/ios-binding-projects) ## Python diff --git a/docs/standard/net-standard.md b/docs/standard/net-standard.md index 6e9cccbe1fdf9..62b43be221521 100644 --- a/docs/standard/net-standard.md +++ b/docs/standard/net-standard.md @@ -144,7 +144,7 @@ Here are some problems with .NET Standard that help explain why .NET 5 and later .NET Standard is still needed for libraries that can be used by multiple .NET implementations. We recommend you target .NET Standard in the following scenarios: - Use `netstandard2.0` to share code between .NET Framework and all other implementations of .NET. -- Use `netstandard2.1` to share code between Mono, Xamarin, and .NET Core 3.x. +- Use `netstandard2.1` to share code between Mono and .NET Core 3.x. ## See also diff --git a/docs/standard/threading/synchronizing-data-for-multithreading.md b/docs/standard/threading/synchronizing-data-for-multithreading.md index 835bf3ce61551..31139418266c3 100644 --- a/docs/standard/threading/synchronizing-data-for-multithreading.md +++ b/docs/standard/threading/synchronizing-data-for-multithreading.md @@ -2,7 +2,7 @@ title: "Synchronizing Data for Multithreading" description: Learn how to synchronize data for multithreading in .NET. Choose strategies such as synchronized code regions, manual synchronization, or synchronized contexts. ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "synchronization, threads" - "threading [.NET], synchronizing threads" - "managed threading" @@ -10,61 +10,61 @@ ms.topic: how-to --- # Synchronizing data for multithreading -When multiple threads can make calls to the properties and methods of a single object, it is critical that those calls be synchronized. Otherwise one thread might interrupt what another thread is doing, and the object could be left in an invalid state. A class whose members are protected from such interruptions is called thread-safe. - -.NET provides several strategies to synchronize access to instance and static members: - -- Synchronized code regions. You can use the class or compiler support for this class to synchronize only the code block that needs it, improving performance. - -- Manual synchronization. You can use the synchronization objects provided by the .NET class library. See [Overview of Synchronization Primitives](overview-of-synchronization-primitives.md), which includes a discussion of the class. - -- Synchronized contexts. For .NET Framework and Xamarin applications only, you can use the to enable simple, automatic synchronization for objects. - -- Collection classes in the namespace. These classes provide built-in synchronized add and remove operations. For more information, see [Thread-Safe Collections](../collections/thread-safe/index.md). - - The common language runtime provides a thread model in which classes fall into a number of categories that can be synchronized in a variety of different ways depending on the requirements. The following table shows what synchronization support is provided for fields and methods with a given synchronization category. - -|Category|Global fields|Static fields|Static methods|Instance fields|Instance methods|Specific code blocks| -|--------------|-------------------|-------------------|--------------------|---------------------|----------------------|--------------------------| -|No Synchronization|No|No|No|No|No|No| -|Synchronized Context|No|No|No|Yes|Yes|No| -|Synchronized Code Regions|No|No|Only if marked|No|Only if marked|Only if marked| -|Manual Synchronization|Manual|Manual|Manual|Manual|Manual|Manual| - -## No synchronization - - This is the default for objects. Any thread can access any method or field at any time. Only one thread at a time should access these objects. - -## Manual synchronization - - The .NET class library provides a number of classes for synchronizing threads. See [Overview of Synchronization Primitives](overview-of-synchronization-primitives.md). - -## Synchronized code regions - - You can use the class or a compiler keyword to synchronize blocks of code, instance methods, and static methods. There is no support for synchronized static fields. - - Both Visual Basic and C# support the marking of blocks of code with a particular language keyword, the `lock` statement in C# or the `SyncLock` statement in Visual Basic. When the code is executed by a thread, an attempt is made to acquire the lock. If the lock has already been acquired by another thread, the thread blocks until the lock becomes available. When the thread exits the synchronized block of code, the lock is released, no matter how the thread exits the block. - +When multiple threads can make calls to the properties and methods of a single object, it is critical that those calls be synchronized. Otherwise one thread might interrupt what another thread is doing, and the object could be left in an invalid state. A class whose members are protected from such interruptions is called thread-safe. + +.NET provides several strategies to synchronize access to instance and static members: + +- Synchronized code regions. You can use the class or compiler support for this class to synchronize only the code block that needs it, improving performance. + +- Manual synchronization. You can use the synchronization objects provided by the .NET class library. See [Overview of Synchronization Primitives](overview-of-synchronization-primitives.md), which includes a discussion of the class. + +- Synchronized contexts. For .NET Framework applications only, you can use the to enable simple, automatic synchronization for objects. + +- Collection classes in the namespace. These classes provide built-in synchronized add and remove operations. For more information, see [Thread-Safe Collections](../collections/thread-safe/index.md). + + The common language runtime provides a thread model in which classes fall into a number of categories that can be synchronized in a variety of different ways depending on the requirements. The following table shows what synchronization support is provided for fields and methods with a given synchronization category. + +|Category|Global fields|Static fields|Static methods|Instance fields|Instance methods|Specific code blocks| +|--------------|-------------------|-------------------|--------------------|---------------------|----------------------|--------------------------| +|No Synchronization|No|No|No|No|No|No| +|Synchronized Context|No|No|No|Yes|Yes|No| +|Synchronized Code Regions|No|No|Only if marked|No|Only if marked|Only if marked| +|Manual Synchronization|Manual|Manual|Manual|Manual|Manual|Manual| + +## No synchronization + + This is the default for objects. Any thread can access any method or field at any time. Only one thread at a time should access these objects. + +## Manual synchronization + + The .NET class library provides a number of classes for synchronizing threads. See [Overview of Synchronization Primitives](overview-of-synchronization-primitives.md). + +## Synchronized code regions + + You can use the class or a compiler keyword to synchronize blocks of code, instance methods, and static methods. There is no support for synchronized static fields. + + Both Visual Basic and C# support the marking of blocks of code with a particular language keyword, the `lock` statement in C# or the `SyncLock` statement in Visual Basic. When the code is executed by a thread, an attempt is made to acquire the lock. If the lock has already been acquired by another thread, the thread blocks until the lock becomes available. When the thread exits the synchronized block of code, the lock is released, no matter how the thread exits the block. + > [!NOTE] -> Beginning in C# 13, the `lock` statement recognizes if the locked object is an instance of and uses the `EnterScope` method to create a synchronized region. The `lock`, when the target isn't a `Lock` instance, and `SyncLock` statements are implemented using and , so other methods of can be used in conjunction with them within the synchronized region. - - You can also decorate a method with a with a value of , which has the same effect as using or one of the compiler keywords to lock the entire body of the method. - - can be used to break a thread out of blocking operations such as waiting for access to a synchronized region of code. **Thread.Interrupt** is also used to break threads out of operations like . - +> Beginning in C# 13, the `lock` statement recognizes if the locked object is an instance of and uses the `EnterScope` method to create a synchronized region. The `lock`, when the target isn't a `Lock` instance, and `SyncLock` statements are implemented using and , so other methods of can be used in conjunction with them within the synchronized region. + + You can also decorate a method with a with a value of , which has the same effect as using or one of the compiler keywords to lock the entire body of the method. + + can be used to break a thread out of blocking operations such as waiting for access to a synchronized region of code. **Thread.Interrupt** is also used to break threads out of operations like . + > [!IMPORTANT] -> Do not lock the type — that is, `typeof(MyType)` in C#, `GetType(MyType)` in Visual Basic, or `MyType::typeid` in C++ — in order to protect `static` methods (`Shared` methods in Visual Basic). Use a private static object instead. Similarly, do not use `this` in C# (`Me` in Visual Basic) to lock instance methods. Use a private object instead. A class or instance can be locked by code other than your own, potentially causing deadlocks or performance problems. - -### Compiler support - - Both Visual Basic and C# support a language keyword that uses and to lock the object. Visual Basic supports the [SyncLock](../../visual-basic/language-reference/statements/synclock-statement.md) statement; C# supports the [lock](../../csharp/language-reference/statements/lock.md) statement. - - In both cases, if an exception is thrown in the code block, the lock acquired by the **lock** or **SyncLock** is released automatically. The C# and Visual Basic compilers emit a **try**/**finally** block with **Monitor.Enter** at the beginning of the try, and **Monitor.Exit** in the **finally** block. If an exception is thrown inside the **lock** or **SyncLock** block, the **finally** handler runs to allow you to do any clean-up work. - -## Synchronized Context - -In .NET Framework and Xamarin applications only, you can use the on any to synchronize all instance methods and fields. All objects in the same context domain share the same lock. Multiple threads are allowed to access the methods and fields, but only a single thread is allowed at any one time. - +> Do not lock the type — that is, `typeof(MyType)` in C#, `GetType(MyType)` in Visual Basic, or `MyType::typeid` in C++ — in order to protect `static` methods (`Shared` methods in Visual Basic). Use a private static object instead. Similarly, do not use `this` in C# (`Me` in Visual Basic) to lock instance methods. Use a private object instead. A class or instance can be locked by code other than your own, potentially causing deadlocks or performance problems. + +### Compiler support + + Both Visual Basic and C# support a language keyword that uses and to lock the object. Visual Basic supports the [SyncLock](../../visual-basic/language-reference/statements/synclock-statement.md) statement; C# supports the [lock](../../csharp/language-reference/statements/lock.md) statement. + + In both cases, if an exception is thrown in the code block, the lock acquired by the **lock** or **SyncLock** is released automatically. The C# and Visual Basic compilers emit a **try**/**finally** block with **Monitor.Enter** at the beginning of the try, and **Monitor.Exit** in the **finally** block. If an exception is thrown inside the **lock** or **SyncLock** block, the **finally** handler runs to allow you to do any clean-up work. + +## Synchronized Context + +In .NET Framework applications only, you can use the on any to synchronize all instance methods and fields. All objects in the same context domain share the same lock. Multiple threads are allowed to access the methods and fields, but only a single thread is allowed at any one time. + ## See also - diff --git a/docs/standard/whats-new/whats-new-in-dotnet-standard.md b/docs/standard/whats-new/whats-new-in-dotnet-standard.md index ce516886f0000..5b6e580253596 100644 --- a/docs/standard/whats-new/whats-new-in-dotnet-standard.md +++ b/docs/standard/whats-new/whats-new-in-dotnet-standard.md @@ -7,7 +7,7 @@ ms.topic: whats-new --- # What's new in .NET Standard -.NET Standard is a formal specification that defines a versioned set of APIs that must be available on .NET implementations that comply with that version of the standard. .NET Standard is targeted at library developers. A library that targets a .NET Standard version can be used on any .NET or Xamarin implementation that supports that version of the standard. +.NET Standard is a formal specification that defines a versioned set of APIs that must be available on .NET implementations that comply with that version of the standard. .NET Standard is targeted at library developers. A library that targets a .NET Standard version can be used on any .NET implementation that supports that version of the standard. .NET Standard is included with the .NET SDK. It's also included with Visual Studio if you select the .NET workload. @@ -19,17 +19,12 @@ ms.topic: whats-new - .NET Core 3.0 or later (including .NET 5 and later) - Mono 6.4 or later -- Xamarin.iOS 12.16 or later -- Xamarin.Android 10.0 or later .NET Standard 2.0 is supported by the following .NET implementations: - .NET Core 2.0 or later (including .NET 5 and later) - .NET Framework 4.6.1 or later - Mono 5.4 or later -- Xamarin.iOS 10.14 or later -- Xamarin.Mac 3.8 or later -- Xamarin.Android 8.0 or later - Universal Windows Platform 10.0.16299 or later ## What's new in .NET Standard 2.1 @@ -44,7 +39,7 @@ For more information, see the [Announcing .NET Standard 2.1](https://devblogs.mi ### A vastly expanded set of APIs -Through version 1.6, .NET Standard included a comparatively small subset of APIs. Among those excluded were many APIs that were commonly used in .NET Framework or Xamarin. This complicates development, since it requires that developers find suitable replacements for familiar APIs when they develop applications and libraries that target multiple .NET implementations. .NET Standard 2.0 addresses this limitation by adding over 20,000 more APIs than were available in .NET Standard 1.6, the previous version of the standard. For a list of the APIs that have been added to .NET Standard 2.0, see [.NET Standard 2.0 vs 1.6](https://raw.githubusercontent.com/dotnet/standard/v2.1.0/docs/versions/netstandard2.0_diff.md). +Through version 1.6, .NET Standard included a comparatively small subset of APIs. Among those excluded were many APIs that were commonly used in .NET Framework. This complicates development, since it requires that developers find suitable replacements for familiar APIs when they develop applications and libraries that target multiple .NET implementations. .NET Standard 2.0 addresses this limitation by adding over 20,000 more APIs than were available in the previous version of the standard, .NET Standard 1.6. For a list of the APIs that have been added to .NET Standard 2.0, see [.NET Standard 2.0 vs 1.6](https://raw.githubusercontent.com/dotnet/standard/v2.1.0/docs/versions/netstandard2.0_diff.md). Some of the additions to the namespace in .NET Standard 2.0 include: diff --git a/samples/snippets/standard/data/sqlite/AggregateFunctionSample/AggregateFunctionSample.csproj b/samples/snippets/standard/data/sqlite/AggregateFunctionSample/AggregateFunctionSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/AggregateFunctionSample/AggregateFunctionSample.csproj +++ b/samples/snippets/standard/data/sqlite/AggregateFunctionSample/AggregateFunctionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/AsyncSample/AsyncSample.csproj b/samples/snippets/standard/data/sqlite/AsyncSample/AsyncSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/AsyncSample/AsyncSample.csproj +++ b/samples/snippets/standard/data/sqlite/AsyncSample/AsyncSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/BackupSample/BackupSample.csproj b/samples/snippets/standard/data/sqlite/BackupSample/BackupSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/BackupSample/BackupSample.csproj +++ b/samples/snippets/standard/data/sqlite/BackupSample/BackupSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/BatchingSample/BatchingSample.csproj b/samples/snippets/standard/data/sqlite/BatchingSample/BatchingSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/BatchingSample/BatchingSample.csproj +++ b/samples/snippets/standard/data/sqlite/BatchingSample/BatchingSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/BulkInsertSample/BulkInsertSample.csproj b/samples/snippets/standard/data/sqlite/BulkInsertSample/BulkInsertSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/BulkInsertSample/BulkInsertSample.csproj +++ b/samples/snippets/standard/data/sqlite/BulkInsertSample/BulkInsertSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/CollationSample/CollationSample.csproj b/samples/snippets/standard/data/sqlite/CollationSample/CollationSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/CollationSample/CollationSample.csproj +++ b/samples/snippets/standard/data/sqlite/CollationSample/CollationSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/DapperSample/DapperSample.csproj b/samples/snippets/standard/data/sqlite/DapperSample/DapperSample.csproj index 7ca074d801d3d..6d1f6cc382338 100644 --- a/samples/snippets/standard/data/sqlite/DapperSample/DapperSample.csproj +++ b/samples/snippets/standard/data/sqlite/DapperSample/DapperSample.csproj @@ -8,7 +8,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/DateAndTimeSample/DateAndTimeSample.csproj b/samples/snippets/standard/data/sqlite/DateAndTimeSample/DateAndTimeSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/DateAndTimeSample/DateAndTimeSample.csproj +++ b/samples/snippets/standard/data/sqlite/DateAndTimeSample/DateAndTimeSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/DeferredTransactionSample/DeferredTransactionSample.csproj b/samples/snippets/standard/data/sqlite/DeferredTransactionSample/DeferredTransactionSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/DeferredTransactionSample/DeferredTransactionSample.csproj +++ b/samples/snippets/standard/data/sqlite/DeferredTransactionSample/DeferredTransactionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/DirtyReadSample/DirtyReadSample.csproj b/samples/snippets/standard/data/sqlite/DirtyReadSample/DirtyReadSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/DirtyReadSample/DirtyReadSample.csproj +++ b/samples/snippets/standard/data/sqlite/DirtyReadSample/DirtyReadSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/EncryptionSample/EncryptionSample.csproj b/samples/snippets/standard/data/sqlite/EncryptionSample/EncryptionSample.csproj index cf473c73913bf..7ae641fc412c9 100644 --- a/samples/snippets/standard/data/sqlite/EncryptionSample/EncryptionSample.csproj +++ b/samples/snippets/standard/data/sqlite/EncryptionSample/EncryptionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/ExtensionsSample/ExtensionsSample.csproj b/samples/snippets/standard/data/sqlite/ExtensionsSample/ExtensionsSample.csproj index bac503f6c918d..d430eead80754 100644 --- a/samples/snippets/standard/data/sqlite/ExtensionsSample/ExtensionsSample.csproj +++ b/samples/snippets/standard/data/sqlite/ExtensionsSample/ExtensionsSample.csproj @@ -7,9 +7,9 @@ - + - + diff --git a/samples/snippets/standard/data/sqlite/HelloWorldSample/HelloWorldSample.csproj b/samples/snippets/standard/data/sqlite/HelloWorldSample/HelloWorldSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/HelloWorldSample/HelloWorldSample.csproj +++ b/samples/snippets/standard/data/sqlite/HelloWorldSample/HelloWorldSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/InteropSample/InteropSample.csproj b/samples/snippets/standard/data/sqlite/InteropSample/InteropSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/InteropSample/InteropSample.csproj +++ b/samples/snippets/standard/data/sqlite/InteropSample/InteropSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/RegularExpressionSample/RegularExpressionSample.csproj b/samples/snippets/standard/data/sqlite/RegularExpressionSample/RegularExpressionSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/RegularExpressionSample/RegularExpressionSample.csproj +++ b/samples/snippets/standard/data/sqlite/RegularExpressionSample/RegularExpressionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/ResultMetadataSample/ResultMetadataSample.csproj b/samples/snippets/standard/data/sqlite/ResultMetadataSample/ResultMetadataSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/ResultMetadataSample/ResultMetadataSample.csproj +++ b/samples/snippets/standard/data/sqlite/ResultMetadataSample/ResultMetadataSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/SavepointSample/SavepointSample.csproj b/samples/snippets/standard/data/sqlite/SavepointSample/SavepointSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/SavepointSample/SavepointSample.csproj +++ b/samples/snippets/standard/data/sqlite/SavepointSample/SavepointSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/ScalarFunctionSample/ScalarFunctionSample.csproj b/samples/snippets/standard/data/sqlite/ScalarFunctionSample/ScalarFunctionSample.csproj index 331f14ff9b5ea..3f76673650551 100644 --- a/samples/snippets/standard/data/sqlite/ScalarFunctionSample/ScalarFunctionSample.csproj +++ b/samples/snippets/standard/data/sqlite/ScalarFunctionSample/ScalarFunctionSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/SqliteProviderSample/SqliteProviderSample.csproj b/samples/snippets/standard/data/sqlite/SqliteProviderSample/SqliteProviderSample.csproj index 03df642c7398e..03f1e3db495fa 100644 --- a/samples/snippets/standard/data/sqlite/SqliteProviderSample/SqliteProviderSample.csproj +++ b/samples/snippets/standard/data/sqlite/SqliteProviderSample/SqliteProviderSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/StreamingSample/StreamingSample.csproj b/samples/snippets/standard/data/sqlite/StreamingSample/StreamingSample.csproj index 35eee0473dd00..0a7a8e12dbc3c 100644 --- a/samples/snippets/standard/data/sqlite/StreamingSample/StreamingSample.csproj +++ b/samples/snippets/standard/data/sqlite/StreamingSample/StreamingSample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/snippets/standard/data/sqlite/SystemLibrarySample/SystemLibrarySample.csproj b/samples/snippets/standard/data/sqlite/SystemLibrarySample/SystemLibrarySample.csproj index d52133f8eb1f1..954f353b5fe57 100644 --- a/samples/snippets/standard/data/sqlite/SystemLibrarySample/SystemLibrarySample.csproj +++ b/samples/snippets/standard/data/sqlite/SystemLibrarySample/SystemLibrarySample.csproj @@ -7,7 +7,7 @@ - +