fix: Replace msbuild with dotnet build in template CI scripts#1986
fix: Replace msbuild with dotnet build in template CI scripts#1986
Conversation
Co-authored-by: kazo0 <4793020+kazo0@users.noreply.github.com>
|
|
Co-authored-by: kazo0 <4793020+kazo0@users.noreply.github.com>
Co-authored-by: kazo0 <4793020+kazo0@users.noreply.github.com>
Co-authored-by: kazo0 <4793020+kazo0@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical build failure in the default Uno Platform template CI scripts. The templates previously used msbuild directly, which fails to handle .NET workloads (wasm-tools, Android SDK) even when dependencies are installed via uno-check. The fix replaces all msbuild invocations with dotnet build, which properly invokes workload resolution through the .NET SDK.
Changes:
- Removed
microsoft/setup-msbuildaction from GitHub Actions workflow - Replaced
msbuildcommands withdotnet buildin GitHub Actions, using--configurationflag for build configuration - Replaced
MSBuild@1tasks withPowerShell@2tasks runningdotnet buildin Azure DevOps pipelines - Maintained consistent MSBuild property syntax using
-p:prefix for all custom properties
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Uno.Templates/content/unoapp/GitHub/workflows/ci.yml | Removed setup-msbuild action and replaced msbuild commands with dotnet build for both smoke test and unit test jobs |
| src/Uno.Templates/content/unoapp/AzurePipelines/jobs/unit-test.yml | Replaced MSBuild@1 task with PowerShell@2 task running dotnet build with proper error handling |
| src/Uno.Templates/content/unoapp/AzurePipelines/jobs/smoke-test.yml | Replaced MSBuild@1 task with PowerShell@2 task running dotnet build with proper error handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PR Type
What is the current behavior?
Template CI scripts (GitHub Actions and Azure DevOps) use
msbuilddirectly, which fails to handle .NET workloads (wasm-tools, Android SDK). Builds fail with workload missing errors despite uno-check installing dependencies.What is the new behavior?
CI scripts use
dotnet build, which properly invokes workload resolution through the .NET SDK.Changes:
GitHub Actions (
GitHub/workflows/ci.yml):microsoft/setup-msbuildactionmsbuild *.csproj /r→dotnet build *.csproj --configuration Debug/ReleaseAzure DevOps (
AzurePipelines/jobs/*.yml):MSBuild@1task withPowerShell@2runningdotnet buildExample:
Flag syntax follows repository conventions:
--configurationfor config,-p:for MSBuild properties.PR Checklist
Other information
Template variables (
$baseTargetFramework$,$DefaultBranchName$) preserved - replaced during template instantiation, not runtime.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.