You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to run Target in backgroud before debugging #8216
I want to run a Node Script command in background before my debugging process.
<TargetName="DebugRunAssetsDevServer"BeforeTargets="Run"Condition=" '$(Configuration)' == 'Debug' ">
<!-- Run the assets dev server -->
<MessageImportance="normal"Text="Starting Assets Dev Server" />
<ExecCommand="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.
Activity
JaynieBai commentedon Dec 5, 2022
https://learn.microsoft.com/en-us/visualstudio/msbuild/target-build-order?view=vs-2022. Seems msbuild targets can only be build in order. I think you need to build your DebugRunAssetsDevServer target seperately.