Reputation: 4183
Visual Studio 2017 15.7.3, SDK Net Core 2.1, Windows 7 Ultimate
If I open a Developer Command Prompt
and run gulp from the root of my project it works.
If I open a Command Prompt
from Windows, navigate to the root of my project, and run gulp I get
'gulp' is not recognized as an internal or external command, operable program or batch file.
If I search the system drive I cannot find a gulp.exe or gulp.com.
I also looked directly in the C:\Users\%user%\AppData\Roaming\npm
and the npm-cache
folders and could not find the executable
.
In my Project.csproj
file I have
<Target Name="MyPublishScripts" BeforeTargets="BeforePublish">
<Exec Command="npm install" />
<Exec Command="gulp" />
<Exec Command="ng build" />
</Target>
When I Publish it crashes on the gulp
command with is not recognized ...
.
I've tried "%APPDATA%\npm\gulp" and "%APPDATA%\npm-cache\gulp"
and gulp is not recognized...
In the Output
window I can see that %APPDATA%
is properly interpreted as C:\Users\%user%\AppData\Roaming
.
C:\Users\%user%\AppData\Roaming\npm
is in the path for both command prompts
.
When gulp
successfully runs from the Developer Command Prompt
what path is being used?
My main question is what path would I use in the .csproj
for gulp
?
Upvotes: 1
Views: 329
Reputation: 471
You need to install gulp-cli for this. You can install gulp as a global npm module.
Try following on command-prompt.
npm install gulp-cli -g
npm install gulp -g
gulp --help
Let me know if you are still facing the same issue
Upvotes: 3