Skip to content

Script generation task fails with new net8.0 Artifacts output #1707

Open

Description

@DorianGreen

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)

<SqlPersistenceScriptBuilderTask
AssemblyPath="$(ProjectDir)@(IntermediateAssembly)"
IntermediateDirectory="$(ProjectDir)$(IntermediateOutputPath)"
ProjectDirectory="$(ProjectDir)"
SolutionDirectory="$(SqlPersistenceSolutionDir)" />

Additional information

Activity

  1. jasontaylordev commented on Feb 13, 2025

    @jasontaylordev
    Contributor

    Hi @DorianGreen. We've reviewed your issue and added it to our backlog. It's eligible to be picked up for a future release, but we can't provide a firm timeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions