Fix RS0017 warnings and enable TreatWarningsAsErrors for Release builds#315
Merged
jonathanpeppers merged 5 commits intomainfrom Mar 19, 2026
Merged
Fix RS0017 warnings and enable TreatWarningsAsErrors for Release builds#315jonathanpeppers merged 5 commits intomainfrom
jonathanpeppers merged 5 commits intomainfrom
Conversation
…hipped.txt; enable TreatWarningsAsErrors for Release Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jonathanpeppers
March 19, 2026 13:46
View session
src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Shipped.txt
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
…lers and PublicAPI files Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses API analyzer (RS0017/RS0026/RS0027) warnings around ProcessUtils.StartProcess by restoring a shipped overload, adjusting the unshipped API declaration for the newer overload, updating internal call sites accordingly, and tightening build hygiene by enabling warnings-as-errors in Release builds.
Changes:
- Reintroduced the shipped
ProcessUtils.StartProcess(..., onStarted = null)overload as a compatibility shim delegating to the newer overload. - Updated
PublicAPI.Unshipped.txtentries (netstandard2.0 + net10.0) to remove optional default values from the newer overload signature. - Updated runner call sites to pass an explicit
nullforonStartedwhen calling the environment-variable overload; enabledTreatWarningsAsErrorsfor Release builds.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Xamarin.Android.Tools.AndroidSdk/Runners/EmulatorRunner.cs | Updates StartProcess invocation to pass explicit onStarted: null. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/AvdManagerRunner.cs | Updates StartProcess invocations to pass explicit onStarted: null where unused. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/AdbRunner.cs | Updates multiple StartProcess invocations to pass explicit onStarted: null. |
| src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt | Adjusts unshipped API entry for the env-var overload to remove optional defaults. |
| src/Xamarin.Android.Tools.AndroidSdk/PublicAPI/net10.0/PublicAPI.Unshipped.txt | Same unshipped API adjustment for net10.0. |
| src/Xamarin.Android.Tools.AndroidSdk/ProcessUtils.cs | Restores shipped overload and defines the newer env-var overload without optional defaults. |
| Directory.Build.props | Enables TreatWarningsAsErrors for Release configuration builds. |
…lers and PublicAPI files Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
…rt caller changes Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
jonathanpeppers
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes RS0017 warnings caused by a stale
ProcessUtils.StartProcesssignature in thePublicAPI.Shipped.txtfiles, and enablesTreatWarningsAsErrorsforReleasebuilds to prevent similar regressions going forward.Changes
Restore old
StartProcessoverload inProcessUtils.cs:The old
StartProcesssignature (withoutenvironmentVariablesparameter) was a shipped API that was inadvertently removed whenenvironmentVariableswas added to the method. Restored it as a backward-compatible overload that delegates to the new method. Suppressed RS0027 on the shim since the shipped API already declares the optional parameter.Add convenience
StartProcessoverload inProcessUtils.cs:Added a new overload that accepts
environmentVariableswithout requiringonStarted, so callers don't need to pass a trailingnull. This overload delegates to the full 6-parameter method.Update
PublicAPI.Unshipped.txt(bothnetstandard2.0andnet10.0):Added entries for both the 6-parameter
StartProcessoverload (withenvironmentVariablesandonStarted) and the 5-parameter convenience overload (withenvironmentVariablesonly).Enable
TreatWarningsAsErrorsforReleaseconfiguration inDirectory.Build.props:CI will now fail on any warnings in Release builds, preventing future API tracking issues from going unnoticed.
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.