diff --git a/common/Perf/Azure.Test.Perf/Azure.Test.Perf.csproj b/common/Perf/Azure.Test.Perf/Azure.Test.Perf.csproj
index ffb4f61f4ed0..49664418de5d 100644
--- a/common/Perf/Azure.Test.Perf/Azure.Test.Perf.csproj
+++ b/common/Perf/Azure.Test.Perf/Azure.Test.Perf.csproj
@@ -4,10 +4,9 @@
Perf framework should depend on lowest version of Azure.Core for maximum compat, allowing test
projects to choose a higher version if desired.
-->
-
+
-
diff --git a/eng/Directory.Build.Common.targets b/eng/Directory.Build.Common.targets
index bf137e95b08d..86d56504791b 100644
--- a/eng/Directory.Build.Common.targets
+++ b/eng/Directory.Build.Common.targets
@@ -22,12 +22,12 @@
$([MSBuild]::NormalizeDirectory($(MSBuildProjectDirectory)/../).TrimEnd("/").TrimEnd("\\"))
- $(ApiCompatStandardTargetFramework)
- $(ApiCompatRunnableTargetFramework)
+ $(ApiCompatStandardTargetFramework)
+ $(ApiCompatRunnableTargetFramework)
@@ -176,6 +176,7 @@
+
diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props
index c0ca38c87bc4..9f1870b01b4e 100644
--- a/eng/Packages.Data.props
+++ b/eng/Packages.Data.props
@@ -1,5 +1,7 @@
+
+
@@ -8,57 +10,72 @@
+
-
+
-
-
-
-
-
+
+
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+ 5.1.0
+ 2.0.0
+ 2.3.0
+ 2.3.0
+ 1.13.1
+ 10.0.1
+ 10.0.1
+ 10.0.1
+ 10.0.1
+ 10.0.1
+ 10.0.1
+ 10.0.1
+ 7.5.3
+ 13.0.4
+ 3.14.0
+ 1.14.0
+ 1.14.0
+
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
-
-
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
@@ -152,10 +163,12 @@
+
+
@@ -165,10 +178,18 @@
-
+
+
+
+
+
+
+
+
+
@@ -193,22 +214,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -216,40 +225,50 @@
+
+
+
+
+
+
+
+
-
-
+
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
-
-
+
+
-
+
-
+
@@ -261,41 +280,39 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
@@ -309,9 +326,9 @@
All should have PrivateAssets="All" set so they don't become package dependencies
-->
-
+
@@ -327,54 +344,48 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
+
+
-
+
@@ -382,26 +393,21 @@
-
-
-
-
+
-
-
+
-
+
-
@@ -417,82 +423,77 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
-
-
-
-
-
+
+
-
+
-
-
-
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
1.0.0-dev.20251209.1
1.0.0-alpha.20251217.2
diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Azure.AI.Agents.Persistent.Tests.csproj b/sdk/ai/Azure.AI.Agents.Persistent/tests/Azure.AI.Agents.Persistent.Tests.csproj
index 98849bb65800..846afb11e62d 100644
--- a/sdk/ai/Azure.AI.Agents.Persistent/tests/Azure.AI.Agents.Persistent.Tests.csproj
+++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Azure.AI.Agents.Persistent.Tests.csproj
@@ -11,19 +11,18 @@
-
+
-
-
+
-
\ No newline at end of file
+
diff --git a/sdk/ai/Azure.AI.Inference/src/Azure.AI.Inference.csproj b/sdk/ai/Azure.AI.Inference/src/Azure.AI.Inference.csproj
index 9782e6296fca..82fba38b2b7d 100644
--- a/sdk/ai/Azure.AI.Inference/src/Azure.AI.Inference.csproj
+++ b/sdk/ai/Azure.AI.Inference/src/Azure.AI.Inference.csproj
@@ -20,7 +20,6 @@
-
diff --git a/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj b/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj
index 909a0f5a7867..a11669699e1c 100644
--- a/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj
+++ b/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj
@@ -32,7 +32,6 @@
-
diff --git a/sdk/ai/Azure.AI.Projects/tests/Azure.AI.Projects.Tests.csproj b/sdk/ai/Azure.AI.Projects/tests/Azure.AI.Projects.Tests.csproj
index c3e68296b177..2043e6be259e 100644
--- a/sdk/ai/Azure.AI.Projects/tests/Azure.AI.Projects.Tests.csproj
+++ b/sdk/ai/Azure.AI.Projects/tests/Azure.AI.Projects.Tests.csproj
@@ -1,4 +1,4 @@
-
+
$(RequiredTargetFrameworks)
@@ -11,25 +11,23 @@
-
+
-
-
+
+
-
-
-
+
-
\ No newline at end of file
+
diff --git a/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/SampleProgram.cs b/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/SampleProgram.cs
index fc1fc8c3380c..95121b0c1548 100644
--- a/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/SampleProgram.cs
+++ b/sdk/ai/Azure.AI.VoiceLive/samples/BasicVoiceAssistant/SampleProgram.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System.CommandLine;
+using System.CommandLine.Parsing;
using Azure.AI.VoiceLive.Samples;
using Azure.Core;
using Azure.Core.Pipeline;
@@ -45,80 +46,76 @@ public class SampleProgram
///
///
///
- public static async Task Main(string[] args)
- {
- // Create command line interface
- var rootCommand = CreateRootCommand();
- return await rootCommand.InvokeAsync(args).ConfigureAwait(false);
- }
+ public static async Task Main(string[] args)
+ {
+ var rootCommand = new RootCommand("Basic Voice Assistant using Azure VoiceLive SDK");
- private static RootCommand CreateRootCommand()
+ var apiKeyOption = new Option("--api-key")
{
- var rootCommand = new RootCommand("Basic Voice Assistant using Azure VoiceLive SDK");
-
- var apiKeyOption = new Option(
- "--api-key",
- "Azure VoiceLive API key. If not provided, will use AZURE_VOICELIVE_API_KEY environment variable.");
+ Description = "Azure VoiceLive API key. If not provided, will use AZURE_VOICELIVE_API_KEY environment variable."
+ };
- var endpointOption = new Option(
- "--endpoint",
- () => "wss://api.voicelive.com/v1",
- "Azure VoiceLive endpoint");
+ var endpointOption = new Option("--endpoint")
+ {
+ Description = "Azure VoiceLive endpoint"
+ };
- var modelOption = new Option(
- "--model",
- () => "gpt-4o",
- "VoiceLive model to use");
+ var modelOption = new Option("--model")
+ {
+ Description = "VoiceLive model to use"
+ };
- var voiceOption = new Option(
- "--voice",
- () => "en-US-AvaNeural",
- "Voice to use for the assistant");
+ var voiceOption = new Option("--voice")
+ {
+ Description = "Voice to use for the assistant"
+ };
- var instructionsOption = new Option(
- "--instructions",
- () => "You are a helpful AI assistant. Respond naturally and conversationally. Keep your responses concise but engaging.",
- "System instructions for the AI assistant");
+ var instructionsOption = new Option("--instructions")
+ {
+ Description = "System instructions for the AI assistant"
+ };
- var useTokenCredentialOption = new Option(
- "--use-token-credential",
- "Use Azure token credential instead of API key");
+ var useTokenCredentialOption = new Option("--use-token-credential")
+ {
+ Description = "Use Azure token credential instead of API key"
+ };
- var verboseOption = new Option(
- "--verbose",
- "Enable verbose logging");
+ var verboseOption = new Option("--verbose")
+ {
+ Description = "Enable verbose logging"
+ };
- rootCommand.AddOption(apiKeyOption);
- rootCommand.AddOption(endpointOption);
- rootCommand.AddOption(modelOption);
- rootCommand.AddOption(voiceOption);
- rootCommand.AddOption(instructionsOption);
- rootCommand.AddOption(useTokenCredentialOption);
- rootCommand.AddOption(verboseOption);
+ rootCommand.Add(apiKeyOption);
+ rootCommand.Add(endpointOption);
+ rootCommand.Add(modelOption);
+ rootCommand.Add(voiceOption);
+ rootCommand.Add(instructionsOption);
+ rootCommand.Add(useTokenCredentialOption);
+ rootCommand.Add(verboseOption);
- rootCommand.SetHandler(async (
- string? apiKey,
- string endpoint,
- string model,
- string voice,
- string instructions,
- bool useTokenCredential,
- bool verbose) =>
+ var parseResult = rootCommand.Parse(args);
+ if (parseResult.Errors.Count > 0)
+ {
+ foreach (var error in parseResult.Errors)
{
- await RunVoiceAssistantAsync(apiKey, endpoint, model, voice, instructions, useTokenCredential, verbose).ConfigureAwait(false);
- },
- apiKeyOption,
- endpointOption,
- modelOption,
- voiceOption,
- instructionsOption,
- useTokenCredentialOption,
- verboseOption);
-
- return rootCommand;
+ Console.WriteLine(error.Message);
+ }
+ return 1;
}
- private static async Task RunVoiceAssistantAsync(
+ var apiKey = parseResult.GetValue(apiKeyOption);
+ var endpoint = parseResult.GetValue(endpointOption) ?? "wss://api.voicelive.com/v1";
+ var model = parseResult.GetValue(modelOption) ?? "gpt-4o";
+ var voice = parseResult.GetValue(voiceOption) ?? "en-US-AvaNeural";
+ var instructions = parseResult.GetValue(instructionsOption) ?? "You are a helpful AI assistant. Respond naturally and conversationally. Keep your responses concise but engaging.";
+ var useTokenCredential = parseResult.GetValue(useTokenCredentialOption);
+ var verbose = parseResult.GetValue(verboseOption);
+
+ await RunVoiceAssistantAsync(apiKey, endpoint, model, voice, instructions, useTokenCredential, verbose).ConfigureAwait(false);
+ return 0;
+ }
+
+ private static async Task RunVoiceAssistantAsync(
string? apiKey,
string endpoint,
string model,
diff --git a/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/SampleProgram.cs b/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/SampleProgram.cs
index b8549b2a44dc..3cb60be0161a 100644
--- a/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/SampleProgram.cs
+++ b/sdk/ai/Azure.AI.VoiceLive/samples/CustomerServiceBot/SampleProgram.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT License.
using System.CommandLine;
+using System.CommandLine.Parsing;
using Azure.AI.VoiceLive.Samples;
using Azure.Core;
using Azure.Core.Pipeline;
@@ -51,76 +52,72 @@ public class SampleProgram
///
///
public static async Task Main(string[] args)
- {
- // Create command line interface
- var rootCommand = CreateRootCommand();
- return await rootCommand.InvokeAsync(args).ConfigureAwait(false);
- }
-
- private static RootCommand CreateRootCommand()
{
var rootCommand = new RootCommand("Customer Service Bot using Azure VoiceLive SDK with Function Calling");
- var apiKeyOption = new Option(
- "--api-key",
- "Azure VoiceLive API key. If not provided, will use AZURE_VOICELIVE_API_KEY environment variable.");
+ var apiKeyOption = new Option("--api-key")
+ {
+ Description = "Azure VoiceLive API key. If not provided, will use AZURE_VOICELIVE_API_KEY environment variable."
+ };
- var endpointOption = new Option(
- "--endpoint",
- () => "wss://api.voicelive.com/v1",
- "Azure VoiceLive endpoint");
+ var endpointOption = new Option("--endpoint")
+ {
+ Description = "Azure VoiceLive endpoint"
+ };
- var modelOption = new Option(
- "--model",
- () => "gpt-4o",
- "VoiceLive model to use");
+ var modelOption = new Option("--model")
+ {
+ Description = "VoiceLive model to use"
+ };
- var voiceOption = new Option(
- "--voice",
- () => "en-US-JennyNeural",
- "Voice to use for the customer service bot");
+ var voiceOption = new Option("--voice")
+ {
+ Description = "Voice to use for the customer service bot"
+ };
- var instructionsOption = new Option(
- "--instructions",
- () => "You are a professional customer service representative for TechCorp. You have access to customer databases and order systems. Always be polite, helpful, and efficient. When customers ask about orders, accounts, or need to schedule service, use the available tools to provide accurate, real-time information. Keep your responses concise but thorough.",
- "System instructions for the customer service bot");
+ var instructionsOption = new Option("--instructions")
+ {
+ Description = "System instructions for the customer service bot"
+ };
- var useTokenCredentialOption = new Option(
- "--use-token-credential",
- "Use Azure token credential instead of API key");
+ var useTokenCredentialOption = new Option("--use-token-credential")
+ {
+ Description = "Use Azure token credential instead of API key"
+ };
- var verboseOption = new Option(
- "--verbose",
- "Enable verbose logging");
+ var verboseOption = new Option("--verbose")
+ {
+ Description = "Enable verbose logging"
+ };
- rootCommand.AddOption(apiKeyOption);
- rootCommand.AddOption(endpointOption);
- rootCommand.AddOption(modelOption);
- rootCommand.AddOption(voiceOption);
- rootCommand.AddOption(instructionsOption);
- rootCommand.AddOption(useTokenCredentialOption);
- rootCommand.AddOption(verboseOption);
+ rootCommand.Add(apiKeyOption);
+ rootCommand.Add(endpointOption);
+ rootCommand.Add(modelOption);
+ rootCommand.Add(voiceOption);
+ rootCommand.Add(instructionsOption);
+ rootCommand.Add(useTokenCredentialOption);
+ rootCommand.Add(verboseOption);
- rootCommand.SetHandler(async (
- string? apiKey,
- string endpoint,
- string model,
- string voice,
- string instructions,
- bool useTokenCredential,
- bool verbose) =>
+ var parseResult = rootCommand.Parse(args);
+ if (parseResult.Errors.Count > 0)
{
- await RunCustomerServiceBotAsync(apiKey, endpoint, model, voice, instructions, useTokenCredential, verbose).ConfigureAwait(false);
- },
- apiKeyOption,
- endpointOption,
- modelOption,
- voiceOption,
- instructionsOption,
- useTokenCredentialOption,
- verboseOption);
+ foreach (var error in parseResult.Errors)
+ {
+ Console.WriteLine(error.Message);
+ }
+ return 1;
+ }
+
+ var apiKey = parseResult.GetValue(apiKeyOption);
+ var endpoint = parseResult.GetValue(endpointOption) ?? "wss://api.voicelive.com/v1";
+ var model = parseResult.GetValue(modelOption) ?? "gpt-4o";
+ var voice = parseResult.GetValue(voiceOption) ?? "en-US-JennyNeural";
+ var instructions = parseResult.GetValue(instructionsOption) ?? "You are a professional customer service representative for TechCorp. You have access to customer databases and order systems. Always be polite, helpful, and efficient. When customers ask about orders, accounts, or need to schedule service, use the available tools to provide accurate, real-time information. Keep your responses concise but thorough.";
+ var useTokenCredential = parseResult.GetValue(useTokenCredentialOption);
+ var verbose = parseResult.GetValue(verboseOption);
- return rootCommand;
+ await RunCustomerServiceBotAsync(apiKey, endpoint, model, voice, instructions, useTokenCredential, verbose).ConfigureAwait(false);
+ return 0;
}
private static async Task RunCustomerServiceBotAsync(
diff --git a/sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj b/sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj
index 5894139784a7..83dd7233aa8c 100644
--- a/sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj
+++ b/sdk/ai/Azure.AI.VoiceLive/src/Azure.AI.VoiceLive.csproj
@@ -38,6 +38,5 @@
-
diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/tests/Azure.ResourceManager.Automanage.Tests.csproj b/sdk/automanage/Azure.ResourceManager.Automanage/tests/Azure.ResourceManager.Automanage.Tests.csproj
index 0fcaf6ff968d..50953215c31f 100644
--- a/sdk/automanage/Azure.ResourceManager.Automanage/tests/Azure.ResourceManager.Automanage.Tests.csproj
+++ b/sdk/automanage/Azure.ResourceManager.Automanage/tests/Azure.ResourceManager.Automanage.Tests.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/sdk/batch/Azure.Compute.Batch/tests/Azure.Compute.Batch.Tests.csproj b/sdk/batch/Azure.Compute.Batch/tests/Azure.Compute.Batch.Tests.csproj
index 03a2fb76582e..2dc342dc07bd 100644
--- a/sdk/batch/Azure.Compute.Batch/tests/Azure.Compute.Batch.Tests.csproj
+++ b/sdk/batch/Azure.Compute.Batch/tests/Azure.Compute.Batch.Tests.csproj
@@ -1,4 +1,4 @@
-
+
$(RequiredTargetFrameworks)
@@ -17,7 +17,6 @@
-
diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/tests/Azure.ResourceManager.Chaos.Tests.csproj b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Azure.ResourceManager.Chaos.Tests.csproj
index 5bb6e0f8410c..c8c13161b966 100644
--- a/sdk/chaos/Azure.ResourceManager.Chaos/tests/Azure.ResourceManager.Chaos.Tests.csproj
+++ b/sdk/chaos/Azure.ResourceManager.Chaos/tests/Azure.ResourceManager.Chaos.Tests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/sdk/cloudmachine/Azure.Projects.AI/src/Azure.Projects.AI.csproj b/sdk/cloudmachine/Azure.Projects.AI/src/Azure.Projects.AI.csproj
index a9d885e79ab1..afd72985b3dd 100644
--- a/sdk/cloudmachine/Azure.Projects.AI/src/Azure.Projects.AI.csproj
+++ b/sdk/cloudmachine/Azure.Projects.AI/src/Azure.Projects.AI.csproj
@@ -12,13 +12,12 @@
OPENAI001
true
-
+
-
-
+
diff --git a/sdk/cloudmachine/Azure.Projects.Provisioning/tests/Azure.Projects.Provisioning.Tests.csproj b/sdk/cloudmachine/Azure.Projects.Provisioning/tests/Azure.Projects.Provisioning.Tests.csproj
index 47deb89cde14..5e78ce3738d6 100644
--- a/sdk/cloudmachine/Azure.Projects.Provisioning/tests/Azure.Projects.Provisioning.Tests.csproj
+++ b/sdk/cloudmachine/Azure.Projects.Provisioning/tests/Azure.Projects.Provisioning.Tests.csproj
@@ -3,14 +3,14 @@
12
-
+
-
+
diff --git a/sdk/cloudmachine/Azure.Projects/src/Azure.Projects.csproj b/sdk/cloudmachine/Azure.Projects/src/Azure.Projects.csproj
index 7c2064bf6b21..5e35aae217ba 100644
--- a/sdk/cloudmachine/Azure.Projects/src/Azure.Projects.csproj
+++ b/sdk/cloudmachine/Azure.Projects/src/Azure.Projects.csproj
@@ -25,8 +25,6 @@
-
-
diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering.Authoring/src/Azure.AI.Language.QuestionAnswering.Authoring.csproj b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering.Authoring/src/Azure.AI.Language.QuestionAnswering.Authoring.csproj
index 6d73374ead74..642b7323f70c 100644
--- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering.Authoring/src/Azure.AI.Language.QuestionAnswering.Authoring.csproj
+++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering.Authoring/src/Azure.AI.Language.QuestionAnswering.Authoring.csproj
@@ -15,7 +15,6 @@
-
diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Customized/Models/CognitiveServicesCommitmentPlanPatch.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Customized/Models/CognitiveServicesCommitmentPlanPatch.Serialization.cs
index 1eedfac4c8d4..9227c6204127 100644
--- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Customized/Models/CognitiveServicesCommitmentPlanPatch.Serialization.cs
+++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Customized/Models/CognitiveServicesCommitmentPlanPatch.Serialization.cs
@@ -107,7 +107,7 @@ BinaryData IPersistableModel.Write(ModelRe
switch (format)
{
case "J":
- return ModelReaderWriter.Write(this, options);
+ return ModelReaderWriter.Write(this, options, AzureResourceManagerCognitiveServicesContext.Default);
default:
throw new FormatException($"The model {nameof(CognitiveServicesCommitmentPlanPatch)} does not support writing '{options.Format}' format.");
}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/Azure.Containers.ContainerRegistry.sln b/sdk/containerregistry/Azure.Containers.ContainerRegistry/Azure.Containers.ContainerRegistry.sln
index dea987f5ed85..31c0e22233c6 100644
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/Azure.Containers.ContainerRegistry.sln
+++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/Azure.Containers.ContainerRegistry.sln
@@ -1,18 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.5.33627.172
+# Visual Studio Version 18
+VisualStudioVersion = 18.1.11312.151 d18.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Containers.ContainerRegistry", "src\Azure.Containers.ContainerRegistry.csproj", "{E33D09D9-D809-472C-82E6-6A26BDB86FC2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{8052009B-2126-44A3-88CD-4F3B17894C64}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Test.Perf", "..\..\..\common\Perf\Azure.Test.Perf\Azure.Test.Perf.csproj", "{0ED9C8A0-9A19-4750-8DD3-61D086288283}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Containers.ContainerRegistry.Tests", "tests\Azure.Containers.ContainerRegistry.Tests.csproj", "{3AEC1467-61D0-4A91-93FA-2BD391122D21}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Containers.ContainerRegistry.Perf", "perf\Azure.Containers.ContainerRegistry.Perf\Azure.Containers.ContainerRegistry.Perf.csproj", "{D8B4B378-8339-44AB-BBEC-056B82A15A0A}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,18 +23,10 @@ Global
{8052009B-2126-44A3-88CD-4F3B17894C64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8052009B-2126-44A3-88CD-4F3B17894C64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8052009B-2126-44A3-88CD-4F3B17894C64}.Release|Any CPU.Build.0 = Release|Any CPU
- {0ED9C8A0-9A19-4750-8DD3-61D086288283}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0ED9C8A0-9A19-4750-8DD3-61D086288283}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0ED9C8A0-9A19-4750-8DD3-61D086288283}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0ED9C8A0-9A19-4750-8DD3-61D086288283}.Release|Any CPU.Build.0 = Release|Any CPU
{3AEC1467-61D0-4A91-93FA-2BD391122D21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3AEC1467-61D0-4A91-93FA-2BD391122D21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3AEC1467-61D0-4A91-93FA-2BD391122D21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3AEC1467-61D0-4A91-93FA-2BD391122D21}.Release|Any CPU.Build.0 = Release|Any CPU
- {D8B4B378-8339-44AB-BBEC-056B82A15A0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D8B4B378-8339-44AB-BBEC-056B82A15A0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D8B4B378-8339-44AB-BBEC-056B82A15A0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D8B4B378-8339-44AB-BBEC-056B82A15A0A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Azure.Containers.ContainerRegistry.Perf.csproj b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Azure.Containers.ContainerRegistry.Perf.csproj
deleted file mode 100644
index e1af25bd1ba0..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Azure.Containers.ContainerRegistry.Perf.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
- Exe
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Infrastructure/ContainerRegistryPerfTest.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Infrastructure/ContainerRegistryPerfTest.cs
deleted file mode 100644
index a2b9d742093a..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Infrastructure/ContainerRegistryPerfTest.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Azure.Test.Perf;
-using Microsoft.Azure.Management.ContainerRegistry;
-using Microsoft.Azure.Management.ContainerRegistry.Models;
-using Microsoft.Azure.Management.ResourceManager.Fluent;
-using Microsoft.Azure.Management.ResourceManager.Fluent.Authentication;
-using Task = System.Threading.Tasks.Task;
-
-namespace Azure.Containers.ContainerRegistry.Perf
-{
- public abstract class ContainerRegistryPerfTest : PerfTest
- {
- public const string RepositoryName = $"library/node";
- public const string TagName = "test-perf";
-
- public const int BlobSize = 10 * 1024;
-
- public ContainerRegistryPerfTest(PerfOptions options) : base(options)
- {
- }
-
- public async Task ImportImageAsync(string registry, string repository, string tag)
- {
- await ImportImageAsync(registry, repository, new List() { tag });
- }
-
- public async Task ImportImageAsync(string registry, string repository, List tags)
- {
- var credential = new AzureCredentials(
- new ServicePrincipalLoginInformation
- {
- ClientId = PerfTestEnvironment.Instance.ClientId,
- ClientSecret = PerfTestEnvironment.Instance.ClientSecret,
- },
- PerfTestEnvironment.Instance.TenantId,
- AzureEnvironment.AzureGlobalCloud);
-
- var managementClient = new ContainerRegistryManagementClient(credential.WithDefaultSubscription(PerfTestEnvironment.Instance.SubscriptionId));
- managementClient.SubscriptionId = PerfTestEnvironment.Instance.SubscriptionId;
-
- var importSource = new ImportSource
- {
- SourceImage = repository,
- RegistryUri = "registry.hub.docker.com"
- };
-
- var targetTags = tags.Select(tag => $"{repository}:{tag}");
-
- await managementClient.Registries.ImportImageAsync(
- resourceGroupName: PerfTestEnvironment.Instance.ResourceGroup,
- registryName: registry,
- parameters:
- new ImportImageParameters
- {
- Mode = ImportMode.Force,
- Source = importSource,
- TargetTags = targetTags.ToList()
- });
- }
- }
-}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Infrastructure/PerfTestEnvironment.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Infrastructure/PerfTestEnvironment.cs
deleted file mode 100644
index 21d5c115a036..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Infrastructure/PerfTestEnvironment.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System;
-using Azure.Core.TestFramework;
-
-namespace Azure.Containers.ContainerRegistry.Perf
-{
- ///
- /// Represents the ambient environment in which the test suite is being run, offering access to information such as environment variables.
- ///
- internal sealed class PerfTestEnvironment : TestEnvironment
- {
- ///
- /// The shared instance of the to be used during test runs.
- ///
- public static PerfTestEnvironment Instance { get; } = new PerfTestEnvironment();
-
- ///
- /// The endpoint of the Container Registry resource to test against.
- ///
- /// The endpoint, read from the "CONTAINERREGISTRY_ENDPOINT" environment variable.
- public string Endpoint => GetVariable("CONTAINERREGISTRY_ENDPOINT");
-
- ///
- /// The name of the registry to test against.
- ///
- /// The registry name, read from the "CONTAINERREGISTRY_REGISTRY_NAME" environment variable.
- public string Registry => GetVariable("CONTAINERREGISTRY_REGISTRY_NAME");
- }
-}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Program.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Program.cs
deleted file mode 100644
index 1ad7284aaa19..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Program.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System.Reflection;
-using Azure.Test.Perf;
-
-await PerfProgram.Main(Assembly.GetEntryAssembly(), args);
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/README.md b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/README.md
deleted file mode 100644
index ee2f7f138d40..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Azure Container Registry performance tests
-
-This folder contains performance tests for the [Azure Container Registry client library for .NET](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/containerregistry/Azure.Containers.ContainerRegistry) and its associated ecosystem. The artifacts in this library are intended to be used primarily with the Azure SDK engineering system's testing infrastructure, but may also be run as stand-alone applications from the command line.
-
-## Contributing
-
-This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
-
-When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
-
-This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
-
-Please see our [contributing guide](https://github.com/Azure/azure-sdk-for-net/blob/main/CONTRIBUTING.md) for more information.
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/DownloadBlob.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/DownloadBlob.cs
deleted file mode 100644
index fbac723bea1c..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/DownloadBlob.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System;
-using System.IO;
-using System.Threading;
-using System.Threading.Tasks;
-using Azure.Test.Perf;
-
-namespace Azure.Containers.ContainerRegistry.Perf
-{
- public sealed class DownloadBlob : ContainerRegistryPerfTest
- {
- private readonly ContainerRegistryContentClient _client;
-
- private string _digest;
-
- public DownloadBlob(PerfOptions options) : base(options)
- {
- _client = new ContainerRegistryContentClient(new Uri(PerfTestEnvironment.Instance.Endpoint), ContainerRegistryPerfTest.RepositoryName, PerfTestEnvironment.Instance.Credential);
- }
-
- public override async Task SetupAsync()
- {
- await base.SetupAsync();
-
- using Stream stream = RandomStream.Create(BlobSize);
- UploadRegistryBlobResult result = await _client.UploadBlobAsync(stream);
-
- _digest = result.Digest;
- }
-
- public override void Run(CancellationToken cancellationToken)
- {
- _client.DownloadBlobTo(_digest, Stream.Null, cancellationToken);
- }
-
- public override async Task RunAsync(CancellationToken cancellationToken)
- {
- await _client.DownloadBlobToAsync(_digest, Stream.Null, cancellationToken);
- }
- }
-}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/ListArtifacts.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/ListArtifacts.cs
deleted file mode 100644
index c46c581b3b55..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/ListArtifacts.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using Azure.Test.Perf;
-
-namespace Azure.Containers.ContainerRegistry.Perf
-{
- public sealed class ListArtifacts : ContainerRegistryPerfTest
- {
- private readonly ContainerRegistryClient _client;
- private ContainerRepository _repository;
-
- public ListArtifacts(PerfOptions options) : base(options)
- {
- _client = new ContainerRegistryClient(new Uri(PerfTestEnvironment.Instance.Endpoint), PerfTestEnvironment.Instance.Credential,
- new ContainerRegistryClientOptions()
- {
- Audience = ContainerRegistryAudience.AzureResourceManagerPublicCloud
- });
- }
-
- public override async Task GlobalSetupAsync()
- {
- // Global setup code that runs once at the beginning of test execution.
- await base.GlobalSetupAsync();
-
- await ImportImageAsync(PerfTestEnvironment.Instance.Registry, RepositoryName, TagName);
- }
-
- public override async Task SetupAsync()
- {
- await base.SetupAsync();
-
- _repository = _client.GetRepository(RepositoryName);
- }
-
- public override void Run(CancellationToken cancellationToken)
- {
- foreach (var manifest in _repository.GetAllManifestProperties())
- {
- _client.GetArtifact(RepositoryName, manifest.Digest);
- }
- }
-
- public override async Task RunAsync(CancellationToken cancellationToken)
- {
- await foreach (var manifest in _repository.GetAllManifestPropertiesAsync())
- {
- _client.GetArtifact(RepositoryName, manifest.Digest);
- }
- }
- }
-}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/ListRepositories.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/ListRepositories.cs
deleted file mode 100644
index 6e60bfce1704..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/ListRepositories.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using Azure.Test.Perf;
-
-namespace Azure.Containers.ContainerRegistry.Perf
-{
- public sealed class ListRepositories : ContainerRegistryPerfTest
- {
- private readonly ContainerRegistryClient _client;
-
- public ListRepositories(PerfOptions options) : base(options)
- {
- _client = new ContainerRegistryClient(new Uri(PerfTestEnvironment.Instance.Endpoint), PerfTestEnvironment.Instance.Credential,
- new ContainerRegistryClientOptions()
- {
- Audience = ContainerRegistryAudience.AzureResourceManagerPublicCloud
- });
- }
-
- public override void Run(CancellationToken cancellationToken)
- {
- foreach (var repositoryName in _client.GetRepositoryNames())
- {
- _client.GetRepository(repositoryName);
- }
- }
-
- public override async Task RunAsync(CancellationToken cancellationToken)
- {
- await foreach (var repositoryName in _client.GetRepositoryNamesAsync())
- {
- _client.GetRepository(repositoryName);
- }
- }
- }
-}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/UploadBlob.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/UploadBlob.cs
deleted file mode 100644
index e4012aa25be1..000000000000
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/perf/Azure.Containers.ContainerRegistry.Perf/Scenarios/UploadBlob.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System;
-using System.IO;
-using System.Threading;
-using System.Threading.Tasks;
-using Azure.Test.Perf;
-
-namespace Azure.Containers.ContainerRegistry.Perf
-{
- public sealed class UploadBlob : ContainerRegistryPerfTest
- {
- private readonly ContainerRegistryContentClient _client;
-
- public UploadBlob(PerfOptions options) : base(options)
- {
- _client = new ContainerRegistryContentClient(new Uri(PerfTestEnvironment.Instance.Endpoint), ContainerRegistryPerfTest.RepositoryName, PerfTestEnvironment.Instance.Credential);
- }
-
- public override void Run(CancellationToken cancellationToken)
- {
- using Stream stream = RandomStream.Create(BlobSize);
- _client.UploadBlob(stream, cancellationToken);
- }
-
- public override async Task RunAsync(CancellationToken cancellationToken)
- {
- using Stream stream = RandomStream.Create(BlobSize);
- await _client.UploadBlobAsync(stream, cancellationToken);
- }
- }
-}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Azure.Containers.ContainerRegistry.Tests.csproj b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Azure.Containers.ContainerRegistry.Tests.csproj
index 8940f31f6caa..269336aa2523 100644
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Azure.Containers.ContainerRegistry.Tests.csproj
+++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Azure.Containers.ContainerRegistry.Tests.csproj
@@ -6,17 +6,16 @@
-
+
-
+
-
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryContentClientLiveTests.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryContentClientLiveTests.cs
index a1e99aa0e215..3f9a19d3c2aa 100644
--- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryContentClientLiveTests.cs
+++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryContentClientLiveTests.cs
@@ -12,7 +12,6 @@
using Azure.Core.Pipeline;
using Azure.Core.TestFramework;
using Azure.Core.TestFramework.Models;
-using Azure.Test.Perf;
using NUnit.Framework;
namespace Azure.Containers.ContainerRegistry.Tests
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/CircularStream.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/CircularStream.cs
new file mode 100644
index 000000000000..16f762a98f10
--- /dev/null
+++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/CircularStream.cs
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System;
+using System.IO;
+
+namespace Azure.Containers.ContainerRegistry.Tests
+{
+ public class CircularStream : Stream
+ {
+ private readonly Stream _innerStream;
+ private readonly long _length;
+
+ private long _position;
+
+ public override bool CanRead => true;
+
+ public override bool CanSeek => true;
+
+ public override bool CanWrite => false;
+
+ public override long Length => _length;
+
+ public override long Position
+ {
+ get
+ {
+ return _position;
+ }
+ set
+ {
+ if (value < 0 || value > Length)
+ {
+ throw new ArgumentException("Position must be between 0 and Length inclusive");
+ }
+
+ _position = value;
+ _innerStream.Position = _position % _innerStream.Length;
+ }
+ }
+
+ public CircularStream(Stream innerStream, long length)
+ {
+ _innerStream = innerStream;
+ _length = length;
+ }
+
+ public override void Flush()
+ {
+ throw new NotImplementedException();
+ }
+
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ var bytesAvailable = (Length - Position);
+ var bytesToRead = (int)Math.Min((long)count, bytesAvailable);
+
+ var bytesRead = _innerStream.Read(buffer, offset, bytesToRead);
+
+ if (_innerStream.Position == _innerStream.Length)
+ {
+ _innerStream.Seek(0, SeekOrigin.Begin);
+ }
+
+ Position += bytesRead;
+
+ return bytesRead;
+ }
+
+ public override long Seek(long offset, SeekOrigin origin)
+ {
+ Position = origin switch
+ {
+ SeekOrigin.Begin => offset,
+ SeekOrigin.End => Length - offset,
+ SeekOrigin.Current => Position + offset,
+ _ => throw new InvalidOperationException()
+ };
+
+ return Position;
+ }
+
+ public override void SetLength(long value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ throw new NotImplementedException();
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ _innerStream.Dispose();
+ base.Dispose(disposing);
+ }
+ }
+}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/RandomByteArray.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/RandomByteArray.cs
new file mode 100644
index 000000000000..44eb9e347f83
--- /dev/null
+++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/RandomByteArray.cs
@@ -0,0 +1,15 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+namespace Azure.Containers.ContainerRegistry.Tests
+{
+ public static class RandomByteArray
+ {
+ public static byte[] Create(int size)
+ {
+ var bytes = new byte[size];
+ ThreadsafeRandom.NextBytes(bytes);
+ return bytes;
+ }
+ }
+}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/RandomStream.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/RandomStream.cs
new file mode 100644
index 000000000000..0f078b3a4af2
--- /dev/null
+++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/RandomStream.cs
@@ -0,0 +1,15 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System;
+using System.IO;
+
+namespace Azure.Containers.ContainerRegistry.Tests
+{
+ public static class RandomStream
+ {
+ private static readonly Lazy _randomBytes = new Lazy(() => RandomByteArray.Create(1024 * 1024));
+
+ public static Stream Create(long size) => new CircularStream(new MemoryStream(_randomBytes.Value, writable: false), size);
+ }
+}
diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/ThreadSafeRandom.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/ThreadSafeRandom.cs
new file mode 100644
index 000000000000..99127e861063
--- /dev/null
+++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Infrastructure/ThreadSafeRandom.cs
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using System;
+using System.Threading;
+
+namespace Azure.Containers.ContainerRegistry.Tests
+{
+ // Adapted from https://devblogs.microsoft.com/pfxteam/getting-random-numbers-in-a-thread-safe-way/
+ public static class ThreadsafeRandom
+ {
+ private static readonly Random _globalRandom = new Random();
+
+ private static readonly ThreadLocal _threadRandom = new ThreadLocal(() =>
+ {
+ lock (_globalRandom)
+ {
+ return new Random(_globalRandom.Next());
+ }
+ });
+
+ private static Random ThreadRandom => _threadRandom.Value;
+
+ public static int Next() => ThreadRandom.Next();
+
+ public static int Next(int minValue, int maxValue) => ThreadRandom.Next(minValue, maxValue);
+
+ public static int Next(int maxValue) => ThreadRandom.Next(maxValue);
+
+ public static void NextBytes(byte[] buffer) => ThreadRandom.NextBytes(buffer);
+
+ public static double NextDouble() => ThreadRandom.NextDouble();
+ }
+}
diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Azure.AI.ContentSafety.Tests.csproj b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Azure.AI.ContentSafety.Tests.csproj
index 06a4365d12ae..48ca7201e915 100644
--- a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Azure.AI.ContentSafety.Tests.csproj
+++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Azure.AI.ContentSafety.Tests.csproj
@@ -11,13 +11,13 @@
-
+
-
+
@@ -28,4 +28,4 @@
-
\ No newline at end of file
+
diff --git a/sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj b/sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj
index 87497b76f163..7b46628746b9 100644
--- a/sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj
+++ b/sdk/core/Azure.Core/tests/Azure.Core.Tests.csproj
@@ -18,7 +18,7 @@
-
+
diff --git a/sdk/core/System.ClientModel/tests/System.ClientModel.Tests.csproj b/sdk/core/System.ClientModel/tests/System.ClientModel.Tests.csproj
index a86da00a260a..081cad51949f 100644
--- a/sdk/core/System.ClientModel/tests/System.ClientModel.Tests.csproj
+++ b/sdk/core/System.ClientModel/tests/System.ClientModel.Tests.csproj
@@ -15,9 +15,9 @@
-
+
-
+
@@ -32,14 +32,14 @@
-
+
-
+
diff --git a/sdk/core/System.ClientModel/tests/client/System.ClientModel.Tests.Client.csproj b/sdk/core/System.ClientModel/tests/client/System.ClientModel.Tests.Client.csproj
index 6f913f572f1c..ee3d80fce48c 100644
--- a/sdk/core/System.ClientModel/tests/client/System.ClientModel.Tests.Client.csproj
+++ b/sdk/core/System.ClientModel/tests/client/System.ClientModel.Tests.Client.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/sdk/core/System.ClientModel/tests/gen.unit/System.ClientModel.SourceGeneration.Unit.Tests.csproj b/sdk/core/System.ClientModel/tests/gen.unit/System.ClientModel.SourceGeneration.Unit.Tests.csproj
index f2eac7437f7a..2c42961bdfc6 100644
--- a/sdk/core/System.ClientModel/tests/gen.unit/System.ClientModel.SourceGeneration.Unit.Tests.csproj
+++ b/sdk/core/System.ClientModel/tests/gen.unit/System.ClientModel.SourceGeneration.Unit.Tests.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/sdk/core/System.ClientModel/tests/gen/System.ClientModel.SourceGeneration.Tests.csproj b/sdk/core/System.ClientModel/tests/gen/System.ClientModel.SourceGeneration.Tests.csproj
index 63babb798922..3d9c3aae669d 100644
--- a/sdk/core/System.ClientModel/tests/gen/System.ClientModel.SourceGeneration.Tests.csproj
+++ b/sdk/core/System.ClientModel/tests/gen/System.ClientModel.SourceGeneration.Tests.csproj
@@ -13,10 +13,9 @@
-
-
-
-
+
+
+
diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/Azure.DigitalTwins.Core.Tests.csproj b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/Azure.DigitalTwins.Core.Tests.csproj
index e696c7efa850..4c15793e961b 100644
--- a/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/Azure.DigitalTwins.Core.Tests.csproj
+++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/tests/Azure.DigitalTwins.Core.Tests.csproj
@@ -7,7 +7,6 @@
-
diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj
index 1f50207d8575..2ce1290e7f28 100644
--- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj
+++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/src/Microsoft.Azure.WebJobs.Extensions.EventGrid.csproj
@@ -15,7 +15,6 @@
-
diff --git a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/Microsoft.Azure.WebJobs.Extensions.EventGrid.Tests.csproj b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/Microsoft.Azure.WebJobs.Extensions.EventGrid.Tests.csproj
index 01e43b238fbc..1b17604f653e 100644
--- a/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/Microsoft.Azure.WebJobs.Extensions.EventGrid.Tests.csproj
+++ b/sdk/eventgrid/Microsoft.Azure.WebJobs.Extensions.EventGrid/tests/Microsoft.Azure.WebJobs.Extensions.EventGrid.Tests.csproj
@@ -5,13 +5,16 @@
+
-
-
+
+
+
+
@@ -19,7 +22,7 @@
-
+
diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj b/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj
index cfbcc1c35d68..39e51a312436 100644
--- a/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj
+++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/tests/Azure.ResourceManager.EventHubs.Tests.csproj
@@ -5,8 +5,8 @@
-
-
+
+
diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Microsoft.Azure.WebJobs.Extensions.EventHubs.csproj b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Microsoft.Azure.WebJobs.Extensions.EventHubs.csproj
index 99ec6ce51f77..0b486c110e1f 100644
--- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Microsoft.Azure.WebJobs.Extensions.EventHubs.csproj
+++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Microsoft.Azure.WebJobs.Extensions.EventHubs.csproj
@@ -17,7 +17,6 @@
-
diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/Microsoft.Azure.WebJobs.Extensions.EventHubs.Tests.csproj b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/Microsoft.Azure.WebJobs.Extensions.EventHubs.Tests.csproj
index 89bca7960687..bbaf1c70e232 100644
--- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/Microsoft.Azure.WebJobs.Extensions.EventHubs.Tests.csproj
+++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/Microsoft.Azure.WebJobs.Extensions.EventHubs.Tests.csproj
@@ -11,11 +11,13 @@
-
+
+
+
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Helpers/DependencyResolverHelper.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Helpers/DependencyResolverHelper.cs
index e751fd40cb88..21fb08d41a02 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Helpers/DependencyResolverHelper.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Helpers/DependencyResolverHelper.cs
@@ -4,21 +4,22 @@
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
namespace Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers
{
internal class DependencyResolverHelper
{
- private readonly IWebHost _webHost;
+ private readonly IHost _host;
- public DependencyResolverHelper(IWebHost webHost)
+ public DependencyResolverHelper(IHost host)
{
- _webHost = webHost;
+ _host = host;
}
public T GetService()
{
- using IServiceScope serviceScope = _webHost.Services.CreateScope();
+ using IServiceScope serviceScope = _host.Services.CreateScope();
IServiceProvider services = serviceScope.ServiceProvider;
T scopedService = services.GetRequiredService();
return scopedService;
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Helpers/ServiceHelper.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Helpers/ServiceHelper.cs
index 3d5c67c53a0b..b83b518e5e90 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Helpers/ServiceHelper.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Helpers/ServiceHelper.cs
@@ -1,7 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
+using System;
using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
@@ -11,15 +15,20 @@ namespace Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers
{
public static class ServiceHelper
{
- public static IWebHostBuilder CreateWebHostBuilder()
- where TStartup : class
+#if NET462
+ public static IHost CreateHost() where TStartup : class
{
- return new WebHostBuilder()
+ var webHost = WebHost.CreateDefaultBuilder()
+ .UseKestrel(options =>
+ {
+ options.Listen(IPAddress.Any, 0);
+ })
+ .UseStartup()
.ConfigureAppConfiguration((hostingContext, config) =>
{
config.AddEnvironmentVariables();
})
- .ConfigureLogging(logging =>
+ .ConfigureLogging((hostingContext, logging) =>
{
#if DEBUG
logging.AddFilter("Default", LogLevel.Debug);
@@ -32,11 +41,51 @@ public static IWebHostBuilder CreateWebHostBuilder()
{
options.ValidateScopes = context.HostingEnvironment.IsDevelopment();
})
- .UseKestrel(options =>
+ .Build();
+
+ return new WebHostWrapper(webHost);
+ }
+
+ private class WebHostWrapper : IHost
+ {
+ private readonly IWebHost _webHost;
+ public WebHostWrapper(IWebHost webHost) => _webHost = webHost;
+ public IServiceProvider Services => _webHost.Services;
+ public Task StartAsync(CancellationToken cancellationToken = default) => _webHost.StartAsync(cancellationToken);
+ public Task StopAsync(CancellationToken cancellationToken = default) => _webHost.StopAsync(cancellationToken);
+ public void Dispose() => _webHost.Dispose();
+ }
+#else
+ public static IHost CreateHost() where TStartup : class
+ {
+ return Host.CreateDefaultBuilder()
+ .ConfigureWebHostDefaults(webBuilder =>
{
- options.Listen(IPAddress.Any, 0);
+ webBuilder.UseKestrel(options =>
+ {
+ options.Listen(IPAddress.Any, 0);
+ })
+ .UseStartup();
+ })
+ .ConfigureAppConfiguration((hostingContext, config) =>
+ {
+ config.AddEnvironmentVariables();
+ })
+ .ConfigureLogging(logging =>
+ {
+#if DEBUG
+ logging.AddFilter("Default", LogLevel.Debug);
+ logging.AddFilter("Microsoft", LogLevel.Debug);
+ logging.SetMinimumLevel(LogLevel.Debug);
+ logging.AddDebug();
+#endif // DEBUG
+ })
+ .UseDefaultServiceProvider((context, options) =>
+ {
+ options.ValidateScopes = context.HostingEnvironment.IsDevelopment();
})
- .UseStartup();
+ .Build();
}
+#endif
}
}
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_EndToEnd.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_EndToEnd.cs
index 0051e5f90126..73440926d49c 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_EndToEnd.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_EndToEnd.cs
@@ -9,6 +9,7 @@
using Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using Microsoft.WCF.Azure.StorageQueues;
using NUnit.Framework;
using System;
@@ -19,12 +20,12 @@ namespace CoreWCF
{
public class IntegrationTests_EndToEnd
{
- private IWebHost host;
+ private IHost host;
[SetUp]
public void Setup()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
host.Start();
}
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_EndToEnd_BinaryEncoding.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_EndToEnd_BinaryEncoding.cs
index ba1ef8441821..cb5e18c85bef 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_EndToEnd_BinaryEncoding.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_EndToEnd_BinaryEncoding.cs
@@ -7,6 +7,7 @@
using Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using Microsoft.WCF.Azure.StorageQueues;
using NUnit.Framework;
using System;
@@ -16,12 +17,12 @@ namespace CoreWCF
{
public class IntegrationTests_EndToEnd_BinaryEncoding
{
- private IWebHost host;
+ private IHost host;
[SetUp]
public void Setup()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
host.Start();
}
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_QueueConfigurationErrors.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_QueueConfigurationErrors.cs
index 9e793cfea55a..687365bedb2b 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_QueueConfigurationErrors.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_QueueConfigurationErrors.cs
@@ -3,13 +3,14 @@
using Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Hosting;
using NUnit.Framework;
namespace Microsoft.CoreWCF.Azure.StorageQueues.Tests
{
public class IntegrationTests_QueueConfigurationErrors
{
- private IWebHost host;
+ private IHost host;
[SetUp]
public void Setup()
@@ -26,7 +27,7 @@ public void TearDown()
[Test]
public void QueueConfigurationWithConflictingQueueName_ThrowArgumentException()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
System.ArgumentException exception = Assert.Throws(() => host.Start());
Assert.That(exception.Message, Is.EqualTo($"Queue name mismatch. The connection string is using queue name '{Startup2_ConflictingQueueName.QueueName}', and the channel uri is using queue name 'conflicting-queue-name'. When specifying the queue name using both methods, they must match."));
}
@@ -34,7 +35,7 @@ public void QueueConfigurationWithConflictingQueueName_ThrowArgumentException()
[Test]
public void QueueConfigurationWithNoQueueName_ThrowArgumentException()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
System.ArgumentException exception = Assert.Throws(() => host.Start());
var expectedExceptionMessage = $"The endpoint Uri '{TestHelper.GetEndpointWithNoQueueName()}' should have two path segments when not using an Azure dns hostname.";
Assert.That(exception.Message, Is.EqualTo(expectedExceptionMessage));
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_QueueConfigurationWithEmptyUri.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_QueueConfigurationWithEmptyUri.cs
index aaa12c22b446..e76827ab7721 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_QueueConfigurationWithEmptyUri.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_QueueConfigurationWithEmptyUri.cs
@@ -6,6 +6,7 @@
using Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using System.Threading.Tasks;
@@ -13,12 +14,12 @@ namespace Microsoft.CoreWCF.Azure.StorageQueues.Tests
{
public class IntegrationTests_QueueConfigurationWithEmptyUri
{
- private IWebHost host;
+ private IHost host;
[SetUp]
public void Setup()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
host.Start();
}
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_ReceiveMessage_Success.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_ReceiveMessage_Success.cs
index 115d2b3d33ec..73eabf47449c 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_ReceiveMessage_Success.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_ReceiveMessage_Success.cs
@@ -6,6 +6,7 @@
using Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using System.Threading.Tasks;
@@ -13,12 +14,12 @@ namespace Microsoft.CoreWCF.Azure.StorageQueues.Tests
{
public class IntegrationTests_ReceiveMessage_Success
{
- private IWebHost host;
+ private IHost host;
[SetUp]
public void Setup()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
host.Start();
}
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueue.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueue.cs
index 50b43ab7f022..091103a7398e 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueue.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueue.cs
@@ -7,6 +7,7 @@
using Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using System.Threading.Tasks;
@@ -14,12 +15,12 @@ namespace Microsoft.CoreWCF.Azure.StorageQueues.Tests
{
public class IntegrationTests_Test_DeadLetterQueue
{
- private IWebHost host;
+ private IHost host;
[SetUp]
public void Setup()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
host.Start();
}
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueueSendBinary.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueueSendBinary.cs
index 35d71ffda24f..9465f3c52a26 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueueSendBinary.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueueSendBinary.cs
@@ -8,6 +8,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using System;
using System.Threading;
@@ -18,12 +19,12 @@ namespace Microsoft.CoreWCF.Azure.StorageQueues.Tests
{
public class IntegrationTests_Test_DeadLetterQueueSendBinary
{
- private IWebHost host;
+ private IHost host;
[SetUp]
public void Setup()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
host.Start();
}
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueueSendText.cs b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueueSendText.cs
index 07d882cfa2e5..7909dd993c0b 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueueSendText.cs
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/IntegrationTests_Test_DeadLetterQueueSendText.cs
@@ -6,6 +6,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.CoreWCF.Azure.StorageQueues.Tests.Helpers;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using System;
using System.Threading;
@@ -15,12 +16,12 @@ namespace Microsoft.CoreWCF.Azure.StorageQueues.Tests
{
public class IntegrationTests_Test_DeadLetterQueueSendText
{
- private IWebHost host;
+ private IHost host;
[SetUp]
public void Setup()
{
- host = ServiceHelper.CreateWebHostBuilder().Build();
+ host = ServiceHelper.CreateHost();
host.Start();
}
diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Microsoft.CoreWCF.Azure.StorageQueues.Tests.csproj b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Microsoft.CoreWCF.Azure.StorageQueues.Tests.csproj
index 08ca605c5b2e..5ed5251ef1e3 100644
--- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Microsoft.CoreWCF.Azure.StorageQueues.Tests.csproj
+++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/tests/Microsoft.CoreWCF.Azure.StorageQueues.Tests.csproj
@@ -1,4 +1,4 @@
-
+
$(RequiredTargetFrameworks)
@@ -9,10 +9,13 @@
+
+
+
@@ -21,8 +24,6 @@
-
-
diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/Azure.Extensions.AspNetCore.DataProtection.Blobs.csproj b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/Azure.Extensions.AspNetCore.DataProtection.Blobs.csproj
index 19e8607fafb1..9af9d7e48e97 100644
--- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/Azure.Extensions.AspNetCore.DataProtection.Blobs.csproj
+++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/Azure.Extensions.AspNetCore.DataProtection.Blobs.csproj
@@ -14,7 +14,6 @@
-
diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj
index 7b70d1695eaf..e3ec2c76e366 100644
--- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj
+++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj
@@ -15,7 +15,6 @@
-
diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/Azure.Extensions.AspNetCore.DataProtection.Keys.Tests.csproj b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/Azure.Extensions.AspNetCore.DataProtection.Keys.Tests.csproj
index 04f02cd42293..4c4cbdc5b8fb 100644
--- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/Azure.Extensions.AspNetCore.DataProtection.Keys.Tests.csproj
+++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/Azure.Extensions.AspNetCore.DataProtection.Keys.Tests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/src/Microsoft.Azure.WebJobs.Extensions.Clients.csproj b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/src/Microsoft.Azure.WebJobs.Extensions.Clients.csproj
index 7623c5c5986c..b3c0e221cb02 100644
--- a/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/src/Microsoft.Azure.WebJobs.Extensions.Clients.csproj
+++ b/sdk/extensions/Microsoft.Azure.WebJobs.Extensions.Clients/src/Microsoft.Azure.WebJobs.Extensions.Clients.csproj
@@ -13,7 +13,6 @@
-
+
diff --git a/sdk/extensions/Microsoft.Extensions.Azure/src/Microsoft.Extensions.Azure.csproj b/sdk/extensions/Microsoft.Extensions.Azure/src/Microsoft.Extensions.Azure.csproj
index 3a40949ce589..4fbcf235cf6b 100644
--- a/sdk/extensions/Microsoft.Extensions.Azure/src/Microsoft.Extensions.Azure.csproj
+++ b/sdk/extensions/Microsoft.Extensions.Azure/src/Microsoft.Extensions.Azure.csproj
@@ -20,13 +20,8 @@
-
-
-
-
-
diff --git a/sdk/extensions/Microsoft.Extensions.Azure/tests/Microsoft.Extensions.Azure.Tests.csproj b/sdk/extensions/Microsoft.Extensions.Azure/tests/Microsoft.Extensions.Azure.Tests.csproj
index b29f51c02c33..f86fb637fc63 100644
--- a/sdk/extensions/Microsoft.Extensions.Azure/tests/Microsoft.Extensions.Azure.Tests.csproj
+++ b/sdk/extensions/Microsoft.Extensions.Azure/tests/Microsoft.Extensions.Azure.Tests.csproj
@@ -13,7 +13,6 @@
-
diff --git a/sdk/iot/Azure.IoT.Hub.Service/tests/Azure.IoT.Hub.Service.Tests.csproj b/sdk/iot/Azure.IoT.Hub.Service/tests/Azure.IoT.Hub.Service.Tests.csproj
index 51b2dd62a241..c3f897e8651e 100644
--- a/sdk/iot/Azure.IoT.Hub.Service/tests/Azure.IoT.Hub.Service.Tests.csproj
+++ b/sdk/iot/Azure.IoT.Hub.Service/tests/Azure.IoT.Hub.Service.Tests.csproj
@@ -10,7 +10,6 @@
-
diff --git a/sdk/keyvault/Azure.Security.KeyVault.Secrets/perf/Azure.Security.KeyVault.Secrets.Perf.csproj b/sdk/keyvault/Azure.Security.KeyVault.Secrets/perf/Azure.Security.KeyVault.Secrets.Perf.csproj
index 6306ffb4b1eb..06c563d2c883 100644
--- a/sdk/keyvault/Azure.Security.KeyVault.Secrets/perf/Azure.Security.KeyVault.Secrets.Perf.csproj
+++ b/sdk/keyvault/Azure.Security.KeyVault.Secrets/perf/Azure.Security.KeyVault.Secrets.Perf.csproj
@@ -4,7 +4,7 @@
-
+
diff --git a/sdk/keyvault/samples/Directory.Build.props b/sdk/keyvault/samples/Directory.Build.props
index 842f0dcb5997..9f7066845828 100644
--- a/sdk/keyvault/samples/Directory.Build.props
+++ b/sdk/keyvault/samples/Directory.Build.props
@@ -5,6 +5,7 @@
true
true
+ true
true
false
diff --git a/sdk/keyvault/samples/getcert/Program.cs b/sdk/keyvault/samples/getcert/Program.cs
index 5589b3ed8158..754801ab4b5c 100644
--- a/sdk/keyvault/samples/getcert/Program.cs
+++ b/sdk/keyvault/samples/getcert/Program.cs
@@ -2,9 +2,8 @@
// Licensed under the MIT License.
using System;
+using System.Collections.Generic;
using System.CommandLine;
-using System.CommandLine.Invocation;
-using System.CommandLine.IO;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
@@ -21,8 +20,7 @@ internal static class Program
private static async Task RunAsync(
Uri vaultUri,
string certificateName,
- string message,
- IConsole console)
+ string message)
{
CancellationToken cancellationToken = s_cancellationTokenSource.Token;
@@ -41,12 +39,12 @@ private static async Task RunAsync(
// Make sure the private key is exportable.
if (certificate.Policy?.Exportable != true)
{
- console.Error.WriteLine($@"Error: certificate ""{certificateName}"" is not exportable.");
+ Console.Error.WriteLine($@"Error: certificate ""{certificateName}"" is not exportable.");
return 1;
}
else if (certificate.Policy?.KeyType != CertificateKeyType.Rsa)
{
- console.Error.WriteLine($@"Error: certificate type ""{certificate.Policy?.KeyType}"" cannot be used to locally encrypt and decrypt.");
+ Console.Error.WriteLine($@"Error: certificate type ""{certificate.Policy?.KeyType}"" cannot be used to locally encrypt and decrypt.");
return 1;
}
@@ -65,14 +63,14 @@ private static async Task RunAsync(
using RSA encryptor = pfx.GetRSAPublicKey();
byte[] ciphertext = encryptor.Encrypt(plaintext, RSAEncryptionPadding.OaepSHA256);
- console.Out.WriteLine($"Encrypted message: {Convert.ToBase64String(ciphertext)}");
+ Console.Out.WriteLine($"Encrypted message: {Convert.ToBase64String(ciphertext)}");
// Decrypt and encode the message.
using RSA decryptor = pfx.GetRSAPrivateKey();
plaintext = decryptor.Decrypt(ciphertext, RSAEncryptionPadding.OaepSHA256);
message = Encoding.UTF8.GetString(plaintext);
- console.Out.WriteLine($"Decrypted message: {message}");
+ Console.Out.WriteLine($"Decrypted message: {message}");
return 0;
}
@@ -92,7 +90,7 @@ private static X509Certificate2 ParseCertificate(KeyVaultSecret secret)
if (string.Equals(secret.Properties.ContentType, CertificateContentType.Pkcs12.ToString(), StringComparison.InvariantCultureIgnoreCase))
{
byte[] pfx = Convert.FromBase64String(secret.Value);
- return new X509Certificate2(pfx);
+ return X509CertificateLoader.LoadCertificate(pfx);
}
// For PEM, you'll need to extract the base64-encoded message body.
@@ -138,7 +136,7 @@ private static X509Certificate2 ParseCertificate(KeyVaultSecret secret)
byte[] privateKey = Convert.FromBase64String(privateKeyBase64);
byte[] publicKey = Convert.FromBase64String(publicKeyBase64);
- X509Certificate2 certificate = new X509Certificate2(publicKey);
+ X509Certificate2 certificate = X509CertificateLoader.LoadCertificate(publicKey);
using RSA rsa = RSA.Create();
rsa.ImportPkcs8PrivateKey(privateKey, out _);
@@ -158,43 +156,39 @@ static Program()
{
Command = new RootCommand("Encrypts and decrypts a message using a certificate from Azure Key Vault")
{
- new Option(
- alias: "--vault-name",
- description: "Key Vault name or URI, e.g. my-vault or https://my-vault-vault.azure.net",
- parseArgument: result =>
+ Options =
+ {
+ new Option("vaultUri", ["--vault-name"])
{
- string value = result.Tokens.Single().Value;
- if (Uri.TryCreate(value, UriKind.Absolute, out Uri vaultUri) ||
- Uri.TryCreate($"https://{value}.vault.azure.net", UriKind.Absolute, out vaultUri))
+ Description = "Key Vault name or URI, e.g. my-vault or https://my-vault-vault.azure.net",
+ Required = true,
+ CustomParser = result =>
{
- return vaultUri;
+ string value = result.Tokens.Single().Value;
+ if (Uri.TryCreate(value, UriKind.Absolute, out Uri vaultUri) ||
+ Uri.TryCreate($"https://{value}.vault.azure.net", UriKind.Absolute, out vaultUri))
+ {
+ return vaultUri;
+ }
+
+ result.AddError("Must specify a vault name or URI");
+ return null;
}
+ },
- result.ErrorMessage = "Must specify a vault name or URI";
- return null!;
- }
- )
- {
- Name = "vaultUri",
- IsRequired = true,
- },
-
- new Option(
- aliases: new[] { "-n", "--certificate-name" },
- description: "Name of the certificate to use for encrypting and decrypting."
- )
- {
- IsRequired = true,
- },
+ new Option("certificateName", [ "-n", "--certificate-name"])
+ {
+ Description = "Name of the certificate to use for encrypting and decrypting.",
+ Required = true
+ },
- new Option(
- aliases: new[] { "-m", "--message" },
- description: "The message to encrypt and decrypt."
- ),
+ new Option("message", ["-m", "--message"])
+ {
+ Description = "The message to encrypt and decrypt."
+ }
+ }
};
- Command.Handler = CommandHandler.Create(RunAsync);
-
s_cancellationTokenSource = new CancellationTokenSource();
}
@@ -208,7 +202,24 @@ private static async Task Main(string[] args)
args.Cancel = true;
};
- return await Command.InvokeAsync(args);
+ ParseResult parseResult = Command.Parse(args);
+
+ if (parseResult.Errors.Count > 0)
+ {
+ foreach (var error in parseResult.Errors)
+ {
+ Console.Error.WriteLine(error.Message);
+ }
+
+ return 1;
+ }
+
+ await RunAsync(
+ parseResult.GetValue("vaultUri"),
+ parseResult.GetValue("certificateName"),
+ parseResult.GetValue("message") ?? "Hello, World!");
+
+ return 0;
}
#endregion
}
diff --git a/sdk/keyvault/samples/getcert/getcert.csproj b/sdk/keyvault/samples/getcert/getcert.csproj
index b261021ef819..c27f253cc509 100644
--- a/sdk/keyvault/samples/getcert/getcert.csproj
+++ b/sdk/keyvault/samples/getcert/getcert.csproj
@@ -14,7 +14,7 @@
-
+
@@ -22,7 +22,7 @@
-
+
diff --git a/sdk/keyvault/samples/keyvaultproxy/tests/AzureSamples.Security.KeyVault.Proxy.Tests.csproj b/sdk/keyvault/samples/keyvaultproxy/tests/AzureSamples.Security.KeyVault.Proxy.Tests.csproj
index bfded1180f94..969e732d909f 100644
--- a/sdk/keyvault/samples/keyvaultproxy/tests/AzureSamples.Security.KeyVault.Proxy.Tests.csproj
+++ b/sdk/keyvault/samples/keyvaultproxy/tests/AzureSamples.Security.KeyVault.Proxy.Tests.csproj
@@ -8,7 +8,6 @@
-
diff --git a/sdk/keyvault/samples/sharelink/ManagedStorageRestClient.cs b/sdk/keyvault/samples/sharelink/ManagedStorageRestClient.cs
index 9149a4416c92..95775faf69fe 100644
--- a/sdk/keyvault/samples/sharelink/ManagedStorageRestClient.cs
+++ b/sdk/keyvault/samples/sharelink/ManagedStorageRestClient.cs
@@ -7,7 +7,6 @@
namespace Azure.Security.KeyVault.Storage
{
- [CodeGenClient("AzureSecurityKeyVaultStorageRestClient")]
internal partial class ManagedStorageRestClient
{
///
diff --git a/sdk/keyvault/samples/sharelink/Program.cs b/sdk/keyvault/samples/sharelink/Program.cs
index dd8127558beb..b55d03017b99 100644
--- a/sdk/keyvault/samples/sharelink/Program.cs
+++ b/sdk/keyvault/samples/sharelink/Program.cs
@@ -8,8 +8,6 @@
using System;
using System.Collections.Generic;
using System.CommandLine;
-using System.CommandLine.Invocation;
-using System.CommandLine.IO;
using System.CommandLine.Parsing;
using System.Linq;
using System.Text;
@@ -23,8 +21,7 @@ private static async Task RunAsync(
Uri vaultUri,
string storageAccountName,
int days,
- bool readOnly,
- IConsole console)
+ bool readOnly)
{
// Allow only credentials appropriate for this interactive tool sample.
DefaultAzureCredential credential = new DefaultAzureCredential(
@@ -45,7 +42,7 @@ private static async Task RunAsync(
if (storageAccount is null)
{
- console.Error.WriteLine($"Error: '{storageAccountName}' is not currently managed by {vaultUri}");
+ Console.Error.WriteLine($"Error: '{storageAccountName}' is not currently managed by {vaultUri}");
return 1;
}
@@ -57,7 +54,7 @@ private static async Task RunAsync(
SecretClient secretClient = new SecretClient(vaultUri, credential, options);
KeyVaultSecret sasToken = await secretClient.GetSecretAsync($"{storageAccountName}-{sasDefinitionName}", cancellationToken: s_cancellationTokenSource.Token);
- console.Out.WriteLine(sasToken.Value);
+ Console.Out.WriteLine(sasToken.Value);
return 0;
}
@@ -183,51 +180,43 @@ static Program()
{
Command = new RootCommand("Generates a shareable link to a blob or file")
{
- new Option(
- alias: "--vault-name",
- description: "Key Vault name or URI, e.g. my-vault or https://my-vault-vault.azure.net",
- parseArgument: result =>
+ Options =
+ {
+ new Option("vaultUri", ["--vault-name"])
{
- string value = result.Tokens.Single().Value;
- if (Uri.TryCreate(value, UriKind.Absolute, out Uri vaultUri) ||
- Uri.TryCreate($"https://{value}.vault.azure.net", UriKind.Absolute, out vaultUri))
+ Description = "Key Vault name or URI, e.g. my-vault or https://my-vault-vault.azure.net",
+ Required = true,
+ CustomParser = result =>
{
- return vaultUri;
+ string value = result.Tokens.Single().Value;
+ if (Uri.TryCreate(value, UriKind.Absolute, out Uri vaultUri) ||
+ Uri.TryCreate($"https://{value}.vault.azure.net", UriKind.Absolute, out vaultUri))
+ {
+ return vaultUri;
+ }
+
+ result.AddError("Must specify a vault name or URI");
+ return null;
}
+ },
- result.ErrorMessage = "Must specify a vault name or URI";
- return null!;
- }
- )
- {
- Name = "vaultUri",
- IsRequired = true,
- },
-
- new Option(
- alias: "--storage-account-name",
- description: "Storage account name managed by Key Vault"
- )
- {
- IsRequired = true,
- },
-
- new Option(
- aliases: new[] { "-d", "--days" },
- description: "Number of days the link is valid; must be > 0",
- getDefaultValue: () => 0
- )
- {
- IsRequired = true,
- }.GreaterThan(0),
+ new Option("storageAccountName", ["--storage-account-name"])
+ {
+ Description = "Storage account name managed by Key Vault",
+ Required = true
+ },
- new Option(
- aliases: new[] { "-r", "--read-only" },
- description: "Make the shareable link read-only"
- ),
- };
+ new Option("days", ["-d", "--days"])
+ {
+ Description = "Number of days the link is valid; must be > 0",
+ }.GreaterThan(0),
- Command.Handler = CommandHandler.Create(RunAsync);
+ new Option("readOnly", ["-r", "--read-only"])
+ {
+ Description = "Make the shareable link read-only"
+ }
+ }
+ };
s_cancellationTokenSource = new CancellationTokenSource();
}
@@ -242,19 +231,44 @@ private static async Task Main(string[] args)
args.Cancel = true;
};
- return await Command.InvokeAsync(args);
+ ParseResult parseResult = Command.Parse(args);
+
+ if (parseResult.Errors.Count > 0)
+ {
+ foreach (var error in parseResult.Errors)
+ {
+ Console.Error.WriteLine(error.Message);
+ }
+
+ return 1;
+ }
+
+ await RunAsync(
+ parseResult.GetValue("vaultUri"),
+ parseResult.GetValue("storageAccountName"),
+ parseResult.GetValue("days"),
+ parseResult.GetValue("readOnly"));
+
+ return 0;
}
#endregion
#region Extensions
internal static Option GreaterThan(this Option option, int value)
{
- option.AddValidator(r =>
- r.Tokens
+ option.Validators.Add(r =>
+ {
+ var result = r.Tokens
.Select(t => t.Value)
.Where(v => !int.TryParse(v, out int i) || i <= value)
- .Select(_ => $"Option '{r.Symbol.Name}' must be greater than {value}")
- .FirstOrDefault());
+ .Select(_ => $"Option '{r.Option.Name}' must be greater than {value}")
+ .FirstOrDefault();
+
+ if (result != null)
+ {
+ r.AddError(result);
+ }
+ });
return option;
}
diff --git a/sdk/keyvault/samples/sharelink/ShareLink.csproj b/sdk/keyvault/samples/sharelink/ShareLink.csproj
index c9bc2c7f00a0..2d9af3ad024c 100644
--- a/sdk/keyvault/samples/sharelink/ShareLink.csproj
+++ b/sdk/keyvault/samples/sharelink/ShareLink.csproj
@@ -19,23 +19,23 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/tests/Azure.ResourceManager.Kusto.Tests.csproj b/sdk/kusto/Azure.ResourceManager.Kusto/tests/Azure.ResourceManager.Kusto.Tests.csproj
index 82967a8d7682..d4d4d3e2b21d 100644
--- a/sdk/kusto/Azure.ResourceManager.Kusto/tests/Azure.ResourceManager.Kusto.Tests.csproj
+++ b/sdk/kusto/Azure.ResourceManager.Kusto/tests/Azure.ResourceManager.Kusto.Tests.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/sdk/modelsrepository/Azure.IoT.ModelsRepository/tests/Azure.IoT.ModelsRepository.Tests.csproj b/sdk/modelsrepository/Azure.IoT.ModelsRepository/tests/Azure.IoT.ModelsRepository.Tests.csproj
index acae8a0e4b6c..2e90c7cf02d7 100644
--- a/sdk/modelsrepository/Azure.IoT.ModelsRepository/tests/Azure.IoT.ModelsRepository.Tests.csproj
+++ b/sdk/modelsrepository/Azure.IoT.ModelsRepository/tests/Azure.IoT.ModelsRepository.Tests.csproj
@@ -7,7 +7,6 @@
-
diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/AspNetCore.Benchmarks/Azure.Monitor.OpenTelemetry.AspNetCore.Benchmarks.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/AspNetCore.Benchmarks/Azure.Monitor.OpenTelemetry.AspNetCore.Benchmarks.csproj
index 1b158bb8f641..6b57920d42d6 100644
--- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/AspNetCore.Benchmarks/Azure.Monitor.OpenTelemetry.AspNetCore.Benchmarks.csproj
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/AspNetCore.Benchmarks/Azure.Monitor.OpenTelemetry.AspNetCore.Benchmarks.csproj
@@ -11,9 +11,9 @@
-
+
-
+
diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj
index 1965394afb4d..311a200186a8 100644
--- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj
@@ -17,7 +17,6 @@
-
diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj
index 7c01ff562644..42c8c082d082 100644
--- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/Azure.Monitor.OpenTelemetry.Exporter.Tests.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/Properties/AssemblyInfo.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000000..70b3dce6e4e6
--- /dev/null
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/Properties/AssemblyInfo.cs
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+using Xunit;
+
+// Disable parallel test execution to prevent race conditions with static state in SdkVersionUtils.
+// Tests that modify SdkVersionUtils.VersionType and SdkVersionUtils.SdkVersionPrefix must run sequentially.
+[assembly: CollectionBehavior(DisableTestParallelization = true)]
diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/tests/Azure.Monitor.OpenTelemetry.LiveMetrics.Tests/Azure.Monitor.OpenTelemetry.LiveMetrics.Tests.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/tests/Azure.Monitor.OpenTelemetry.LiveMetrics.Tests/Azure.Monitor.OpenTelemetry.LiveMetrics.Tests.csproj
index ef8a05beac3c..bb392facf62e 100644
--- a/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/tests/Azure.Monitor.OpenTelemetry.LiveMetrics.Tests/Azure.Monitor.OpenTelemetry.LiveMetrics.Tests.csproj
+++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics/tests/Azure.Monitor.OpenTelemetry.LiveMetrics.Tests/Azure.Monitor.OpenTelemetry.LiveMetrics.Tests.csproj
@@ -1,6 +1,7 @@
-
+
+ $(RequiredRunnableTargetFrameworks)
$(RequiredTargetFrameworks)
SA1636
enable
diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Azure.ResourceManager.NetApp.Tests.csproj b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Azure.ResourceManager.NetApp.Tests.csproj
index babd43097b99..c82730794cba 100644
--- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Azure.ResourceManager.NetApp.Tests.csproj
+++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Azure.ResourceManager.NetApp.Tests.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/tests/Azure.AI.OpenAI.Assistants.Tests.csproj b/sdk/openai/Azure.AI.OpenAI.Assistants/tests/Azure.AI.OpenAI.Assistants.Tests.csproj
index ced27dcaa8d7..584f708fb41e 100644
--- a/sdk/openai/Azure.AI.OpenAI.Assistants/tests/Azure.AI.OpenAI.Assistants.Tests.csproj
+++ b/sdk/openai/Azure.AI.OpenAI.Assistants/tests/Azure.AI.OpenAI.Assistants.Tests.csproj
@@ -1,4 +1,4 @@
-
+
$(RequiredTargetFrameworks)
@@ -17,7 +17,6 @@
-
diff --git a/sdk/openai/Azure.AI.OpenAI/src/Azure.AI.OpenAI.csproj b/sdk/openai/Azure.AI.OpenAI/src/Azure.AI.OpenAI.csproj
index a3cab4434ad2..19c88814f3f6 100644
--- a/sdk/openai/Azure.AI.OpenAI/src/Azure.AI.OpenAI.csproj
+++ b/sdk/openai/Azure.AI.OpenAI/src/Azure.AI.OpenAI.csproj
@@ -30,7 +30,6 @@
-
@@ -94,4 +93,4 @@
-
\ No newline at end of file
+
diff --git a/sdk/personalizer/Azure.AI.Personalizer/src/Azure.AI.Personalizer.csproj b/sdk/personalizer/Azure.AI.Personalizer/src/Azure.AI.Personalizer.csproj
index 99adddb15e7b..44f92ac46c7e 100644
--- a/sdk/personalizer/Azure.AI.Personalizer/src/Azure.AI.Personalizer.csproj
+++ b/sdk/personalizer/Azure.AI.Personalizer/src/Azure.AI.Personalizer.csproj
@@ -25,7 +25,12 @@
-
+
+
+
diff --git a/sdk/personalizer/Azure.AI.Personalizer/tests/Azure.AI.Personalizer.Tests.csproj b/sdk/personalizer/Azure.AI.Personalizer/tests/Azure.AI.Personalizer.Tests.csproj
index 305cd5e570d7..5c3302d3f6ab 100644
--- a/sdk/personalizer/Azure.AI.Personalizer/tests/Azure.AI.Personalizer.Tests.csproj
+++ b/sdk/personalizer/Azure.AI.Personalizer/tests/Azure.AI.Personalizer.Tests.csproj
@@ -6,7 +6,7 @@
$(NoWarn);CS1591
-
+
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/sdk/provisioning/Generator/src/Generator.csproj b/sdk/provisioning/Generator/src/Generator.csproj
index 5ff983e486de..ab6fa2895431 100644
--- a/sdk/provisioning/Generator/src/Generator.csproj
+++ b/sdk/provisioning/Generator/src/Generator.csproj
@@ -7,13 +7,13 @@
1.0.0-beta.1
Exe
enable
- 12
+ true
IDE0130;CS1591;CS1572;CS1587;$(NoWarn)
CS8600
-
+
diff --git a/sdk/relay/Azure.ResourceManager.Relay/tests/Azure.ResourceManager.Relay.Tests.csproj b/sdk/relay/Azure.ResourceManager.Relay/tests/Azure.ResourceManager.Relay.Tests.csproj
index d6c91b68b5a8..456b62e24908 100644
--- a/sdk/relay/Azure.ResourceManager.Relay/tests/Azure.ResourceManager.Relay.Tests.csproj
+++ b/sdk/relay/Azure.ResourceManager.Relay/tests/Azure.ResourceManager.Relay.Tests.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj b/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj
index 1f37b5a2cff5..6e94787eb846 100644
--- a/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj
+++ b/sdk/resourcemanager/Azure.ResourceManager/tests/Azure.ResourceManager.Tests.csproj
@@ -8,13 +8,9 @@
-
-
-
-
-
-
-
+
+
+
diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue/DeadLetterQueue.csproj b/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue/DeadLetterQueue.csproj
index c88dfb17b4d4..934d2df4e4e3 100644
--- a/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue/DeadLetterQueue.csproj
+++ b/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue/DeadLetterQueue.csproj
@@ -7,14 +7,14 @@
-
+
-
+
diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue/Program.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue/Program.cs
index b6a6b731035b..387a27ff8412 100644
--- a/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue/Program.cs
+++ b/sdk/servicebus/Azure.Messaging.ServiceBus/samples/DeadLetterQueue/Program.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.CommandLine;
-using System.CommandLine.Invocation;
+using System.CommandLine.Parsing;
using System.Threading;
using System.Threading.Tasks;
using Azure.Identity;
@@ -18,16 +18,23 @@ public class Program
public static async Task Main(string[] args)
{
var namespaceOption = new Option(
- name: "--namespace",
- description: "Fully qualified Service Bus Queue namespace to use");
+ name: "--namespace")
+ {
+ Description = "Fully qualified Service Bus Queue namespace to use"
+ };
var queueOption = new Option(
- name: "--queue",
- description: "Service Bus Queue Name to use") { IsRequired = true };
+ name: "--queue")
+ {
+ Description = "Service Bus Queue Name to use",
+ Required = true
+ };
var connectionOption = new Option(
- name: "--connection-variable",
- description: "The name of an environment variable containing the connection string to use.");
+ name: "--connection-variable")
+ {
+ Description = "The name of an environment variable containing the connection string to use."
+ };
var command = new RootCommand("Demonstrates the DeadLetter feature of Azure Service Bus.")
{
@@ -36,9 +43,20 @@ public static async Task Main(string[] args)
connectionOption
};
- command.SetHandler(RunAsync, namespaceOption, queueOption, connectionOption);
+ ParseResult parseResult = command.Parse(args);
+ if (parseResult.Errors.Count > 0)
+ {
+ foreach (var error in parseResult.Errors)
+ {
+ Console.Error.WriteLine(error.Message);
+ }
+ return;
+ }
- await command.InvokeAsync(args);
+ await RunAsync(
+ parseResult.GetValue(namespaceOption),
+ parseResult.GetValue(queueOption),
+ parseResult.GetValue(connectionOption));
}
diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters/Program.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters/Program.cs
index 07f1df28f62f..10d85a5729a0 100644
--- a/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters/Program.cs
+++ b/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters/Program.cs
@@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
using System.CommandLine;
-using System.CommandLine.Invocation;
+using System.CommandLine.Parsing;
using System.Threading.Tasks;
using Azure.Identity;
using Azure.Messaging.ServiceBus;
@@ -28,12 +28,16 @@ public class Program
public static async Task Main(string[] args)
{
var fullyQualifiedNamespaceOption = new Option(
- aliases: new[] { "--namespace" },
- description: "Fully qualified Service Bus Queue namespace to use");
+ name: "--namespace")
+ {
+ Description = "Fully qualified Service Bus Queue namespace to use"
+ };
var connectionOption = new Option(
- aliases: new[] { "--connection-variable" },
- description: "The name of an environment variable containing the connection string to use.");
+ name: "--connection-variable")
+ {
+ Description = "The name of an environment variable containing the connection string to use."
+ };
var command = new RootCommand("Demonstrates the Topic Filters feature of Azure Service Bus.")
{
@@ -41,8 +45,20 @@ public static async Task Main(string[] args)
connectionOption
};
- command.SetHandler(RunAsync, fullyQualifiedNamespaceOption, connectionOption);
- await command.InvokeAsync(args);
+ ParseResult parseResult = command.Parse(args);
+
+ if (parseResult.Errors.Count > 0)
+ {
+ foreach (var error in parseResult.Errors)
+ {
+ Console.Error.WriteLine(error.Message);
+ }
+ return;
+ }
+
+ await RunAsync(
+ parseResult.GetValue(fullyQualifiedNamespaceOption),
+ parseResult.GetValue(connectionOption));
}
diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters/TopicFilters.csproj b/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters/TopicFilters.csproj
index c88dfb17b4d4..934d2df4e4e3 100644
--- a/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters/TopicFilters.csproj
+++ b/sdk/servicebus/Azure.Messaging.ServiceBus/samples/TopicFilters/TopicFilters.csproj
@@ -7,14 +7,14 @@
-
+
-
+
diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/tests/Azure.ResourceManager.ServiceBus.Tests.csproj b/sdk/servicebus/Azure.ResourceManager.ServiceBus/tests/Azure.ResourceManager.ServiceBus.Tests.csproj
index 28414b059d3f..9b0e0a675d50 100644
--- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/tests/Azure.ResourceManager.ServiceBus.Tests.csproj
+++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/tests/Azure.ResourceManager.ServiceBus.Tests.csproj
@@ -5,8 +5,8 @@
-
-
+
+
diff --git a/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/src/Microsoft.Azure.WebJobs.Extensions.ServiceBus.csproj b/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/src/Microsoft.Azure.WebJobs.Extensions.ServiceBus.csproj
index 132c7b511a1f..5f2bc4b165f2 100644
--- a/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/src/Microsoft.Azure.WebJobs.Extensions.ServiceBus.csproj
+++ b/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/src/Microsoft.Azure.WebJobs.Extensions.ServiceBus.csproj
@@ -18,7 +18,6 @@
-
diff --git a/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/tests/Microsoft.Azure.WebJobs.Extensions.ServiceBus.Tests.csproj b/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/tests/Microsoft.Azure.WebJobs.Extensions.ServiceBus.Tests.csproj
index bdb5f6910cd9..ae679d345660 100644
--- a/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/tests/Microsoft.Azure.WebJobs.Extensions.ServiceBus.Tests.csproj
+++ b/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/tests/Microsoft.Azure.WebJobs.Extensions.ServiceBus.Tests.csproj
@@ -15,8 +15,10 @@
-
+
+
+
diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Azure.ResourceManager.ServiceFabricManagedClusters.Tests.csproj b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Azure.ResourceManager.ServiceFabricManagedClusters.Tests.csproj
index 8f301ebd2495..9672653110c7 100644
--- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Azure.ResourceManager.ServiceFabricManagedClusters.Tests.csproj
+++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Azure.ResourceManager.ServiceFabricManagedClusters.Tests.csproj
@@ -1,7 +1,7 @@
-
+
diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskFixture.cs b/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskFixture.cs
index 7ac4260b93a8..9d643aeba96b 100644
--- a/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskFixture.cs
+++ b/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskFixture.cs
@@ -11,6 +11,7 @@
using Azure.ResourceManager.Compute.Models;
using Azure.ResourceManager.Resources;
using Azure.Storage.Test;
+using NUnit.Framework;
namespace Azure.Storage.Blobs.Tests.ManagedDisk
{
@@ -20,6 +21,7 @@ namespace Azure.Storage.Blobs.Tests.ManagedDisk
/// Deleting snapshots at test class level was not viable as it led to race conditions related to access rights,
/// i.e. if one of the middle (or first) snapshots is deleted it seems that service revokes read access while it squashes data.
///
+ [SetUpFixture]
public class ManagedDiskFixture : SetUpFixtureBase
{
public ManagedDiskFixture()
diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Azure.Storage.DataMovement.Tests.csproj b/sdk/storage/Azure.Storage.DataMovement/tests/Azure.Storage.DataMovement.Tests.csproj
index b5e3c4235997..ffd9bb398068 100644
--- a/sdk/storage/Azure.Storage.DataMovement/tests/Azure.Storage.DataMovement.Tests.csproj
+++ b/sdk/storage/Azure.Storage.DataMovement/tests/Azure.Storage.DataMovement.Tests.csproj
@@ -6,8 +6,8 @@
false
-
-
+
+
@@ -47,4 +47,4 @@
PreserveNewest
-
\ No newline at end of file
+
diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj
index c3921620c7c4..f4b8c5c9b8c9 100644
--- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj
+++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj
@@ -17,7 +17,6 @@
-
diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/Microsoft.Azure.WebJobs.Extensions.Storage.Common.Tests.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/Microsoft.Azure.WebJobs.Extensions.Storage.Common.Tests.csproj
index ab365c0d5424..5db941c0af88 100644
--- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/Microsoft.Azure.WebJobs.Extensions.Storage.Common.Tests.csproj
+++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/tests/Microsoft.Azure.WebJobs.Extensions.Storage.Common.Tests.csproj
@@ -5,10 +5,6 @@
-
-
-
-
diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj
index c518f826ba50..387ce894d872 100644
--- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj
+++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Azure.Analytics.Synapse.AccessControl.Tests.csproj b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Azure.Analytics.Synapse.AccessControl.Tests.csproj
index 50efa267bd70..85d6c46b4a93 100644
--- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Azure.Analytics.Synapse.AccessControl.Tests.csproj
+++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/tests/Azure.Analytics.Synapse.AccessControl.Tests.csproj
@@ -10,7 +10,6 @@
-
diff --git a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/tests/Azure.Analytics.Synapse.ManagedPrivateEndpoints.Tests.csproj b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/tests/Azure.Analytics.Synapse.ManagedPrivateEndpoints.Tests.csproj
index b80a93af5920..29aafd47e4ab 100644
--- a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/tests/Azure.Analytics.Synapse.ManagedPrivateEndpoints.Tests.csproj
+++ b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/tests/Azure.Analytics.Synapse.ManagedPrivateEndpoints.Tests.csproj
@@ -11,7 +11,6 @@
-
diff --git a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/tests/Azure.Analytics.Synapse.Monitoring.Tests.csproj b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/tests/Azure.Analytics.Synapse.Monitoring.Tests.csproj
index e0ada83f64ea..fc80979b7995 100644
--- a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/tests/Azure.Analytics.Synapse.Monitoring.Tests.csproj
+++ b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/tests/Azure.Analytics.Synapse.Monitoring.Tests.csproj
@@ -11,7 +11,6 @@
-
diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/Azure.Analytics.Synapse.Spark.Tests.csproj b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/Azure.Analytics.Synapse.Spark.Tests.csproj
index 5a9860ee7627..3d11ad3d2fd6 100644
--- a/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/Azure.Analytics.Synapse.Spark.Tests.csproj
+++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/tests/Azure.Analytics.Synapse.Spark.Tests.csproj
@@ -10,7 +10,6 @@
-
diff --git a/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/Microsoft.Azure.WebJobs.Extensions.Tables.csproj b/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/Microsoft.Azure.WebJobs.Extensions.Tables.csproj
index cf35a406c29d..e31c500a4514 100644
--- a/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/Microsoft.Azure.WebJobs.Extensions.Tables.csproj
+++ b/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/src/Microsoft.Azure.WebJobs.Extensions.Tables.csproj
@@ -20,7 +20,6 @@
-
diff --git a/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/tests/Microsoft.Azure.WebJobs.Extensions.Tables.Tests.csproj b/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/tests/Microsoft.Azure.WebJobs.Extensions.Tables.Tests.csproj
index 4810a4c6d3be..c10062b78de9 100644
--- a/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/tests/Microsoft.Azure.WebJobs.Extensions.Tables.Tests.csproj
+++ b/sdk/tables/Microsoft.Azure.WebJobs.Extensions.Tables/tests/Microsoft.Azure.WebJobs.Extensions.Tables.Tests.csproj
@@ -1,21 +1,24 @@
-
+
$(RequiredTargetFrameworks)
$(NoWarn);SA1636;SA1649
- $(WarningsNotAsErrors);NETSDK1206
+ $(WarningsNotAsErrors);NETSDK1206
+
-
-
+
+
+
+
@@ -31,7 +34,7 @@
-
+
diff --git a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/tests/Azure.IoT.TimeSeriesInsights.Tests.csproj b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/tests/Azure.IoT.TimeSeriesInsights.Tests.csproj
index a231dcef133a..d9ac9d2553ce 100644
--- a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/tests/Azure.IoT.TimeSeriesInsights.Tests.csproj
+++ b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/tests/Azure.IoT.TimeSeriesInsights.Tests.csproj
@@ -7,7 +7,6 @@
-
diff --git a/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO/tests/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO.Tests.csproj b/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO/tests/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO.Tests.csproj
index 2ecccede58f6..4fff2a82dcad 100644
--- a/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO/tests/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO.Tests.csproj
+++ b/sdk/webpubsub/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO/tests/Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO.Tests.csproj
@@ -20,9 +20,9 @@
-
-
-
+
+
+