Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Make SDK resolution error messages more helpful. - #341

#341
Merged
YuliiaKovalova merged 2 commits into
microsoft:mainmicrosoft/MSBuildLocator:mainfrom
teo-tsirpanis:hostfxr-error-writerteo-tsirpanis/MSBuildLocator:hostfxr-error-writerCopy head branch name to clipboard
Oct 2, 2025
Merged

Make SDK resolution error messages more helpful.#341
YuliiaKovalova merged 2 commits into
microsoft:mainmicrosoft/MSBuildLocator:mainfrom
teo-tsirpanis:hostfxr-error-writerteo-tsirpanis/MSBuildLocator:hostfxr-error-writerCopy head branch name to clipboard

Conversation

@teo-tsirpanis

@teo-tsirpanis teo-tsirpanis commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Fixes #331.
Fixes #337.

This PR makes use of the hostfxr_set_error_writer API to capture SDK resolution error messages into a string. This lets us display it in the message of the exception we throw, and stop directing users to look at stderr. The exception message was also reworded to be shorter, and include the error code.

@YuliiaKovalova

Copy link
Copy Markdown
Contributor

@teo-tsirpanis thank you for the contribution!
you were faster then me with this change :)

@YuliiaKovalova
YuliiaKovalova merged commit 8acc4c3 into microsoft:main Oct 2, 2025
2 checks passed
@teo-tsirpanis
teo-tsirpanis deleted the hostfxr-error-writer branch October 2, 2025 13:38
@teo-tsirpanis

Copy link
Copy Markdown
Contributor Author

@YuliiaKovalova can you please add a hacktoberfest-accepted label to this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.