Skip to content

Commit 85dd65d

Browse files
committed
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net into sofiar/mobile_changes
2 parents 1f33901 + 27a318b commit 85dd65d

File tree

109 files changed

+6479
-122
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+6479
-122
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
23+
contents: read
24+
25+
# You can define any steps you want, and they will run before the agent starts.
26+
# If you do not check out your code, Copilot will do this for you.
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Setup .NET
32+
uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: 9.0.x
35+
36+
# Example: Display .NET SDK version
37+
- name: Show .NET SDK version
38+
run: dotnet --version

.vscode/cspell.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,23 @@
17281728
"prebuilts"
17291729
]
17301730
},
1731+
{
1732+
"filename": "**/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/**",
1733+
"words": [
1734+
"Ceus",
1735+
"Tonnis",
1736+
"Hnpcc",
1737+
"Ascvd",
1738+
"Mednax",
1739+
"Cusick",
1740+
"Acrad",
1741+
"Kellgren",
1742+
"Frax",
1743+
"Birads",
1744+
"Agatston",
1745+
"Tyrer"
1746+
]
1747+
},
17311748
{
17321749
"filename": "**/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/*.cs",
17331750
"words": [

eng/Directory.Build.Common.props

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
<!-- Setup default project properties -->
3333
<PropertyGroup>
34+
<LtsTargetFramework>net8.0</LtsTargetFramework>
3435
<LangVersion>latest</LangVersion>
3536
<!--
3637
Disable NU5105 NuGet Pack warning that the version is SemVer 2.0.
@@ -108,7 +109,7 @@
108109
<GenerateAPIListing Condition="'$(GenerateAPIListing)' == '' AND '$(IsShippingClientLibrary)' == 'true'">true</GenerateAPIListing>
109110
<EnableSourceLink Condition="'$(EnableSourceLink)' == ''">true</EnableSourceLink>
110111
<DefineConstants Condition="'$(BuildSnippets)' == 'true'">$(DefineConstants);SNIPPET</DefineConstants>
111-
<ApiCompatBaselineTargetFramework Condition="'$(TargetFramework)' == 'net8.0'">netstandard2.0</ApiCompatBaselineTargetFramework>
112+
<ApiCompatBaselineTargetFramework Condition="'$(TargetFramework)' == '$(LtsTargetFramework)'">netstandard2.0</ApiCompatBaselineTargetFramework>
112113
</PropertyGroup>
113114

114115
<PropertyGroup Condition="'$(IsShippingClientLibrary)' == 'true' and '$(TF_BUILD)' == 'true'">
@@ -139,15 +140,15 @@
139140
<SupportsNetStandard20 Condition="'$(SupportsNetStandard20)' == ''">false</SupportsNetStandard20>
140141

141142
<RequiredTargetFrameworks>net452;net461;netstandard2.0</RequiredTargetFrameworks>
142-
<RequiredTargetFrameworks Condition="'$(SupportsNetStandard20)' == 'true' and '$(IsSourceGenerator)' != 'true'">net8.0;netstandard2.0</RequiredTargetFrameworks>
143-
<RequiredTargetFrameworks Condition="'$(IsGeneratorLibrary)' == 'true'">net8.0</RequiredTargetFrameworks>
143+
<RequiredTargetFrameworks Condition="'$(SupportsNetStandard20)' == 'true' and '$(IsSourceGenerator)' != 'true'">$(LtsTargetFramework);netstandard2.0</RequiredTargetFrameworks>
144+
<RequiredTargetFrameworks Condition="'$(IsGeneratorLibrary)' == 'true'">$(LtsTargetFramework)</RequiredTargetFrameworks>
144145
<RequiredTargetFrameworks Condition="'$(IsSourceGenerator)' == 'true'">netstandard2.0</RequiredTargetFrameworks>
145146
</PropertyGroup>
146147

147148
<PropertyGroup Condition="'$(IsGeneratorLibrary)' != 'true' and ('$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsSamplesProject)' == 'true' or '$(IsPerfProject)' == 'true' or '$(IsStressProject)' == 'true')">
148149
<IsPackable>false</IsPackable>
149150
<!-- List newest targets first so that recordings are made with latest, running tests from editor runs latest, etc. -->
150-
<RequiredTargetFrameworks>net9.0;net8.0;</RequiredTargetFrameworks>
151+
<RequiredTargetFrameworks>net9.0;$(LtsTargetFramework);</RequiredTargetFrameworks>
151152
<!-- Also test net462 on Windows. net461 is out of support as of 4/2022 and is not supported in version 4.4.x and beyond of NUnit3TestAdapter. -->
152153
<RequiredTargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(RequiredTargetFrameworks);net462</RequiredTargetFrameworks>
153154
<!-- But only build snippets for the latest. -->

eng/Directory.Build.Common.targets

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@
364364
<Target Name="RunApiCompat" DependsOnTargets="ValidateApiCompatForSrc" Condition="'$(ApiCompatVersion)' != ''">
365365
</Target>
366366

367-
<Target Name="GetPackageInfo">
367+
<Target Name="GetPackageInfo" Returns="@(PackageInfoLine)">
368368
<PropertyGroup>
369369
<PackageIsNewSdk>false</PackageIsNewSdk>
370370
<PackageIsNewSdk Condition="'$(IsClientLibrary)' == 'true' or '$(IsFunctionsLibrary)' == 'true'">true</PackageIsNewSdk>
@@ -380,9 +380,14 @@
380380

381381
<!-- Parse out the service directory based on the relative path to the sdk folder -->
382382
<ServiceDirectory><![CDATA[$([System.Text.RegularExpressions.Regex]::Replace($(PackageRootDirectory), '^.*[\\/]+sdk[\\/]+([^\\/]+).*$', '$1'))]]></ServiceDirectory>
383+
384+
<!-- Format package info line for output -->
385+
<PackageInfoText Condition="'$(IsShippingLibrary)' == 'true'">'$(PackageRootDirectory)' '$(ServiceDirectory)' '$(PackageId)' '$(VersionForProperties)' '$(PackageSdkType)' '$(PackageIsNewSdk)' '$(BaseOutputPath)'</PackageInfoText>
383386
</PropertyGroup>
384387

385-
<Message Condition="'$(IsShippingLibrary)' == 'true'" Text="'$(PackageRootDirectory)' '$(ServiceDirectory)' '$(PackageId)' '$(VersionForProperties)' '$(PackageSdkType)' '$(PackageIsNewSdk)' '$(BaseOutputPath)'" Importance="High" />
388+
<ItemGroup Condition="'$(IsShippingLibrary)' == 'true'">
389+
<PackageInfoLine Include="$(PackageInfoText)" />
390+
</ItemGroup>
386391
</Target>
387392

388393
<Target Name="GetCodeGenProjects" Returns="@(ProjectsToInclude)">

eng/Packages.Data.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
<PackageReference Update="Azure.Messaging.EventHubs" Version="5.12.1" />
121121
<PackageReference Update="Azure.Messaging.EventGrid" Version="4.21.0" />
122122
<PackageReference Update="Azure.Messaging.EventGrid.SystemEvents" Version="1.0.0-beta.5" />
123-
<PackageReference Update="Azure.Messaging.ServiceBus" Version="7.19.0" />
123+
<PackageReference Update="Azure.Messaging.ServiceBus" Version="7.20.1" />
124124
<PackageReference Update="Azure.Messaging.WebPubSub" Version="1.4.0" />
125125
<PackageReference Update="Azure.MixedReality.Authentication" version= "1.2.0" />
126126
<PackageReference Update="Azure.Monitor.OpenTelemetry.Exporter" Version="1.4.0" />
@@ -243,7 +243,7 @@
243243
<PackageReference Update="Microsoft.AspNetCore.Http" Version="2.3.0" />
244244
<PackageReference Update="Microsoft.AspNetCore.Http.Connections" Version="1.2.0" />
245245
<PackageReference Update="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.3.0" />
246-
<PackageReference Update="Microsoft.Extensions.Azure" Version="1.8.0" />
246+
<PackageReference Update="Microsoft.Extensions.Azure" Version="1.12.0" />
247247
<PackageReference Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
248248
<PackageReference Update="Microsoft.Extensions.Configuration" Version="8.0.0" />
249249
<PackageReference Update="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
@@ -307,7 +307,7 @@
307307
<PackageReference Update="Azure.Identity" Version="1.14.0" />
308308
<PackageReference Update="Azure.Messaging.EventGrid" Version="4.17.0" />
309309
<PackageReference Update="Azure.Messaging.EventHubs.Processor" Version="5.12.0" />
310-
<PackageReference Update="Azure.Messaging.ServiceBus" Version="7.19.0" />
310+
<PackageReference Update="Azure.Messaging.ServiceBus" Version="7.20.1" />
311311
<PackageReference Update="Azure.ResourceManager" Version="1.13.0" />
312312
<PackageReference Update="Azure.ResourceManager.Compute" Version="1.9.0" />
313313
<PackageReference Update="Azure.ResourceManager.CognitiveServices" Version="1.3.0" />
@@ -377,7 +377,7 @@
377377
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
378378
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />
379379
<PackageReference Update="Microsoft.Data.SqlClient" Version="5.2.2" />
380-
<PackageReference Update="Microsoft.Extensions.Azure" Version="1.11.0" />
380+
<PackageReference Update="Microsoft.Extensions.Azure" Version="1.12.0" />
381381
<PackageReference Update="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
382382
<PackageReference Update="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
383383
<PackageReference Update="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />

eng/common/pipelines/templates/steps/detect-api-changes.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@ parameters:
55
Condition: true
66

77
steps:
8-
- pwsh: |
9-
$apiChangeDetectRequestUrl = "https://apiview.dev/api/PullRequests/CreateAPIRevisionIfAPIHasChanges"
10-
echo "##vso[task.setvariable variable=ApiChangeDetectRequestUrl]$apiChangeDetectRequestUrl"
11-
displayName: "Set API change detect request URL"
12-
condition: and(${{ parameters.Condition}}, eq(variables['ApiChangeDetectRequestUrl'], ''))
8+
- ${{ if eq(variables['Build.Reason'],'PullRequest') }}:
9+
- pwsh: |
10+
$apiChangeDetectRequestUrl = "https://apiview.dev/api/PullRequests/CreateAPIRevisionIfAPIHasChanges"
11+
echo "##vso[task.setvariable variable=ApiChangeDetectRequestUrl]$apiChangeDetectRequestUrl"
12+
displayName: "Set API change detect request URL"
13+
condition: and(${{ parameters.Condition}}, eq(variables['ApiChangeDetectRequestUrl'], ''))
1314
14-
- task: Powershell@2
15-
inputs:
16-
filePath: ${{ parameters.RepoRoot }}/eng/common/scripts/Detect-Api-Changes.ps1
17-
arguments: >
18-
-ArtifactPath ${{parameters.ArtifactPath}}
19-
-CommitSha '$(System.PullRequest.SourceCommitId)'
20-
-BuildId $(Build.BuildId)
21-
-PullRequestNumber $(System.PullRequest.PullRequestNumber)
22-
-RepoFullName $(Build.Repository.Name)
23-
-APIViewUri $(ApiChangeDetectRequestUrl)
24-
-ArtifactName ${{ parameters.ArtifactName }}
25-
-DevopsProject $(System.TeamProject)
26-
pwsh: true
27-
displayName: Create APIView if API has changes
28-
condition: and(${{ parameters.Condition }}, succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest'))
15+
- task: Powershell@2
16+
inputs:
17+
filePath: ${{ parameters.RepoRoot }}/eng/common/scripts/Detect-Api-Changes.ps1
18+
arguments: >
19+
-ArtifactPath ${{parameters.ArtifactPath}}
20+
-CommitSha '$(System.PullRequest.SourceCommitId)'
21+
-BuildId $(Build.BuildId)
22+
-PullRequestNumber $(System.PullRequest.PullRequestNumber)
23+
-RepoFullName $(Build.Repository.Name)
24+
-APIViewUri $(ApiChangeDetectRequestUrl)
25+
-ArtifactName ${{ parameters.ArtifactName }}
26+
-DevopsProject $(System.TeamProject)
27+
pwsh: true
28+
displayName: Create APIView if API has changes
29+
condition: and(${{ parameters.Condition }}, succeededOrFailed())

eng/common/spelling/package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp-mgmt/package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eng/packages/http-client-csharp-mgmt/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"@azure-tools/typespec-azure-resource-manager": "0.56.2",
4646
"@azure-tools/typespec-azure-rulesets": "0.56.1",
4747
"@azure-tools/typespec-client-generator-core": "0.56.2",
48+
"@azure-tools/typespec-liftr-base": "0.8.0",
4849
"@eslint/js": "^9.2.0",
4950
"@types/node": "~22.7.5",
5051
"@types/prettier": "^2.6.3",
@@ -72,6 +73,7 @@
7273
"@azure-tools/typespec-azure-resource-manager",
7374
"@azure-tools/typespec-azure-rulesets",
7475
"@azure-tools/typespec-client-generator-core",
76+
"@azure-tools/typespec-liftr-base",
7577
"@typespec/compiler",
7678
"@typespec/http",
7779
"@typespec/openapi",

eng/scripts/Language-Settings.ps1

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,35 @@ function Get-AllPackageInfoFromRepo($serviceDirectory)
1616
# Save-Package-Properties.ps1
1717
$shouldAddDevVersion = Get-Variable -Name 'addDevVersion' -ValueOnly -ErrorAction 'Ignore'
1818
$ServiceProj = Join-Path -Path $EngDir -ChildPath "service.proj"
19-
Write-Host "dotnet msbuild /nologo /t:GetPackageInfo ""$ServiceProj"" /p:EnableCentralPackageVersions=False /p:ServiceDirectory=$serviceDirectory /p:AddDevVersion=$shouldAddDevVersion -tl:off"
19+
$outputFilePath = Join-Path ([System.IO.Path]::GetTempPath()) "package-info-$([System.Guid]::NewGuid()).txt"
20+
21+
Write-Host "dotnet msbuild /nologo /t:GetPackageInfo ""$ServiceProj"" /p:ServiceDirectory=$serviceDirectory /p:AddDevVersion=$shouldAddDevVersion /p:OutputProjectInfoListFilePath=""$outputFilePath"" -tl:off"
2022

21-
$msbuildOutput = dotnet msbuild `
23+
dotnet msbuild `
2224
/nologo `
2325
/t:GetPackageInfo `
2426
"$ServiceProj" `
25-
/p:EnableCentralPackageVersions=False `
2627
/p:ServiceDirectory=$serviceDirectory `
2728
/p:AddDevVersion=$shouldAddDevVersion `
28-
-tl:off
29+
/p:OutputProjectInfoListFilePath="$outputFilePath" `
30+
-tl:off | Out-Host
31+
32+
# Check if msbuild succeeded
33+
if ($LASTEXITCODE -ne 0) {
34+
# Clean up temp file before failing
35+
if (Test-Path $outputFilePath) {
36+
$null = Remove-Item $outputFilePath -Force -ErrorAction SilentlyContinue
37+
}
38+
throw "MSBuild failed with exit code $LASTEXITCODE"
39+
}
40+
41+
$packageInfoLines = @()
42+
if (Test-Path $outputFilePath) {
43+
$packageInfoLines = Get-Content $outputFilePath | Where-Object { $_ -and $_.Trim() }
44+
$null = Remove-Item $outputFilePath -Force -ErrorAction SilentlyContinue
45+
}
2946

30-
foreach ($projectOutput in $msbuildOutput)
47+
foreach ($projectOutput in $packageInfoLines)
3148
{
3249
if (!$projectOutput) {
3350
Write-Verbose "Get-AllPackageInfoFromRepo::projectOutput was null or empty, skipping"

0 commit comments

Comments
 (0)