Skip to content

Commit 8382632

Browse files
committed
ci(workflow): resolve project ambiguity in dotnet commands
- Explicitly target `WinHome.sln` during restore to prevent MSB1011 errors - Point `dotnet test` to the specific test project path - Point `dotnet publish` to the main application project path - Ensure deterministic pipeline execution when multiple solution/project files exist
1 parent b2bc52f commit 8382632

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/release.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ jobs:
1717
- name: Setup .NET
1818
uses: actions/setup-dotnet@v4
1919
with:
20-
dotnet-version: 10.0.x # Uses the version matching your csproj
20+
dotnet-version: 10.0.x
2121

2222
- name: Restore dependencies
23-
run: dotnet restore
23+
24+
run: dotnet restore WinHome.sln
2425

2526
- name: Run Tests
26-
# We run tests before building the release to ensure quality
27-
run: dotnet test --no-restore --verbosity normal
27+
28+
run: dotnet test WinHome.Tests/WinHome.Tests.csproj --no-restore --verbosity normal
2829

2930
- name: Publish WinHome (Single File)
30-
# This compiles the standalone .exe
31+
32+
3133
run: dotnet publish WinHome.csproj -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true -o ./publish
3234

3335
- name: Create Release

0 commit comments

Comments
 (0)