0

In our web project, we've modified the .csproj file to run this command pre-build:

cd $(MSBuildProjectDirectory)
npm run build-release
cd $(MSBuildStartupDirectory)

It works just fine.

The problem is that we don't want this in the .csproj anymore. We only want it in the build definition.

I can't figure out. This is what I have, and I get errors about the path being too long.

enter image description here

core
  • 32,451
  • 45
  • 138
  • 193

1 Answers1

2

It's a pre-build script. You can run batch files or PowerShell scripts, not command line utilities. The script should be a source controlled artifact, and the path to the script file should be a source control location, not a local path on the build agent.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120