When you look at your build output you'll find several lines like
ERR! jshint Found 52 issues while linting ....
You'll also find lines like
WARN: Dropping unused ....
While these are not showstoppers regarding to execution they cause the build to return fail.
This is why Visual Studio reports a failed build.
EDIT
I did some major cleanup using ReSharper.
To completely ignore your .js files - you could remove .task.jshint from the weyland-config.js
Also to mention is the fact that your main-built.js does not get uglified with shipped weyland-config.js
In the first .task.uglify add an exclude for the App/mail-built.js and add a new .task.uglify as the last task. This path to main-built.js must be prepended with ../ since the path is relative to build folder.
Also found issues in when debug=false in web.config Haven't resolved that yet.
My weyland-config.js looks like this:
exports.config = function(weyland) {
weyland.build('main')
.task.jshint({
include: 'App/**/*.js',
exclude: 'App/main-built.js'
})
.task.uglifyjs({
include: ['App/**/*.js', 'Scripts/durandal/**/*.js'],
exclude: 'App/main-built.js'
})
.task.rjs({
include:['App/**/*.{js,html}', 'Scripts/durandal/**/*.js'],
loaderPluginExtensionMaps:{
'.html':'text'
},
rjs: {
name:'../Scripts/almond-custom', //to deploy with require.js, use the build's name here instead
insertRequire: ['main'], //not needed for require
baseUrl: 'App',
wrap:true, //not needed for require
paths: {
'text': '../Scripts/text',
'durandal': '../Scripts/durandal',
'plugins': '../Scripts/durandal/plugins',
'transitions': '../Scripts/durandal/transitions',
'knockout': '../Scripts/knockout-3.1.0',
'bootstrap': '../Scripts/bootstrap',
'jquery': '../Scripts/jquery-2.1.1',
'jquery.utilities': '../Scripts/jquery.utilities',
'toastr': '../Scripts/toastr',
'stashy': '../Scripts/stashy'
},
inlineText: true,
optimize: 'none',
pragmas: {
build: true
},
stubModules: ['text'],
keepBuildDir: true,
out:'App/main-built.js'
}
})
.task.uglifyjs({
include: ['../App/main-built.js']
});
}