metomorphose
❔ 🐞 Getting a wall of `MSB3030` every other call to `publish`
Hi all,
I'm working on a
dotnet
project that has an npm
front-end that gets pre-built and thrown into the wwwroot
folder before the back-end gets built. The files put in wwwroot
are uniquely named each time it is published and should overwrite this folder each time.
Somewhere along the way, I get a wall of MSB3030
errors because the dotnet
project is expecting the old files from wwwroot
to still exist after the contents have been deleted. If they don't exist to begin with, there are no errors.
I've tried putting some lines in the .csproj
file to remove the contents but can't seem to find the correct time to remove the files so they don't get picked up until after they are generated by npm
. My npm
commands happen on BeforeTargets="Publish"
. I've tried putting my delete commands AfterTargets="Clean"
, BeforeTargets="BeforeResolveReferences"
, and BeforeTargets="Build"
. I'm not familiar enough with the build order to figure out where the delete commands should go.
Any help is much appreciated!8 replies