Skip to content

Commit 2ec4695

Browse files
Fix .NET package restoration process in DevContainer (#292)
* fix: streamline .NET package restoration process in postCreate.sh * Update devcontainer.json * Update postCreate.sh * Update Directory.Build.props * Update global.json * Update CopilotTests.csproj --------- Co-authored-by: Ian Jensen <[email protected]>
1 parent 86da97d commit 2ec4695

File tree

5 files changed

+9
-17
lines changed

5 files changed

+9
-17
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"installTFsec": true
1414
},
1515
"ghcr.io/devcontainers/features/dotnet:2": {
16-
"version": "8.0"
16+
"version": "9.0"
1717
},
1818
"ghcr.io/azure/azure-dev/azd:latest": {
1919
"version": "1.18.1"
@@ -32,10 +32,8 @@
3232
"ms-vscode.makefile-tools",
3333
"DavidAnson.vscode-markdownlint",
3434
"golang.go",
35-
"azapi-vscode.azapi",
3635
"ms-azuretools.vscode-azureterraform",
3736
"terraform-linters.tflint-vscode",
38-
"microsoft-IsvExpTools.powerplatform-vscode",
3937
"ms-vscode.azurecli",
4038
"bierner.markdown-mermaid",
4139
"ms-dotnettools.csharp",

.devcontainer/postCreate.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,15 @@ tflint --init
1313

1414
# Install PowerApps CLI (Microsoft.PowerApps.CLI.Tool)
1515
echo "Installing PowerApps CLI..."
16-
dotnet tool install --global Microsoft.PowerApps.CLI.Tool --version 1.43.6
16+
dotnet tool install --global Microsoft.PowerApps.CLI.Tool --version 1.49.3
1717

1818
# Restore .NET packages including Microsoft.Agents.CopilotStudio.Client
1919
echo "Restoring .NET packages..."
20-
if [ -f "Directory.Build.props" ]; then
21-
dotnet restore
22-
echo ".NET packages restored successfully!"
20+
if [ -f "tests/Copilot/CopilotTests.csproj" ]; then
21+
dotnet restore tests/Copilot/CopilotTests.csproj
22+
echo "Copilot project packages restored successfully!"
2323
else
24-
# Fallback to individual project restore
25-
if [ -f "tests/Copilot/CopilotTests.csproj" ]; then
26-
dotnet restore tests/Copilot/CopilotTests.csproj
27-
echo "Copilot project packages restored successfully!"
28-
else
29-
echo "No .NET projects found, skipping package restore"
30-
fi
24+
echo "No .NET projects found, skipping package restore"
3125
fi
3226

3327
echo "Post-create setup completed successfully!"

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<LangVersion>latest</LangVersion>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "8.0.412"
3+
"version": "9.0.305"
44
}
55
}

tests/Copilot/CopilotTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)