-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Describe the bug
Description
When using Artifacts output layout in net8.0+ the script generation task fails the build as it cant find the output directory
Expected behavior
When using Artifacts layout, the script generation task should respect the new artifact directories for obj, bin, and publish
Actual behavior
The script generation task prefixes the output path with the project dir - even though the output path is a absolute path and not a relative one.
Versions
Tested with 8.x, but would apply to all versions that can be used in net8.0+ projects.
Steps to reproduce
Enable Artifacts output as described in: https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output
Relevant log output
Additional Information
Workarounds
Disabling script generation
Possible solutions
In the target file, you can check if the paths are relative before appending $(ProjectDir)
NServiceBus.Persistence.Sql/src/ScriptBuilderTask/NServiceBus.Persistence.Sql.targets
Lines 23 to 27 in 7bb7a0e
| <SqlPersistenceScriptBuilderTask | |
| AssemblyPath="$(ProjectDir)@(IntermediateAssembly)" | |
| IntermediateDirectory="$(ProjectDir)$(IntermediateOutputPath)" | |
| ProjectDirectory="$(ProjectDir)" | |
| SolutionDirectory="$(SqlPersistenceSolutionDir)" /> |