ensure build outputs always go to $(Configuration)\$(TargetDotnetProfile)\bin
#4454
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.
Different build targets copy their outputs at different times during the build which means
$(OutputPath)
will only really be honored if it's set in the top-levelFSharp.Directory.Build.props
, but we need to consume the$(TargetFramework)
variable to properly set this, and$(TargetFramework)
is set in the individual project files, which means we can only have a meaningful value of$(OutputPath)
inFSharp.Directory.Build.targets
, but that doesn't work for certain VS projects (notably those consuming the VsSDK) because they've already captured the value of$(OutputPath)
before we have a chance to properly set it.The fix is to manually copy the build artifacts after the
AfterBuild
target has executed.This is a hack and is temporary until I've upgraded the rest of our project files to the SDK, at which point it's trivial to move our output directories away from
$(Configuration)\net40\bin
and to a cleaner, and more importantly, supported by the dotnet CI system value ofartifacts\$(Configuration)\$(AssemblyName)\$(TargetFramework)\bin
.