Skip to content

Conversation

@live1206
Copy link
Member

@live1206 live1206 commented Nov 13, 2025

[error]/mnt/vss/_work/1/s/sdk/loadtestservice/Azure.Developer.Playwright.NUnit/tests/samples/Sample2_CustomisingServiceParameters.cs(39,21): error CS0618: 'ManagedIdentityCredential.ManagedIdentityCredential(string, TokenCredentialOptions)' is obsolete: 'Use constructor ManagedIdentityCredential(ManagedIdentityId id) or ManagedIdentityCredential(ManagedIdentityCredentialOptions options).' [/mnt/vss/_work/1/s/sdk/loadtestservice/Azure.Developer.Playwright.NUnit/tests/Azure.Developer.Playwright.NUnit.Tests.csproj::TargetFramework=net9.0] [error]/mnt/vss/_work/1/s/sdk/loadtestservice/Azure.Developer.Playwright.MSTest/tests/samples/Sample2_CustomisingServiceParameters.cs(30,75): error CS0618: 'ManagedIdentityCredential.ManagedIdentityCredential(string, TokenCredentialOptions)' is obsolete: 'Use constructor ManagedIdentityCredential(ManagedIdentityId id) or ManagedIdentityCredential(ManagedIdentityCredentialOptions options).' [/mnt/vss/_work/1/s/sdk/loadtestservice/Azure.Developer.Playwright.MSTest/tests/Azure.Developer.Playwright.MSTest.Tests.csproj::TargetFramework=net9.0]

This PR is to fix the CI failure due to #53825

@live1206 live1206 requested a review from a team as a code owner November 13, 2025 08:38
Copilot AI review requested due to automatic review settings November 13, 2025 08:38
@live1206
Copy link
Member Author

cc @jsquire
This is blocking generator version bump PRs

Copilot finished reviewing on behalf of live1206 November 13, 2025 08:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes compilation errors caused by deprecated ManagedIdentityCredential constructor usage. The changes update code samples to use the new recommended constructor that accepts ManagedIdentityId.SystemAssigned parameter instead of the obsolete parameterless constructor.

Key changes:

  • Updated ManagedIdentityCredential instantiation to use the new API with ManagedIdentityId.SystemAssigned
  • Applied fixes across both NUnit and MSTest sample files and documentation

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
sdk/loadtestservice/Azure.Developer.Playwright.NUnit/tests/samples/Sample2_CustomisingServiceParameters.cs Updated ManagedIdentityCredential constructor calls in both SNIPPET and non-SNIPPET sections
sdk/loadtestservice/Azure.Developer.Playwright.MSTest/tests/samples/Sample2_CustomisingServiceParameters.cs Updated ManagedIdentityCredential constructor call in AssemblyInitialize method
sdk/loadtestservice/Azure.Developer.Playwright.MSTest/samples/Sample2_CustomisingServiceParameters.md Updated ManagedIdentityCredential constructor in documentation example

@live1206
Copy link
Member Author

CI failure due to #53859

@live1206 live1206 requested a review from jsquire November 13, 2025 09:17
@live1206 live1206 closed this Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants