Repository navigation
Commit 0a0ea20
Fix import library not being copied on a clean first build (#1017)
* Fix import library not being copied on a clean first build
libHttpClient.import.props staged its build output into consuming projects
using a static ItemGroup:
<ItemGroup Label="CopyDependencies">
<ReferenceCopyLocalPaths Include="$(HCOutDir)\*" />
</ItemGroup>
Static item globs are expanded during project evaluation, which happens
before the referenced libHttpClient project has been built. On a clean tree
$(HCOutDir) does not exist yet, so the glob matches nothing and no output is
staged. A second build appears to fix it only because the folder has been
populated in the meantime.
Move the glob into a target so expansion is deferred to execution time,
after ResolveProjectReferences has built the referenced project.
Observed on a clean tree (Debug|Gaming.Desktop.x64, GDK 260403, v143),
consuming project output folder:
before fix, build 1: libHttpClient.GDK.dll only (no .lib/.exp/.pdb)
before fix, build 2: dll + lib + exp + pdb (1.0s, pure copy)
after fix, build 1: dll + lib + exp + pdb
Consumers that link against the staged output fail with
LNK1181: cannot open input file 'libHttpClient.GDK.lib' until a second
build is run.
On the GDK this had a second effect worth calling out: because nothing was
staged from $(HCOutDir), the DLL that landed next to the consumer on build 1
was not the source-built one at all. It was the deprecated GDK extension
library redist, arriving via a different path. Verified by hash:
consumer output 9D6FB197238977FFF70F33F064DCF8A8E4BD79BDA32F2352534965BE14784551
GDK ext redist 9D6FB197238977FFF70F33F064DCF8A8E4BD79BDA32F2352534965BE14784551
source-built DLL 7AD26FAD7CDD2F01157E5E12D61F60344D81B577684864001C44A1F0A98E0686
So a clean first build produced a mismatched pair: an extension-library DLL
with no import library. After the fix the consumer receives the source-built
DLL and its matching import library. This matters ahead of GDK 2610, which
removes the extension library paths entirely.
Also replaces the stale "Copy PlayFabCore to OutDir" comment, which did not
describe what this block does.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bdd5537e-42e5-4d3b-bf94-d1218cd0610e
* Clarify staging comment to cover the static-library configuration
The comment described the staged output as dll, import library, pdb, which
is only true for the dynamic flavor. When HCStaticLib=true the target stages a
static library and its pdb instead, with no DLL or import library.
Verified by clean builds of both flavors (Debug|x64, v143):
dynamic: libHttpClient.Win32.dll/.exp/.lib/.pdb
static : libHttpClient.143.Win32.C.lib/.pdb
Comment-only change; no behavior change.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bdd5537e-42e5-4d3b-bf94-d1218cd0610e
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bdd5537e-42e5-4d3b-bf94-d1218cd0610e1 parent fdfac65 commit 0a0ea20
1 file changed
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
78 | 97 | | |
79 | 98 | | |
0 commit comments