Skip to content

Commit 072d0c1

Browse files
feat: support .NET 10 in VS ATK templates (#14617)
* feat: upgrade Azure Functions related packages * fix: add prune package to workaround for tab temlate * fix: change tab template to self-hosted deployment * fix: update da and cea templates to use self-hosted deployment * fix: update teams ai library v2 related templates to self-hosted deployment
1 parent 7e9e522 commit 072d0c1

File tree

21 files changed

+45
-38
lines changed

21 files changed

+45
-38
lines changed

templates/vs/csharp/basic-tab/m365agents.yml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ provision:
8585
deploy:
8686
- uses: cli/runDotnetCommand
8787
with:
88-
args: publish --configuration Release {{ProjectName}}.csproj
88+
args: publish --configuration Release --runtime win-x86 --self-contained {{ProjectName}}.csproj
8989
{{#isNewProjectTypeEnabled}}
9090
{{#PlaceProjectFileInSolutionDir}}
9191
workingDirectory: ..
@@ -99,7 +99,7 @@ deploy:
9999
- uses: azureAppService/zipDeploy
100100
with:
101101
# Deploy base folder
102-
artifactFolder: bin/Release/{{TargetFramework}}/publish
102+
artifactFolder: bin/Release/{{TargetFramework}}/win-x86/publish
103103
# The resource id of the cloud resource to be deployed to.
104104
# This key will be generated by arm/deploy action automatically.
105105
# You can replace it with your existing Azure Resource id

templates/vs/csharp/basic-tab/{{ProjectName}}.csproj.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.0" />
16+
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="9.0.9" />
1717
<PackageReference Include="Azure.Identity" Version="1.13.1" />
1818
<PackageReference Include="Microsoft.Teams.Api" Version="2.0.*" />
1919
<PackageReference Include="Microsoft.Teams.Apps" Version="2.0.*" />
@@ -37,6 +37,13 @@
3737
<Folder Include="Web\bin\" />
3838
</ItemGroup>
3939

40+
<!-- Add prune package to workaround https://github.com/dotnet/aspnetcore/issues/63719 -->
41+
<Target Name="_PreserveFileProvidersEmbeddedPackageReference" AfterTargets="AddPrunePackageReferences">
42+
<ItemGroup>
43+
<PrunePackageReference Remove="Microsoft.Extensions.FileProviders.Embedded" />
44+
</ItemGroup>
45+
</Target>
46+
4047
<!-- Run npm steps -->
4148
<Target Name="NpmInstall" BeforeTargets="BeforeBuild">
4249
<Message Text="Running npm install..." Importance="high" />

templates/vs/csharp/custom-copilot-basic/m365agents.yml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ provision:
8484
deploy:
8585
- uses: cli/runDotnetCommand
8686
with:
87-
args: publish --configuration Release {{ProjectName}}.csproj
87+
args: publish --configuration Release --runtime win-x86 --self-contained {{ProjectName}}.csproj
8888
{{#isNewProjectTypeEnabled}}
8989
{{#PlaceProjectFileInSolutionDir}}
9090
workingDirectory: ..
@@ -98,7 +98,7 @@ deploy:
9898
- uses: azureAppService/zipDeploy
9999
with:
100100
# Deploy base folder
101-
artifactFolder: bin/Release/{{TargetFramework}}/publish
101+
artifactFolder: bin/Release/{{TargetFramework}}/win-x86/publish
102102
# The resource id of the cloud resource to be deployed to.
103103
# This key will be generated by arm/deploy action automatically.
104104
# You can replace it with your existing Azure Resource id

templates/vs/csharp/custom-copilot-rag-azure-ai-search/m365agents.yml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ provision:
8484
deploy:
8585
- uses: cli/runDotnetCommand
8686
with:
87-
args: publish --configuration Release {{ProjectName}}.csproj
87+
args: publish --configuration Release --runtime win-x86 --self-contained {{ProjectName}}.csproj
8888
{{#isNewProjectTypeEnabled}}
8989
{{#PlaceProjectFileInSolutionDir}}
9090
workingDirectory: ..
@@ -98,7 +98,7 @@ deploy:
9898
- uses: azureAppService/zipDeploy
9999
with:
100100
# Deploy base folder
101-
artifactFolder: bin/Release/{{TargetFramework}}/publish
101+
artifactFolder: bin/Release/{{TargetFramework}}/win-x86/publish
102102
# The resource id of the cloud resource to be deployed to.
103103
# This key will be generated by arm/deploy action automatically.
104104
# You can replace it with your existing Azure Resource id

templates/vs/csharp/custom-copilot-rag-customize/m365agents.yml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ provision:
8484
deploy:
8585
- uses: cli/runDotnetCommand
8686
with:
87-
args: publish --configuration Release {{ProjectName}}.csproj
87+
args: publish --configuration Release --runtime win-x86 --self-contained {{ProjectName}}.csproj
8888
{{#isNewProjectTypeEnabled}}
8989
{{#PlaceProjectFileInSolutionDir}}
9090
workingDirectory: ..
@@ -98,7 +98,7 @@ deploy:
9898
- uses: azureAppService/zipDeploy
9999
with:
100100
# Deploy base folder
101-
artifactFolder: bin/Release/{{TargetFramework}}/publish
101+
artifactFolder: bin/Release/{{TargetFramework}}/win-x86/publish
102102
# The resource id of the cloud resource to be deployed to.
103103
# This key will be generated by arm/deploy action automatically.
104104
# You can replace it with your existing Azure Resource id

templates/vs/csharp/custom-copilot-weather-agent/m365agents.yml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ provision:
8383
deploy:
8484
- uses: cli/runDotnetCommand
8585
with:
86-
args: publish --configuration Release {{ProjectName}}.csproj
86+
args: publish --configuration Release --runtime win-x86 --self-contained {{ProjectName}}.csproj
8787
{{#isNewProjectTypeEnabled}}
8888
{{#PlaceProjectFileInSolutionDir}}
8989
workingDirectory: ..
@@ -97,7 +97,7 @@ deploy:
9797
- uses: azureAppService/zipDeploy
9898
with:
9999
# Deploy base folder
100-
artifactFolder: bin/Release/{{TargetFramework}}/publish
100+
artifactFolder: bin/Release/{{TargetFramework}}/win-x86/publish
101101
# The resource id of the cloud resource to be deployed to.
102102
# This key will be generated by arm/deploy action automatically.
103103
# You can replace it with your existing Azure Resource id

templates/vs/csharp/declarative-agent-with-action-from-scratch-bearer/m365agents.yml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ provision:
9595
deploy:
9696
- uses: cli/runDotnetCommand
9797
with:
98-
args: publish --configuration Release {{ProjectName}}.csproj
98+
args: publish --configuration Release --runtime win-x86 --self-contained {{ProjectName}}.csproj
9999
{{#isNewProjectTypeEnabled}}
100100
{{#PlaceProjectFileInSolutionDir}}
101101
workingDirectory: ..
@@ -110,7 +110,7 @@ deploy:
110110
- uses: azureFunctions/zipDeploy
111111
with:
112112
# deploy base folder
113-
artifactFolder: bin/Release/{{TargetFramework}}/publish
113+
artifactFolder: bin/Release/{{TargetFramework}}/win-x86/publish
114114
# The resource id of the cloud resource to be deployed to.
115115
# This key will be generated by arm/deploy action automatically.
116116
# You can replace it with your existing Azure Resource id

templates/vs/csharp/declarative-agent-with-action-from-scratch-bearer/{{ProjectName}}.csproj.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121

2222
{{/isNewProjectTypeEnabled}}
2323
<ItemGroup>
24-
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
24+
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.50.0-preview1" />
2525
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.1.0" />
26-
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" />
26+
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.5" />
2727
</ItemGroup>
2828

2929
<ItemGroup>

templates/vs/csharp/declarative-agent-with-action-from-scratch-oauth/m365agents.yml.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ provision:
151151
deploy:
152152
- uses: cli/runDotnetCommand
153153
with:
154-
args: publish --configuration Release {{ProjectName}}.csproj
154+
args: publish --configuration Release --runtime win-x86 --self-contained {{ProjectName}}.csproj
155155
{{#isNewProjectTypeEnabled}}
156156
{{#PlaceProjectFileInSolutionDir}}
157157
workingDirectory: ..
@@ -166,7 +166,7 @@ deploy:
166166
- uses: azureFunctions/zipDeploy
167167
with:
168168
# deploy base folder
169-
artifactFolder: bin/Release/{{TargetFramework}}/publish
169+
artifactFolder: bin/Release/{{TargetFramework}}/win-x86/publish
170170
# The resource id of the cloud resource to be deployed to.
171171
# This key will be generated by arm/deploy action automatically.
172172
# You can replace it with your existing Azure Resource id

templates/vs/csharp/declarative-agent-with-action-from-scratch-oauth/{{ProjectName}}.csproj.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121

2222
{{/isNewProjectTypeEnabled}}
2323
<ItemGroup>
24-
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
24+
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.50.0-preview1" />
2525
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.1.0" />
26-
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" />
26+
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.5" />
2727
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.2.0" />
2828
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
2929
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.0" />

0 commit comments

Comments
 (0)