Unfortunately, it causes crashes nearly every time I start to debug the web project. I've tried the latest version and have the latest update to VS 2012. (When this is installed, can't debug, and VS2012 crashes, when it's not, everything works smoothly).
In theory this plugin would easily earn 5 stars, but it seems there are some issues with the js bundle plugin/minifier and JSHint. Two things: 1.) The minified version doesn't seem to work all the time (I mean it might be something I could fix if I would "optimize" the JS code a bit more, but for small web project I just want something that works out of the box). One thing it "broke", e.g. was the jQuery plugin jTruncate. 2.) While it seem to compress better than YUI, Google Closure Compiler seems to make a better job even with the Simple optimzations. So maybe Web Essentials could use GCC and allow a new preference, something like "advanced=true" to achieve even better minification. 3.) And possibly the most important thing: JSHint should become more customizable. E.g. there is this other VS Extension JSLint that imo does a much better job (though I don't really want another VS extension installed): You can set your custom namespaces, it is possible to check a single file on save (much better than checking all files on build, which can get really annoying if you work on big JS projects). Anyway, thanks for this quite helpful extension and up the good work.
Today I saw your session on Techday 2013 in Den Haag and you've made some really cool stuff!! The CSS hell is mitigated thanks to the Web Essentials 2012.
No more LESS support in the latest version. But "LESS" is there on the product page, there's even a LESS-settings tab in the options. Thanks for ruining our work process.
This extension is #1 result in Google for "Visual Studio LESS".
PS. the new "ASP.NET and Web Tools 2012.2" only highlights LESS code, but does not compile it!!
Any word on making a dropdown list of the JavaScript functions? I'm telling you...this would be a major help for me. I have made some .js libraries for my team that work great, but they're lengthy and when you need to quickly get to a particular function, this dropdown would be invaluable.
The minify option on the file context menu marks it to be minified, i.e. WE adds the minified dependency and the .min.js is created on build (or re-minify all js/css from Build/Web Essentials). If the .js is already minified, the option in the file context menu is grayed out. Delete the minified files from the project and the option will become available.
I created a JavaScript bundle, but the files aren't updating when I save or build. WE says they're updated in the Output window, but the js file contents don't change. Am I missing something? Is there a way to explicitly build them?
I get an error when I saved a less file.
---------------------------------------
The Less code:
@nice-blue: #5B83AD;
#header { color: @nice-blue; }
---------------------------------------
Preview Window:
/*
Compile Error.
See error list for details
*/
---------------------------------------
Error List Window:
Error 1 LESS: Syntax Error on line 1 H:\play.less 2 2
thanks.
I have a .less file with about 1000 lines in it (yes, it's huge) - and since upgrading to 2.4.5 when I save (and WE compiles & minifies) - VS becomes unresponsive for a couple of seconds. It's not terrible, but just enough to be annoying. It wasn't like this until I updated to 2.4.5 the other day. I'm thinking of trying the nightly...
Would it be possible to add an option to the context menu to allow me to rebuild my less files into css? The problem is, right now using the "generate css file on save" option makes it hard to use with a LESS framework like Bootstrap. I import the main bootstrap.less into my site.less. But if I need to make a change to any of the bootstrap files, I will get css files (or errors) each time I save one of the bootstrap files. So that means I needed to turn of the generation of files on save. But now I don't have an easy way to update my site.css file with the changes I've made to some of the bootstrap files. So I have to rebuild my whole project. It'd be great to have an option on the context menu to just regenerate the css files based on my less files. Is this possible? It'd might also be great to have the generate on save option work like the compile on build option, where it only generates files that already have a .css file. Or, to have a way to exlcude certain .less files from regenerating on save.
Hi Mads.
Seams like the current build 2.4.5 still has the error. I have removede every reference to WE on my drive, and reinstalled it - but with the same result.
25-01-2013 20:17:14: Updating bundles...
25-01-2013 20:17:14: Object reference not set to an instance of an object.
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
25-01-2013 20:17:14: Object reference not set to an instance of an object.
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
25-01-2013 20:17:14: Bundles updated
Think i have found something that makes it break. I have a blank VS solution as root which contains class and web (mvc4) projects. If i build the web project it works ok. If i hilight any of the others (ex. has focus in any other project), i get the error in the output window on build.
Same here.
Upgraded to 2.4.5; Close & restart VS; Build/Rebuild Solution. First build, the Web Essentials page is shown in the output window. But rebuild a second time (in the same VS session) and output window stays on the build page.
Any thoughts on what might be causing the "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))" line?
VS 2012 Update 1, ASP.NET Web app: cs + js + ts(0.8.1.1)
-------------------------
26/01/2013 01:01:55: Object reference not set to an instance of an object.
at MadsKristensen.EditorExtensions.TypeScriptMargin.CompileProjectFiles(Project project)
at MadsKristensen.EditorExtensions.TypeScriptMargin.CompileProjectFiles(Project project)
26/01/2013 01:01:55: Updating bundles...
26/01/2013 01:01:55: Bundles updated
26/01/2013 01:02:01: Compiling TypeScript...
26/01/2013 01:02:01: Compiling TypeScript...
26/01/2013 01:02:01: Compiling TypeScript...
26/01/2013 01:02:01: Compiling TypeScript...
26/01/2013 01:02:01: Compiling TypeScript...
26/01/2013 01:02:01: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at EnvDTE.Properties.Item(Object index)
at MadsKristensen.EditorExtensions.TypeScriptMargin.CompileProjectFiles(Project project)
at EnvDTE.Properties.Item(Object index)
at MadsKristensen.EditorExtensions.TypeScriptMargin.CompileProjectFiles(Project project)
26/01/2013 01:02:01: Object reference not set to an instance of an object.
at MadsKristensen.EditorExtensions.TypeScriptMargin.CompileProjectFiles(Project project)
at MadsKristensen.EditorExtensions.TypeScriptMargin.CompileProjectFiles(Project project)
26/01/2013 01:02:01: Updating bundles...
26/01/2013 01:02:01: Bundles updated
By turning off 'Compile all TypeScript files on build' and 'CompileTypeScript on save' in Tools/Options:Web Essentials:TypeScript I can reduce the Web Essentials output to just two lines:
------------
26/01/2013 01:20:00: Updating bundles...
26/01/2013 01:20:00: Bundles updated
------------
Still shows the Web Essentials page in the output window on first build in VS session and build page in subsequent builds.
Downside of turning off the Web Essentials Typescript build is that, although TypeScript is compiled to js, the minified js is not generated.
Very pleased to report that the "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))" line and associated object reference messages have gone in nightly build 2.4.51. Thank you, much appreciated.
However...
Web Essentials page is still shown in output window on first build in VS session; build page is shown on subsequent builds in session.
----------
S 2012 Update 1, ASP.NET Web app: cs + js + ts(0.8.1.1)
Hi is it possible to group items in web essential zencoding?
for example in sublime text 2 i can type:
table>(thead>tr>th*5)+tbody>tr>td*5 Note the () - (thead>tr>th*5)
and when it expands i get:
<table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
but in VS2012 it doesnt expand?
Thanks,
Steve T.
Groupings aren't supported yet. I'm hoping someone will send a pull request for it :) You can find the source here if you want to contribute https://github.com/madskristensen/ZenCoding