refactor: anchor build output paths on the repo instead of $(SolutionDir) - #676
Merged
Merged
Conversation
…Dir) Closes the "TODO: Normalize this across solution" on the commented-out OutputPath in Directory.Build.props. $(SolutionDir) is only defined when MSBuild is driven by the .sln. Fourteen projects spelled their output as "$(SolutionDir)..\bin\...", so under a solution build that resolved to bin\, but a lone `dotnet build Foo.csproj` resolved the same text relative to the project and quietly wrote to src\bin\ instead - while the Nuke targets, the installer file list and the CI artifact all look in bin\. Nothing failed; the single-project build just stopped agreeing with everything else. It cost real time during the plugin-hash work, where a lone build looked reproducible only because the file being hashed was a stale leftover. Anchor the paths on $(MSBuildThisFileDirectory) instead and name them once: LogExpertBinRoot / LogExpertBinDirectory / LogExpertPluginsDirectory / LogExpertPluginsX86Directory / LogExpertDocsDirectory Configuration has to be defaulted alongside them: Directory.Build.props is imported before the SDK defaults it, and an empty value silently collapses bin\Debug\ to bin\. The condition leaves an explicit -c or a solution build untouched. Also folded in: - the two DocumentationFile paths, which had the same $(SolutionDir) defect - four test projects that hand-wrote <OutputPath>bin\$(Configuration)</OutputPath>, which is exactly the SDK default once AppendTargetFrameworkToOutputPath=false - PluginHashGenerator.targets now reads the shared properties rather than re-deriving the plugins directory, so the two cannot drift apart The $(SolutionDir) use left in src/SDK/ is deliberate: those samples are built from their own solution by plugin authors, not by ours. Output layout is unchanged - verified byte-for-byte against a pre-change snapshot: same 18 directories under bin/Release, same 65 files at its root, 19 plugins, 10 pluginsx86, both XMLs in bin/Docs. Lone builds of AutoColumnizer, SftpFileSystemx86, ColumnizerLib and LogExpert now land there too and no longer create src\bin. Plugin hash table still 21 entries in both configurations, all matching the shipped binaries. Full suite: 1491 passed, 7 skipped, 0 failed.
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.
refactor: anchor build output paths on the repo instead of $(SolutionDir)
Closes the "TODO: Normalize this across solution" on the commented-out OutputPath in Directory.Build.props.
dotnet build Foo.csprojresolved the same text relative to the project and quietly wrote to src\bin\ instead - while the Nuke targets, the installer file list and the CI artifact all look in bin. Nothing failed; the single-project build just stopped agreeing with everything else. It cost real time during the plugin-hash work, where a lone build looked reproducible only because the file being hashed was a stale leftover.Anchor the paths on $(MSBuildThisFileDirectory) instead and name them once:
LogExpertBinRoot / LogExpertBinDirectory / LogExpertPluginsDirectory /
LogExpertPluginsX86Directory / LogExpertDocsDirectory
Configuration has to be defaulted alongside them: Directory.Build.props is imported before the SDK defaults it, and an empty value silently collapses bin\Debug\ to bin. The condition leaves an explicit -c or a solution build untouched.
Also folded in:
The $(SolutionDir) use left in src/SDK/ is deliberate: those samples are built from their own solution by plugin authors, not by ours.
Output layout is unchanged - verified byte-for-byte against a pre-change snapshot: same 18 directories under bin/Release, same 65 files at its root, 19 plugins, 10 pluginsx86, both XMLs in bin/Docs. Lone builds of AutoColumnizer, SftpFileSystemx86, ColumnizerLib and LogExpert now land there too and no longer create src\bin. Plugin hash table still 21 entries in both configurations, all matching the shipped binaries.