Skip to content

How to run Target in backgroud before debugging #8216

@Eptagone

Description

@Eptagone

I want to run a Node Script command in background before my debugging process.

<Target Name="DebugRunAssetsDevServer" BeforeTargets="Run" Condition=" '$(Configuration)' == 'Debug' ">
    <!-- Run the assets dev server -->
    <Message Importance="normal" Text="Starting Assets Dev Server" />
    <Exec Command="npm run dev" ContinueOnError="true" />
</Target>

The above code doesn't work when I start the project in debug mode. It works if I change to BeforeTargets="Build" but hangs waiting for the command to finish. But that command shouldn't finish because it starts my Vite Dev Server which compiles my scripts while I'm editing them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageHave yet to determine what bucket this goes in.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions