diff --git a/docs/azure/includes/dotnet-all.md b/docs/azure/includes/dotnet-all.md index 296ac311c8df9..d1808dbb01d8b 100644 --- a/docs/azure/includes/dotnet-all.md +++ b/docs/azure/includes/dotnet-all.md @@ -116,7 +116,7 @@ | Text Translation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Translation.Text/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Translation.Text-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Translation.Text_1.0.0/sdk/translation/Azure.AI.Translation.Text/) | | Time Series Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.IoT.TimeSeriesInsights/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/IoT.TimeSeriesInsights-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.TimeSeriesInsights_1.0.0-beta.1/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/) | | TimeZone | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.TimeZones/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Maps.TimeZones-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.TimeZones_1.0.0-beta.1/sdk/maps/Azure.Maps.TimeZones/) | -| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0-beta.1/sdk/ai/Azure.AI.VoiceLive/) | +| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.VoiceLive-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0-beta.1/sdk/ai/Azure.AI.VoiceLive/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.OnlineExperimentation/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Analytics.OnlineExperimentation-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.OnlineExperimentation_1.0.0-beta.1/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Projects/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Projects-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Projects_1.0.0-beta.1/sdk/cloudmachine/Azure.Projects/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Projects.AI/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Projects.AI-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Projects.AI_1.0.0-beta.1/sdk/cloudmachine/Azure.Projects.AI/) | @@ -126,7 +126,7 @@ | WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.WCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.WCF.Azure.StorageQueues-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.WCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/) | | Web PubSub | NuGet [1.6.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub/1.6.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub-readme) | GitHub [1.6.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub_1.6.0/sdk/webpubsub/Azure.Messaging.WebPubSub/) | | Web PubSub Client | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub.Client-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) | -| Azure client library integration for ASP.NET Core | NuGet [1.12.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.12.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.12.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.12.0/sdk/extensions/Microsoft.Extensions.Azure/) | +| Azure client library integration for ASP.NET Core | NuGet [1.13.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.13.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.13.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.13.0/sdk/extensions/Microsoft.Extensions.Azure/) | | Blob Storage Key Store for .NET Data Protection | NuGet [1.5.1](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.5.1) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.5.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.5.1/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) | | CloudNative CloudEvents with Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents_1.0.0/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/) | | Core - Client - Spatial | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.1.0/sdk/core/Microsoft.Azure.Core.Spatial/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.2.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial/) | @@ -263,7 +263,7 @@ | Resource Management - Graph Services | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.GraphServices/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.GraphServices-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GraphServices_1.1.2/sdk/graphservices/Azure.ResourceManager.GraphServices/) | | Resource Management - Guest Configuration | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.GuestConfiguration/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.GuestConfiguration-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GuestConfiguration_1.2.1/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/) | | Resource Management - Hardware Security Modules | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HardwareSecurityModules/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HardwareSecurityModules-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HardwareSecurityModules_1.0.0/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/) | -| Resource Management - Hci.Vm | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci.Vm/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci.Vm_1.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci.Vm/) | +| Resource Management - Hci.Vm | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci.Vm/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Hci.Vm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci.Vm_1.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci.Vm/) | | Resource Management - HDInsight | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.1.0)
NuGet [1.2.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.2.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.1.0/sdk/hdinsight/Azure.ResourceManager.HDInsight/)
GitHub [1.2.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.2.0-beta.4/sdk/hdinsight/Azure.ResourceManager.HDInsight/) | | Resource Management - HDInsight Containers | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight.Containers/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight.Containers-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight.Containers_1.0.0-beta.5/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/) | | Resource Management - Health Bot | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.1.1/sdk/healthbot/Azure.ResourceManager.HealthBot/) | @@ -382,12 +382,12 @@ | Resource Management - Terraform | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Terraform/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Terraform-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Terraform_1.0.0-beta.2/sdk/terraform/Azure.ResourceManager.Terraform/) | | Resource Management - Traffic Manager | NuGet [1.1.3](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.1.3) | [docs](/dotnet/api/overview/azure/ResourceManager.TrafficManager-readme) | GitHub [1.1.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.1.3/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/) | | Resource Management - Trusted Signing | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.TrustedSigning/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.TrustedSigning-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrustedSigning_1.0.0-beta.2/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/) | -| Resource Management - Virtualenclaves | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.VirtualEnclaves/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VirtualEnclaves_1.0.0-beta.1/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/) | +| Resource Management - Virtualenclaves | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.VirtualEnclaves/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.VirtualEnclaves-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VirtualEnclaves_1.0.0-beta.1/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/) | | Resource Management - Voice Services | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.VoiceServices/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.VoiceServices-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VoiceServices_1.0.2/sdk/voiceservices/Azure.ResourceManager.VoiceServices/) | | Resource Management - Web PubSub | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.WebPubSub/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.WebPubSub-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WebPubSub_1.2.0/sdk/webpubsub/Azure.ResourceManager.WebPubSub/) | | Resource Management - Weightsandbiases | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.WeightsAndBiases/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.WeightsAndBiases-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WeightsAndBiases_1.0.0-beta.1/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/) | | Resource Management - Workload Monitor | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadMonitor/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.WorkloadMonitor-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadMonitor_1.0.0-beta.5/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/) | -| Resource Management - Workloadorchestration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadOrchestration/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadOrchestration_1.0.0/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/) | +| Resource Management - Workloadorchestration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadOrchestration/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.WorkloadOrchestration-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadOrchestration_1.0.0/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/) | | Resource Management - Workloads | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Workloads/1.1.1)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Workloads/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Workloads-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Workloads_1.1.1/sdk/workloads/Azure.ResourceManager.Workloads/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Workloads_1.2.0-beta.1/sdk/workloads/Azure.ResourceManager.Workloads/) | | Resource Management - Workloadssapvirtualinstance | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadsSapVirtualInstance/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.WorkloadsSapVirtualInstance-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadsSapVirtualInstance_1.0.0-beta.1/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/) | | App Configuration Extension | NuGet [8.4.0](https://www.nuget.org/packages/Microsoft.Azure.AppConfiguration.Functions.Worker/8.4.0) | | | diff --git a/docs/azure/includes/dotnet-new.md b/docs/azure/includes/dotnet-new.md index 275bdd87bb7d4..0724818b9c8e8 100644 --- a/docs/azure/includes/dotnet-new.md +++ b/docs/azure/includes/dotnet-new.md @@ -123,7 +123,7 @@ | Text Translation | NuGet [1.0.0](https://www.nuget.org/packages/Azure.AI.Translation.Text/1.0.0) | [docs](/dotnet/api/overview/azure/AI.Translation.Text-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.Translation.Text_1.0.0/sdk/translation/Azure.AI.Translation.Text/) | | Time Series Insights | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.IoT.TimeSeriesInsights/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/IoT.TimeSeriesInsights-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.IoT.TimeSeriesInsights_1.0.0-beta.1/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/) | | TimeZone | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Maps.TimeZones/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Maps.TimeZones-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Maps.TimeZones_1.0.0-beta.1/sdk/maps/Azure.Maps.TimeZones/) | -| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0-beta.1/sdk/ai/Azure.AI.VoiceLive/) | +| unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.AI.VoiceLive/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/AI.VoiceLive-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.AI.VoiceLive_1.0.0-beta.1/sdk/ai/Azure.AI.VoiceLive/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Analytics.OnlineExperimentation/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Analytics.OnlineExperimentation-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Analytics.OnlineExperimentation_1.0.0-beta.1/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Projects/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Projects-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Projects_1.0.0-beta.1/sdk/cloudmachine/Azure.Projects/) | | unknown | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.Projects.AI/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Projects.AI-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Projects.AI_1.0.0-beta.1/sdk/cloudmachine/Azure.Projects.AI/) | @@ -134,7 +134,7 @@ | WCF Storage Queues | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Microsoft.WCF.Azure.StorageQueues/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.WCF.Azure.StorageQueues-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.WCF.Azure.StorageQueues_1.0.0-beta.1/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/) | | Web PubSub | NuGet [1.6.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub/1.6.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub-readme) | GitHub [1.6.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub_1.6.0/sdk/webpubsub/Azure.Messaging.WebPubSub/) | | Web PubSub Client | NuGet [1.0.0](https://www.nuget.org/packages/Azure.Messaging.WebPubSub.Client/1.0.0) | [docs](/dotnet/api/overview/azure/Messaging.WebPubSub.Client-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Messaging.WebPubSub.Client_1.0.0/sdk/webpubsub/Azure.Messaging.WebPubSub.Client/) | -| Azure client library integration for ASP.NET Core | NuGet [1.12.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.12.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.12.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.12.0/sdk/extensions/Microsoft.Extensions.Azure/) | +| Azure client library integration for ASP.NET Core | NuGet [1.13.0](https://www.nuget.org/packages/Microsoft.Extensions.Azure/1.13.0) | [docs](/dotnet/api/overview/azure/Microsoft.Extensions.Azure-readme) | GitHub [1.13.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Extensions.Azure_1.13.0/sdk/extensions/Microsoft.Extensions.Azure/) | | Blob Storage Key Store for .NET Data Protection | NuGet [1.5.1](https://www.nuget.org/packages/Azure.Extensions.AspNetCore.DataProtection.Blobs/1.5.1) | [docs](/dotnet/api/overview/azure/Extensions.AspNetCore.DataProtection.Blobs-readme) | GitHub [1.5.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Extensions.AspNetCore.DataProtection.Blobs_1.5.1/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/) | | CloudNative CloudEvents with Event Grid | NuGet [1.0.0](https://www.nuget.org/packages/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/1.0.0) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents_1.0.0/sdk/eventgrid/Microsoft.Azure.Messaging.EventGrid.CloudNativeCloudEvents/) | | Core - Client - Spatial | NuGet [1.1.0](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.1.0)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Microsoft.Azure.Core.Spatial/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/Microsoft.Azure.Core.Spatial-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.1.0/sdk/core/Microsoft.Azure.Core.Spatial/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Microsoft.Azure.Core.Spatial_1.2.0-beta.1/sdk/core/Microsoft.Azure.Core.Spatial/) | @@ -273,7 +273,7 @@ | Resource Management - Graph Services | NuGet [1.1.2](https://www.nuget.org/packages/Azure.ResourceManager.GraphServices/1.1.2) | [docs](/dotnet/api/overview/azure/ResourceManager.GraphServices-readme) | GitHub [1.1.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GraphServices_1.1.2/sdk/graphservices/Azure.ResourceManager.GraphServices/) | | Resource Management - Guest Configuration | NuGet [1.2.1](https://www.nuget.org/packages/Azure.ResourceManager.GuestConfiguration/1.2.1) | [docs](/dotnet/api/overview/azure/ResourceManager.GuestConfiguration-readme) | GitHub [1.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.GuestConfiguration_1.2.1/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/) | | Resource Management - Hardware Security Modules | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.HardwareSecurityModules/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.HardwareSecurityModules-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HardwareSecurityModules_1.0.0/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/) | -| Resource Management - Hci.Vm | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci.Vm/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci.Vm_1.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci.Vm/) | +| Resource Management - Hci.Vm | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Hci.Vm/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Hci.Vm-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Hci.Vm_1.0.0-beta.1/sdk/azurestackhci/Azure.ResourceManager.Hci.Vm/) | | Resource Management - HDInsight | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.1.0)
NuGet [1.2.0-beta.4](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight/1.2.0-beta.4) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.1.0/sdk/hdinsight/Azure.ResourceManager.HDInsight/)
GitHub [1.2.0-beta.4](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight_1.2.0-beta.4/sdk/hdinsight/Azure.ResourceManager.HDInsight/) | | Resource Management - HDInsight Containers | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.HDInsight.Containers/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.HDInsight.Containers-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HDInsight.Containers_1.0.0-beta.5/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/) | | Resource Management - Health Bot | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.HealthBot/1.1.1) | [docs](/dotnet/api/overview/azure/ResourceManager.HealthBot-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.HealthBot_1.1.1/sdk/healthbot/Azure.ResourceManager.HealthBot/) | @@ -396,11 +396,11 @@ | Resource Management - Terraform | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.Terraform/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.Terraform-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Terraform_1.0.0-beta.2/sdk/terraform/Azure.ResourceManager.Terraform/) | | Resource Management - Traffic Manager | NuGet [1.1.3](https://www.nuget.org/packages/Azure.ResourceManager.TrafficManager/1.1.3) | [docs](/dotnet/api/overview/azure/ResourceManager.TrafficManager-readme) | GitHub [1.1.3](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrafficManager_1.1.3/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/) | | Resource Management - Trusted Signing | NuGet [1.0.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.TrustedSigning/1.0.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.TrustedSigning-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.TrustedSigning_1.0.0-beta.2/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/) | -| Resource Management - Virtualenclaves | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.VirtualEnclaves/1.0.0-beta.1) | | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VirtualEnclaves_1.0.0-beta.1/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/) | +| Resource Management - Virtualenclaves | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.VirtualEnclaves/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.VirtualEnclaves-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VirtualEnclaves_1.0.0-beta.1/sdk/virtualenclaves/Azure.ResourceManager.VirtualEnclaves/) | | Resource Management - Voice Services | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.VoiceServices/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.VoiceServices-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.VoiceServices_1.0.2/sdk/voiceservices/Azure.ResourceManager.VoiceServices/) | | Resource Management - Web PubSub | NuGet [1.2.0](https://www.nuget.org/packages/Azure.ResourceManager.WebPubSub/1.2.0) | [docs](/dotnet/api/overview/azure/ResourceManager.WebPubSub-readme) | GitHub [1.2.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WebPubSub_1.2.0/sdk/webpubsub/Azure.ResourceManager.WebPubSub/) | | Resource Management - Weightsandbiases | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.WeightsAndBiases/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.WeightsAndBiases-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WeightsAndBiases_1.0.0-beta.1/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/) | | Resource Management - Workload Monitor | NuGet [1.0.0-beta.5](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadMonitor/1.0.0-beta.5) | [docs](/dotnet/api/overview/azure/ResourceManager.WorkloadMonitor-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadMonitor_1.0.0-beta.5/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/) | -| Resource Management - Workloadorchestration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadOrchestration/1.0.0) | | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadOrchestration_1.0.0/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/) | +| Resource Management - Workloadorchestration | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadOrchestration/1.0.0) | [docs](/dotnet/api/overview/azure/ResourceManager.WorkloadOrchestration-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadOrchestration_1.0.0/sdk/workloadorchestration/Azure.ResourceManager.WorkloadOrchestration/) | | Resource Management - Workloads | NuGet [1.1.1](https://www.nuget.org/packages/Azure.ResourceManager.Workloads/1.1.1)
NuGet [1.2.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.Workloads/1.2.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.Workloads-readme) | GitHub [1.1.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Workloads_1.1.1/sdk/workloads/Azure.ResourceManager.Workloads/)
GitHub [1.2.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Workloads_1.2.0-beta.1/sdk/workloads/Azure.ResourceManager.Workloads/) | | Resource Management - Workloadssapvirtualinstance | NuGet [1.0.0-beta.1](https://www.nuget.org/packages/Azure.ResourceManager.WorkloadsSapVirtualInstance/1.0.0-beta.1) | [docs](/dotnet/api/overview/azure/ResourceManager.WorkloadsSapVirtualInstance-readme?view=azure-dotnet-preview&preserve-view=true) | GitHub [1.0.0-beta.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.WorkloadsSapVirtualInstance_1.0.0-beta.1/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/) | diff --git a/docs/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete.md b/docs/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete.md index 33a18a06935cf..80c409579cf26 100644 --- a/docs/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete.md +++ b/docs/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete.md @@ -6,7 +6,7 @@ ms.date: 08/08/2025 # Razor run-time compilation is obsolete -Razor run-time compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build-time compilation. For development scenarios, use Hot Reload instead. +Razor run-time compilation is obsolete and is not recommended for production scenarios. For production scenarios, use the default build-time compilation. For development scenarios, use [Hot Reload](/aspnet/core/test/hot-reload) instead. ## Version introduced @@ -28,11 +28,11 @@ This change can affect [source compatibility](../../categories.md#source-compati ## Reason for change -Razor run-time compilation has been replaced by Hot Reload, which has been the recommended approach for a few years now. This change makes it clearer that Razor run-time compilation doesn't get support for new features and should no longer be used. +Razor run-time compilation has been replaced by [Hot Reload](/aspnet/core/test/hot-reload), which has been the recommended approach for a few years now. This change makes it clearer that Razor run-time compilation doesn't get support for new features and should no longer be used. ## Recommended action -Remove calls to and use Hot Reload instead. +Remove calls to and use [Hot Reload](/aspnet/core/test/hot-reload) instead. ## Affected APIs @@ -41,3 +41,7 @@ Remove calls to - - + +## See also + +- [.NET Hot Reload support for ASP.NET Core](/aspnet/core/test/hot-reload) diff --git a/docs/core/runtime-config/garbage-collector.md b/docs/core/runtime-config/garbage-collector.md index 1fd7afa0f57c5..9847e61e60e96 100644 --- a/docs/core/runtime-config/garbage-collector.md +++ b/docs/core/runtime-config/garbage-collector.md @@ -824,3 +824,67 @@ For more information about the first 3 settings, see the [Middle ground between | **runtimeconfig.json** | `System.GC.DynamicAdaptationMode` | `1` - enabled
`0` - disabled | .NET 8 | [!INCLUDE [runtimehostconfigurationoption](includes/runtimehostconfigurationoption.md)] + +#### Target TCP + +DATAS uses the Throughput Cost Percentage (TCP) as the memory cost measurement on throughput. It takes into consideration both GC pauses and how much allocations have to wait. Usually, GC pauses dominates, so you can use the "% pause time in GC" to approximate this cost. There are two transient cases where the allocation wait time can dominate: + +- When a process starts, DATAS always starts with one heap. So if there are enough threads allocating, they experience waits. +- When the workload changes from lighter to heavier, for example, when peak hours start, allocating threads might experience waits during that period of time. That's because it takes a few GCs before the number of heaps gets increased. + +DATAS uses 2% as the default TCP, which you can adjust with this setting. It's an integer that is interpreted as a percentage, for example, 5 means the target TCP will be 5%. + +| | Setting name | Values | Version introduced | +|--------------------------|----------------------------|-----------|--------------------| +| **runtimeconfig.json** | `System.GC.DTargetTCP` | *decimal value* | .NET 9 | +| **Environment variable** | `DOTNET_GCDTargetTCP` | *hexadecimal value* | .NET 9 | + +[!INCLUDE [runtimehostconfigurationoption](includes/runtimehostconfigurationoption.md)] + +#### Gen0 max budget settings + +Adjusting the gen0 budget is one of the key elements DATAS uses to adapt to application sizes. DATAS defines an upper threshold called the BCD (Budget Computed via DATAS) for the total gen0 budget as a function of the application size. The formula to calculate a multiplier is as follows: + +$$ +f(\text{application\_size\_in\_MB}) = \frac{20 - \text{conserve\_memory}}{\sqrt{\text{application\_size\_in\_MB}}} +$$ + +The formula is then clamped by a maximum and minimum value before it's applied to the application size in MB. If the [conserve memory](#conserve-memory) setting isn't specified, DATAS uses 5 by default. The maximum and minimum value default to 10 and 0.1, respectively. + +For example, if the application size is 1 GB, the formula calculates `(20 - 5) / sqrt (1000) = 0.474`. Since it's between 10 and 0.1, clamping has no effect. This means the total gen0 budget is 47.4% of 1 GB which is 474 MB. If the application size is 1 MB, the formula would calculate 15 which would then be adjusted to 10, meaning the total gen0 budget allowed is 10 MB. + +Three settings are provided to adjust what the formula calculates and modify the clamping values: + +- The percent that will be applied to what `f` calculates. + + | | Setting name | Values | Version introduced | + |--------------------------|----------------------------|-----------|--------------------| + | **runtimeconfig.json** | `System.GC.DGen0GrowthPercent` | *decimal value* | .NET 10 | + | **Environment variable** | `DOTNET_GCDGen0GrowthPercent` | *hexadecimal value* | .NET 10 | + + [!INCLUDE [runtimehostconfigurationoption](includes/runtimehostconfigurationoption.md)] + + So if `f` calculates 0.474 and this setting is 200, the multiplier becomes `0.474 * 200% = 0.948` before the clamping is applied. + +- The maximum clamping value in permil. + + | | Setting name | Values | Version introduced | + |--------------------------|----------------------------|-----------|--------------------| + | **runtimeconfig.json** | `System.GC.DGen0GrowthMaxFactor` | *decimal value* | .NET 10 | + | **Environment variable** | `DOTNET_GCDGen0GrowthMaxFactor` | *hexadecimal value* | .NET 10 | + + [!INCLUDE [runtimehostconfigurationoption](includes/runtimehostconfigurationoption.md)] + + If this value is 20000, it means the maximum clamping value is `20000 * 0.001 = 20`. + +- The minimum clamping value in permil. + + | | Setting name | Values | Version introduced | + |--------------------------|----------------------------|-----------|--------------------| + | **runtimeconfig.json** | `System.GC.DGen0GrowthMinFactor` | *decimal value* | .NET 10 | + | **Environment variable** | `DOTNET_GCDGen0GrowthMinFactor` | *hexadecimal value* | .NET 10 | + + [!INCLUDE [runtimehostconfigurationoption](includes/runtimehostconfigurationoption.md)] + + If this value is 200, the minimum clamping value is `200 * 0.001 = 0.2`. + \ No newline at end of file diff --git a/docs/csharp/language-reference/operators/snippets/shared/OperatorOverloading.cs b/docs/csharp/language-reference/operators/snippets/shared/OperatorOverloading.cs index 643b2cbab8f03..b808fef89c7b4 100644 --- a/docs/csharp/language-reference/operators/snippets/shared/OperatorOverloading.cs +++ b/docs/csharp/language-reference/operators/snippets/shared/OperatorOverloading.cs @@ -36,10 +36,10 @@ public Fraction(int numerator, int denominator) // Define increment and decrement to add 1/den, rather than 1/1. public static Fraction operator ++(Fraction operand) - => new Fraction(operand.numerator++, operand.denominator); + => new Fraction(operand.numerator + 1, operand.denominator); public static Fraction operator --(Fraction operand) => - new Fraction(operand.numerator--, operand.denominator); + new Fraction(operand.numerator - 1, operand.denominator); public override string ToString() => $"{numerator} / {denominator}"; diff --git a/docs/fundamentals/code-analysis/style-rules/ide2002.md b/docs/fundamentals/code-analysis/style-rules/ide2002.md index a07d50712885a..d1054f34f85cc 100644 --- a/docs/fundamentals/code-analysis/style-rules/ide2002.md +++ b/docs/fundamentals/code-analysis/style-rules/ide2002.md @@ -34,18 +34,18 @@ Options specify the behavior that you want the rule to enforce. For information ### csharp_style_allow_blank_lines_between_consecutive_braces_experimental -| Property | Value | Description | -|--------------------------|----------------------------------------------|-------------| -| **Option name** | `csharp_style_allow_blank_lines_between_consecutive_braces_experimental` | | -| **Option values** | `true` | Allow blank lines between consecutive braces | -| | `false` | Don't allow blank lines between consecutive braces | -| **Default option value** | `true` | | +| Property | Value | Description | +|--------------------------|--------------------------------------------------------------------------|----------------------------------------------------| +| **Option name** | `csharp_style_allow_blank_lines_between_consecutive_braces_experimental` | | +| **Option values** | `true` | Allow blank lines between consecutive braces | +| | `false` | Don't allow blank lines between consecutive braces | +| **Default option value** | `true` | | ## Example ```csharp // csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true -public void Method +public void Method() { if (true) { @@ -57,7 +57,7 @@ public void Method ```csharp // csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false -public void Method +public void Method() { if (true) { diff --git a/docs/standard/unsafe-code/best-practices.md b/docs/standard/unsafe-code/best-practices.md index f88dfc25b58bc..e9f9f4e0ddd17 100644 --- a/docs/standard/unsafe-code/best-practices.md +++ b/docs/standard/unsafe-code/best-practices.md @@ -45,7 +45,7 @@ The next sections describe common unsafe patterns with ✔️ DO and ❌ DON'T r ## 1. Untracked managed pointers (`Unsafe.AsPointer` and friends) It's not possible to convert a managed (tracked) pointer to an unmanaged (untracked) -pointer in safe C#. When such need arises, it might be tempting to use `Unsafe.AsPointer` +pointer in safe C#. When such need arises, it might be tempting to use to avoid the overhead of a `fixed` statement. While there are valid use cases for that, it introduces a risk of creating untracked pointers to moveable objects. Example: @@ -92,9 +92,9 @@ unsafe void ReliableCode(ref int x) ### Recommendations -1. ❌ DON'T use `ref X` arguments with an implicit contract that `X` is always stack-allocated, pinned, or otherwise not relocatable by the GC. Consider instead taking a [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md) argument or changing the argument to be a raw pointer type (`X*`). -2. ❌ DON'T use a pointer from `Unsafe.AsPointer` if it can outlive the original object it is pointing to. [Per the API's documentation](xref:System.Runtime.CompilerServices.Unsafe.AsPointer``1(``0@)), it's up to the caller of `Unsafe.AsPointer` to guarantee that the GC cannot relocate the reference. Ensure it's clearly visible to code reviewers that the caller has fulfilled this prerequisite. -3. ✔️ DO use `GCHandle` or `fixed` scopes instead of `Unsafe.AsPointer` to define explicit scopes for unmanaged pointers and to ensure that the object is always pinned. +1. ❌ DON'T use `ref X` arguments with an implicit contract that `X` is always stack-allocated, pinned, or otherwise not relocatable by the GC. Same applies to plain objects and Spans - don't introduce non-obvious caller-based contracts about their lifetimes in methods signatures. Consider instead taking a [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md) argument or changing the argument to be a raw pointer type (`X*`). +2. ❌ DON'T use a pointer from if it can outlive the original object it is pointing to. [Per the API's documentation](xref:System.Runtime.CompilerServices.Unsafe.AsPointer``1(``0@)), it's up to the caller of to guarantee that the GC cannot relocate the reference. Ensure it's clearly visible to code reviewers that the caller has fulfilled this prerequisite. +3. ✔️ DO use [GCHandle](xref:System.Runtime.InteropServices.GCHandle`1) or `fixed` scopes instead of to define explicit scopes for unmanaged pointers and to ensure that the object is always pinned. 4. ✔️ DO use unmanaged pointers (with `fixed`) instead of byrefs when you need to align an array to a specific boundary. This ensures the GC won't relocate the object and invalidate any alignment assumptions your logic might rely upon. ## 2. Exposing pointers outside of the `fixed` scope @@ -111,7 +111,8 @@ unsafe int* GetPointerToArray(int[] array) { _ptrField = pArray; // Bug! - Method(pArray); // Bug if `Method` allows `pArray` to escape, perhaps by assigning it to a field. + Method(pArray); // Bug if `Method` allows `pArray` to escape, + // perhaps by assigning it to a field. return pArray; // Bug! @@ -146,6 +147,15 @@ While accessing or relying on internal implementation details is bad practice in 7. ❌ DON'T simply assume that a reference is non-relocatable. This guidance applies to string and UTF-8 (`"..."u8`) literals, static fields, RVA fields, LOH objects, and so on. * These are runtime implementation details that might hold for some runtimes but not for others. * Unmanaged pointers to such objects might not stop assemblies from being unloaded, causing the pointers to become dangling. Use `fixed` scopes to ensure correctness. + + ```csharp + ReadOnlySpan rva = [1, 2, 4, 4]; + int* p = (int*)Unsafe.AsPointer(ref MemoryMarshal.GetReference(rva)); + // Bug! The assembly containing the RVA field might be unloaded at this point + // and `p` becomes a dangling pointer. + int value = p[0]; // Access violation or other issue. + ``` + 8. ❌ DON'T write code that relies on the implementation details of a specific runtime. ## 4. Invalid managed pointers (even if they are never dereferenced) @@ -225,8 +235,7 @@ And even if the layout is similar, you should still be careful when GC reference ### Recommendations 1. ❌ DON'T cast structs to classes or vice versa. -2. ❌ DON'T use `Unsafe.As` for struct-to-struct or class-to-class conversions unless you're absolutely sure that the cast is legal. - * For more information, see the _Remarks_ section of the [`Unsafe.As` API docs](xref:System.Runtime.CompilerServices.Unsafe.As``2(``0@)). +2. ❌ DON'T use `Unsafe.As` for struct-to-struct or class-to-class conversions unless you're absolutely sure that the cast is legal. For more information, see the _Remarks_ section of the [`Unsafe.As` API docs](xref:System.Runtime.CompilerServices.Unsafe.As``2(``0@)). 3. ✔️ DO prefer safer field-by-field copying, external libraries such as [AutoMapper](https://github.com/AutoMapper/AutoMapper), or Source Generators for such conversions. 4. ✔️ DO prefer `Unsafe.BitCast` over `Unsafe.As`, as `BitCast` provides some rudimentary usage checks. Note that these checks do not provide full correctness guarantees, meaning `BitCast` is still considered an unsafe API. @@ -331,6 +340,20 @@ void DoWork() Therefore, it is recommended to explicitly extend the lifetime of objects using or . +Another classic instance of this problem is API: + +```csharp +var callback = new NativeCallback(OnCallback); + +// Convert delegate to function pointer +IntPtr fnPtr = Marshal.GetFunctionPointerForDelegate(callback); + +// Bug! The delegate might be collected by the GC here. +// It should be kept alive until the native code is done with it. + +RegisterCallback(fnPtr); +``` + ### Recommendations 1. ❌ DON'T make assumptions about object lifetimes. For instance, never assume `this` is always alive through the end of the method. @@ -346,7 +369,7 @@ Example: A struct containing GC references might be zeroed or overwritten in a n ### Recommendations 1. ❌ DON'T access locals across threads (especially if they contain GC references). -2. ✔️ DO use heap or unmanaged memory (for example, `NativeMemory.Alloc`) instead. +2. ✔️ DO use heap or unmanaged memory (for example, ) instead. ## 9. Unsafe bounds check removal @@ -550,7 +573,7 @@ See the [.NET Memory Model](https://github.com/dotnet/runtime/blob/main/docs/des Another risk of unaligned memory access is the potential for an application crash in certain scenarios. While some .NET runtimes rely on the OS to fixup misaligned accesses, there are still some scenarios on some -platforms where misaligned access can lead to an `DataMisalignedException` (or `SEHException`). +platforms where misaligned access can lead to an (or ). Some of the examples include: * `Interlocked` operations on misaligned memory on some platforms ([example](https://github.com/dotnet/runtime/issues/91662)). @@ -563,9 +586,9 @@ Some of the examples include: 2. ✔️ DO align data manually if necessary, but keep in mind that the GC can relocate objects at any time, effectively changing the alignment dynamically. This is especially important for various `StoreAligned`/`LoadAligned` APIs in SIMD. -3. ✔️ DO use explicit unaligned Read/Write APIs such as `Unsafe.ReadUnaligned`/`Unsafe.WriteUnaligned` -instead of aligned ones such as `Unsafe.Read`/`Unsafe.Write` or `Unsafe.As` if data might be misaligned. -4. ✔️ DO keep in mind that various memory manipulation APIs such as `Span.CopyTo` also don't provide atomicity guarantees. +3. ✔️ DO use explicit unaligned Read/Write APIs such as / +instead of aligned ones such as / or if data might be misaligned. +4. ✔️ DO keep in mind that various memory manipulation APIs such as also don't provide atomicity guarantees. 5. ✔️ DO consult with the [.NET Memory Model](https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md) documentation ([see references](#references)) for more details on atomicity guarantees. 6. ✔️ DO measure performance across all your target platforms, as some platforms impose a significant performance penalty for unaligned memory accesses. You may find that on these platforms, naive code performs better than clever code. 7. ✔️ DO keep in mind that there are scenarios and platforms where unaligned memory access might lead to an exception. @@ -616,7 +639,7 @@ ref object obj = ref Unsafe.AsRef((void*)0); ``` The risk of introducing memory safety issues is low, and any attempt to dereference -a null byref will lead to a well-defined `NullReferenceException`. +a null byref will lead to a well-defined [NullReferenceException](xref:System.NullReferenceException). However, the C# compiler [assumes](https://github.com/dotnet/roslyn/issues/72165) that dereferencing a byref always succeeds and produces no observable side effect. Therefore it is a legal optimization to elide any dereference whose resulting value is immediately thrown away. See [dotnet/runtime#98681](https://github.com/dotnet/runtime/pull/98681) (and @@ -670,9 +693,9 @@ the intended logic. // The "throw if length < 0" check below is important, as attempting to stackalloc a negative // length will result in process termination. ArgumentOutOfRangeException.ThrowIfLessThan(length, 0, nameof(length)); - Span s = length <= 512 ? stackalloc int[length] : new int[length]; + Span s = length <= 256 ? stackalloc int[length] : new int[length]; // Or: - // Span s = length <= 512 ? stackalloc int[512] : new int[length]; + // Span s = length <= 256 ? stackalloc int[256] : new int[length]; // Which performs a faster zeroing of the stackalloc, but potentially consumes more stack space. Consume(s); } @@ -717,6 +740,8 @@ ms.buffer[7] = 0; // Bounds check elided; index is known to be in range. ms.buffer[10] = 0; // Compiler knows this is out of range and produces compiler error CS9166. ``` +Another reason to avoid fixed-size buffers in favor of inline arrays, which are always zero-initialized by default, is that fixed-size buffers might have non-zeroed contents in certain scenarios. + ### Recommendations 1. ✔️ DO prefer replacing fixed-size buffers with inline arrays or IL marshalling attributes where possible. @@ -746,7 +771,7 @@ can lead to information disclosure, data corruption, or process termination via 1. ❌ DON'T expose methods whose arguments are pointer types (unmanaged pointers `T*` or managed pointers `ref T`) when those arguments are intended to represent buffers. Use safe buffer types like `Span` or `ReadOnlySpan` instead. 2. ❌ DON'T use implicit contracts for byref arguments, such as requiring all callers to allocate the input on the stack. If such a contract is necessary, consider using [ref struct](../../csharp/language-reference/builtin-types/ref-struct.md) instead. -3. ❌ DON'T assume buffers are zero-terminated unless the scenario explicitly documents that this is a valid assumption. For example, even though .NET guarantees that `string` instances are null-terminated, the same does not hold of other buffer types like `ReadOnlySpan` or `char[]`. +3. ❌ DON'T assume buffers are zero-terminated unless the scenario explicitly documents that this is a valid assumption. For example, even though .NET guarantees that `string` instances and `"..."u8` literals are null-terminated, the same does not hold of other buffer types like `ReadOnlySpan` or `char[]`. ```csharp unsafe void NullTerminationExamples(string str, ReadOnlySpan span, char[] array) @@ -863,11 +888,11 @@ Avoid using such techniques unless absolutely necessary. ### Recommendations -1. ❌ DON'T emit raw IL code as it comes with no guiderails and it makes it easy to introduce type safety and other issues. - * Like other dynamic code generation techniques, emitting raw IL is also not AOT-friendly if it's not done at the build time. +1. ❌ DON'T emit raw IL code as it comes with no guiderails and it makes it easy to introduce type safety and other issues. Like other dynamic code generation techniques, emitting raw IL is also not AOT-friendly if it's not done at the build time. 2. ✔️ DO use Source Generators instead, if possible. 3. ✔️ DO prefer [\[UnsafeAccessor\]](xref:System.Runtime.CompilerServices.UnsafeAccessorAttribute) instead of emitting raw IL for writing low overhead serialization code for private members if the need arises. 4. ✔️ DO file an API proposal against [dotnet/runtime](https://github.com/dotnet/runtime) if some API is missing and you're forced to use raw IL code instead. +5. ✔️ DO use `ilverify` or similar tools to validate the emitted IL code if you must use raw IL. ## 19. Uninitialized locals `[SkipLocalsInit]` and `Unsafe.SkipInit` @@ -947,7 +972,7 @@ While most of the suggestions in this document apply to interop scenarios as wel ## 23. Thread safety -See [Managed threading best practices](../../standard/threading/managed-threading-best-practices.md) and [.NET Memory Model](https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md). +Memory safety and thread safety are orthogonal concepts. Code can be memory safe yet still contain data races, torn reads, or visibility bugs; conversely, code can be thread safe while still invoking undefined behavior through unsafe memory manipulation. For broader guidance, see [Managed threading best practices](../../standard/threading/managed-threading-best-practices.md) and [.NET Memory Model](https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md). ## 24. Unsafe code around SIMD/Vectorization @@ -961,6 +986,29 @@ In the context of the unsafe code it's important to keep in mind: Fuzz testing (or "fuzzing") is an automated software testing technique that involves providing invalid, unexpected, or random data as inputs to a computer program. It provides a way to detect memory safety issues in code that may have gaps in test coverage. You can use tools like [SharpFuzz](https://github.com/Metalnem/sharpfuzz) to set up fuzz testing for .NET code. +## 26. Compiler warnings + +Generally, the C# compiler doesn't provide extensive support such as warnings and analyzers around incorrect unsafe code usage. However, there are some existing warnings that can help detect potential issues and should not be ignored or suppressed without careful consideration. Some examples include: + +```csharp +nint ptr = 0; +unsafe +{ + int local = 0; + ptr = (nint)(&local); +} +await Task.Delay(100); + +// ptr is used here +``` + +This code produces warning CS9123 ("The '&' operator should not be used on parameters or local variables in async methods"), which implies the code is likely incorrect. + +### Recommendations + +1. ✔️ DO pay attention to compiler warnings and fix the underlying issues instead of suppressing them. +2. ❌ DON'T assume that the absence of compiler warnings implies the code is correct. The C# compiler has limited to no support for detecting incorrect unsafe code usage. + ## References * [Unsafe code, pointer types, and function pointers](../../csharp/language-reference/unsafe-code.md). diff --git a/quest-config.json b/quest-config.json index 8c8832209d57f..11cbab1b2866c 100644 --- a/quest-config.json +++ b/quest-config.json @@ -8,43 +8,9 @@ "ImportedLabel": ":pushpin: seQUESTered", "ParentNodes": [ { - "Semester": "Bromine", "Label": "dotnet-csharp/svc", "ParentNodeId": 410745 }, - { - "Semester": "Bromine", - "ParentNodeId": 410746 - }, - { - "Semester": "Selenium", - "Label": "okr-freshness", - "ParentNodeId": 286034 - }, - { - "Semester": "Selenium", - "Label": "okr-curation", - "ParentNodeId": 286038 - }, - { - "Semester": "Selenium", - "Label": "user-feedback", - "ParentNodeId": 286039 - }, - { - "Semester": "Selenium", - "Label": "okr-quality", - "ParentNodeId": 286038 - }, - { - "Semester": "Selenium", - "Label": "doc-bug", - "ParentNodeId": 286039 - }, - { - "Semester": "Selenium", - "ParentNodeId": 308199 - } ], "DefaultParentNode": 410746, "WorkItemTags": [