JSLint.Net does not work in CI build

Aug 8, 2014 at 5:24 AM
Hello,

I have added jslint using the nuget command of my project. This works fine when I run the build from visual studio. But when it builds in tfs build server then it does not work as it works in visual studio locally. Do I have to do any extra step or set up msbuild task to be able to kick jslint in the CI build. Please help me out with the steps.

Thanks,
Qamar
Coordinator
Aug 8, 2014 at 8:17 AM
Hi Qamar, thanks for the error report.

Can you please provide some more information, such as:
  • Is there an error report / stack trace coming from TFS? If so, please post it here.
  • Are you targeting your builds against x86, x64 or Any CPU?
  • Are you using your own TFS environment, or are you using a hosted solution (such as Visual Studio Online)?
JSLint.NET for MSBuild generally works as is in TFS (that's how I use it), but it's not the first time I've seen inconsistencies like this. Hopefully we can get to the bottom of it.
Aug 8, 2014 at 8:41 AM
Hi,

There is no error reports comes out of TFS, it simply passes the build in build controller even though locally same branch fails.
I am targeting Any CPU.
We have our on premise TFS build controller set up.

I have actually switched to another library and set up a msbuild task manually which works fine for me now. But I like your plugin which does not require that manual step of setting up a build task.

Thanks,
Qamar
Coordinator
Aug 9, 2014 at 4:22 AM
OK, not what I was expecting.

By default JSLint.NET for MSBuild raises a JavaScript violation as an Error which is enough to fail a build. But it can be configured to be a Warning or Message too, neither of which will break a build. Have you changed any of the JSLintNet.json settings?

Also, is the NuGet "packages" folder checked in to source control? Alternatively is NuGet package restore enabled and working? If the answers are no, then it's possible JSLint.NET isn't available on the build server.