Fix native wrapper references pointing at a nonexistent libs path (breaks all AnyCPU/design-time builds)#50
Open
anagnorisis2peripeteia wants to merge 1 commit into
Conversation
The FakerInputWrapper/SharpOSC/Nefarius.ViGEm.Client references pointed at
..\libs\$(Platform)\, which resolves to a non-existent repo-root libs\ folder
(the libs actually live under DS4Windows\libs\{x64,x86}), and $(Platform) is only
ever x64/x86. Normal x64/x86 builds tolerate the unresolved HintPath (the wrapper
DLLs are picked up as content), but design-time / analysis builds force
Platform=AnyCPU, which has no libs folder, so the references fail to resolve and the
project can't be analyzed by tooling such as Stryker.NET.
Point the HintPaths at the real location (libs\...) and add a NativeLibPlatform that
falls back to x64 when Platform is AnyCPU or empty, so both the normal builds and
AnyCPU analysis builds resolve the references.
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.
Fifth find from the mutation-testing campaign (#37 / #46): the three bundled wrapper references in
DS4WinWPF.csprojpoint at a directory that doesn't exist.FakerInputWrapper,SharpOSC, andNefarius.ViGEm.Clientare referenced via..\libs\$(Platform)\…, which from the project directory resolves to a repo-rootlibs\— but the DLLs actually live atDS4Windows\libs\{x64,x86}. Normal x64/x86 builds still work only by accident: the content items lower in the csproj use the correctlibs\…path, and MSBuild's reference resolution falls back to those candidate files. Those items are conditionally removed unlessPlatformis exactly x64/x86 — so under AnyCPU, both mechanisms fail and compilation dies withCS0246(ViGEmClient etc. not found).AnyCPU is what evaluation-style builds use — IDE design-time builds, analyzers, and mutation/analysis tooling. Concretely, Stryker.NET's own suggested repro fails on this repo today:
The change: point the
HintPaths at the real location (libs\…under the project directory) and introduceNativeLibPlatform(x86 → x86, everything else → x64) so AnyCPU evaluation builds resolve the references. Normal x64/x86 builds are unchanged in behaviour.Before / After
Same command (
dotnet build DS4WindowsTests\DS4WindowsTests.csproj -c Debug --property:Platform=AnyCPU), same machine:ba4bdcb)CS0246: ViGEmClient / IXbox360Controller / …(unresolvable references under AnyCPU)x64 full test suite + x64/x86 publishes: no change (verified in CI evidence).
Local review history: https://gist.github.com/2695686d512cecd8c7f9921a969ff240