Silence experimental coroutine deprecation warnings for local builds#2470
Closed
emmche wants to merge 1 commit into
Closed
Silence experimental coroutine deprecation warnings for local builds#2470emmche wants to merge 1 commit into
emmche wants to merge 1 commit into
Conversation
VS2026's MSVC STL emits a hard error (C2338 / STL1011) when <experimental/coroutine> is included without _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS. CI already sets this via $env:CL, but local/IDE builds did not, breaking Debug|x64 builds. Add the define (and /wd9047 for the matching command-line warning) to src/Directory.Build.props via ItemDefinitionGroup/ClCompile so every C++ project in the solution inherits it. C# projects ignore ClCompile, so this is safe at solution scope. Follow-up: migrate off <experimental/coroutine> to the C++20 <coroutine> header and drop /await, then remove the suppression here and in the CI workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
VS2026's MSVC STL emits a hard error (C2338 / STL1011) when <experimental/coroutine> is included without _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS. CI already sets this via $env:CL, but local/IDE builds did not.
Description of changes
Add the define (and /wd9047 for the matching command-line warning) to src/Directory.Build.props via ItemDefinitionGroup/ClCompile so every C++ project in the solution inherits it. C# projects ignore ClCompile, so this is safe at solution scope.
Will fast follow with more robust solution.
How changes were validated:
Specify how you tested your changes (i.e. manual/ad-hoc testing, automated testing, new automated tests added)-->