shahul
shahul

Reputation: 11

Gulp: Error in plugin 'run-sequence(default) MSBuild failed with code 3221225477!. Gulp task Visual Studio 2017

While running gulp publish of Sitecore helix based solution getting below error

Error in plugin 'run-sequence(default)' Message: MSBuild failed with code 3221225477! Stack: Error: MSBuild failed with code 3221225477! at ChildProcess. (C:\Repository\node_modules\gulp-msbuild\lib\msbuild-runner.js:66:25) at ChildProcess.emit (events.js:198:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

Any help? MSBuild is getting success in Command prompt. Note: I checked other solutions which was running correctly previously is even not working now. any issue due to windows update?

Upvotes: 1

Views: 764

Answers (1)

Jean-Nicolas G.
Jean-Nicolas G.

Reputation: 239

the gulp.js file given used by the Habitat Demo is also using gulp-msbuild as for using msbuild.

From this node module, you can see that it retrieves the msbuild version you have locally installed. My guesses are :

1 - gulp-msbuild is using the wrong MsBuild version (if you have multiple vs installation, might be worth it to console.log within the node_modules\gulp-msbuild\lib\msbuild-finder.js

2a - You want to make sure you have the webtools installed (you can open visual studio installer and check if you have Web Development build tools checked.)

2b - You also want to make sure you have this directory:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications\

and these files within : Microsoft.WebApplication.Build.Tasks.dll, Microsoft.WebApplication.targets

3 - Habitat use gulp 3.9. So you want to use a node.js versions < 12 I think, maybe <10. Personnaly would recommend trying nodejs8.17.0 as I know this one is stable with gulp 3.9

Upvotes: 0

Related Questions