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

Fix setting of IntDir MSBuild property#1471

Merged
DefaultRyan merged 2 commits intomastermicrosoft/cppwinrt:masterfrom
user/defaultryan/intdirmicrosoft/cppwinrt:user/defaultryan/intdirCopy head branch name to clipboard
Jan 29, 2025
Merged

Fix setting of IntDir MSBuild property#1471
DefaultRyan merged 2 commits intomastermicrosoft/cppwinrt:masterfrom
user/defaultryan/intdirmicrosoft/cppwinrt:user/defaultryan/intdirCopy head branch name to clipboard

Conversation

@DefaultRyan
Copy link
Member

Building cppwinrt was generating a bunch of warnings like

(CreateRecipeFile target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(2566,5)
: warning : Remote deployment might be slow/inefficient. Could not find a part of the path 'E:\GitHub\cppwinrt\fast_fwd
\x64\Release\cppwinrt_fast_forwarder.lib.recipe'. [E:\GitHub\cppwinrt\fast_fwd\fast_fwd.vcxproj]

I tracked this down to us setting IntDir too late in Directory.Build.targets, which was too late, and processed after a bunch of other logic. The result of this was that IntDir got the default value, which was then used for IntDirFullPath, and then we overrode IntDir.

Some MSBuild *.Targets would then use the inconsistent IntDirFullPath and complain about folder not being created.

To fix this, we now set both OutDir and IntDir consistently, in Directory.Build.Props. Since this left Directory.Build.Targets empty, I'm deleting it.

(Also, the old code was using OutDir to set IntDir, and the official docs say "Don't Do That", so we've also got that, which is nice)

With all that build spew going away, it should be easier to see the actual warnings we care about.

@DefaultRyan DefaultRyan requested a review from Scottj1s January 28, 2025 23:23
@DefaultRyan DefaultRyan merged commit f2a7ffb into master Jan 29, 2025
75 checks passed
@DefaultRyan DefaultRyan deleted the user/defaultryan/intdir branch January 29, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

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