Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[BUG] Sample generation does not compile for Azure.ResourceManager #5214

Closed
m-nash opened this issue Jan 6, 2025 · 0 comments · Fixed by #5215 · May be fixed by Azure/azure-sdk-for-net#47726
Closed

[BUG] Sample generation does not compile for Azure.ResourceManager #5214

m-nash opened this issue Jan 6, 2025 · 0 comments · Fixed by #5215 · May be fixed by Azure/azure-sdk-for-net#47726
Assignees

Comments

@m-nash
Copy link
Member

m-nash commented Jan 6, 2025

If you sync the main branch of azure-sdk-for-net and change directory into ./sdk/resourcemanager/Azure.ResourceManager and run dotnet build you will get many errors like the following

C:\git\Azure\azure-sdk-for-net\sdk\resourcemanager\Azure.ResourceManager\samples\Generated\Samples\Sample_ManagementLockCollect
ion.cs(33,58): error CS1061: 'ArmClient' does not contain a definition for 'GetManagementLocks' and no accessible extension met
hod 'GetManagementLocks' accepting a first argument of type 'ArmClient' could be found (are you missing a using directive or an
 assembly reference?) [C:\git\Azure\azure-sdk-for-net\sdk\resourcemanager\Azure.ResourceManager\samples\Azure.ResourceManager.S
amples.csproj::TargetFramework=net8.0]

In this PR #5107 we changed the sample generator to assume that the arm client had the GetManagementLocks extension but it actually belongs to ArmResource.

Image

We need to update the sample manager to fix this.

I also opened on issue on our CI to get updated so this doesn't slip through the cracks next time. Azure/azure-sdk-tools#9590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants