Project stopped building with MSBuild 16.10.0 #883
Merged
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.
Unfortunately we got hit by MSBuild bug in Visual Studio 2019 16.10.0 , which will only be solved in 16.10.1
This one: dotnet/msbuild#6373
Workaround was proposed by Scott Mitten. I tested it locally with that exact MSBuild that is affected.
The workaround is that every target now must contain
:Rebuild
( what a waste of space! ), and then projects get built successfully. Since we got a few folks affected immediately, and since the fix is expected in a a few weeks, I'd suggest we fix it now to avoid any questions and confusion. This will also resolve some immediate build pipeline issues. This will also help us in case of someone already downloaded and installed 16.10.0, but forgets to patch it later... we'd still work fine with that version.A follow-up PR would be necessary in the local mstelemetry portfile.cmake to point to latest commit id once this PR is merged. I am, however, adjusting the
TARGET sqlite:Rebuild,win32-lib:Rebuild
in the portfile itself. That's the main change that keeps things buildable even with MSBuild 16.10.0NOTE: I have not tested this with old MSBuild, only tested with MSBuild that comes with vs2019 16.10.0, and I hope that the GitHub action runner will verify the build scripts for me using an older version of MSBuild.
One unrelated change:
zlib
was anchoring tov141
, so I patched it to reuse the settings frombefore.targets
instead.