3 Comments

ASP.NET Core doesn’t add an ETag header automatically to HTTP responses from MVC action methods or Razor Pages. We have to implement that ourselves to provide the users with true Conditional GET support that honors the If-None-Match request header.

Wouldn’t it be nice if all we had to do was to register it using app.UseETagger() like this?

// Add "app.UseETagger();" to "Configure" method in Startup.cs
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    app.UseStaticFiles();
    
    // Add this after static files but before MVC in order
// to provide ETags to MVC Views and Razor Pages. app.UseETagger(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }

We can if we use this little middleware class that handles the ETag and If-None-Match headers.

8 Comments

In an episode of .NET Rocks from December 2016 I declared that Web Essentials would not be carried forward to Visual Studio 2017 and beyond. I’ve decided that was a bad idea, released a version for Visual Studio 2017 and here’s why.

Since Web Essentials was first released for Visual Studio 2010 it has grown and grown in both features and complexity. While providing a lot of functionality it became somewhat of a monolith to maintain. The size of the project was enormous and that probably was one of the main reasons only very few people helped out by sending pull requests. Another problem was that when a bug would crash Visual Studio in a feature you never used, you had to uninstall the entire extension instead of just the part that crashed. That was very frustrating for the affected users.

About a year and a half ago, I started on splitting all the features out into their own smaller extensions. The goal was to break up Web Essentials into smaller chunks that would be easier to maintain, have better test coverage, be very targeted and – most importantly – optional. That goal has been achieved and I’ve already seen the benefits in terms of more community involvement and higher quality. I get a lot more pull requests to the individual extensions than I ever did with Web Essentials and I’ve even made people contributors to several of the projects that they have shown a vested interest in. Success!

The process of splitting out Web Essentials into smaller extensions have taken more than 18 months and is now finally done.

Web Extension Pack –> Web Essentials

Having 20+ extensions instead of one presents a new challenge. How to make sure that Web Essentials users could find and easily install all those extensions. Enter Web Extension Pack 2015. It is a meta extension that does nothing but install all the new extensions. It was a great way to just point people to a single extension that would take care of adding all the features relevant to web developers.

Now that I’m done separating all of Web Essentials into smaller features, it felt like Web Extension Pack was pretty much the same thing Web Essentials used to be. Namely a single download that would add a bunch of helpful web development related features.

So I had a few options. Either keep the name “Web Extension Pack” and forever lose the good name and brand “Web Essentials”, or rename the Web Extension Pack extension to Web Essentials. I’ve chosen to rename in order to keep the brand, logo and generally positive associations people have with the name “Web Essentials”.

Web Essentials lives on, but with smaller optional pieces, higher quality, more focused functionality, more community involvement, simpler code bases, and a lot more fun for me personally to maintain.

Web Essentials 2017

I just updated Web Extension Pack 2017 with the renaming and branding change to make it Web Essentials 2017. The brand and logo is alive again and hopefully for many years to come.

Thanks to everyone who ever downloaded Web Essentials or any other of the smaller extensions, left comments, ratings, opened issues and sent pull requests. Keep the feedback coming.

17 Comments

For the past couple of years, Web Essentials have been including features for bundling and minifying JS and CSS files as well as compiling LESS, Sass and CoffeeScript. As of Web Essentials 2015 that is no longer the case. However, I’ve gotten so many requests to bring these features back that I’ve created two new Visual Studio 2015 extensions to deal with it. And I need your help testing them before Visual Studio 2015 goes RTM.

Bundler & Minifier

This extension allows you to perform bundling and minification of JS, CSS and HTML files very easily and, in my mind, takes a better approach to how it’s done over the same feature in Web Essentials.

Download from VS Gallery Bundler & Minifier
Download nightly CI builds from vsixgallery.com
Source code on GitHub  
 

Web Compiler

Based on what I learned building compilers for Web Essentials, this extension improves on the stability and usability significantly. You can now very easily specify which LESS/Sass/CoffeeScript files to compile and with what settings for each file individually.

Read more and download Web Compiler
Download nightly CI builds from vsixgallery.com
Source code on GitHub 

Why new extensions?

In the past year or so, I’ve started separating out features from Web Essentials into smaller single-purpose extensions. I’ve done that for several reasons.

  1. It keeps the Web Essentials source code smaller and more maintainable
  2. Since it’s smaller, I hope to get more contributions from the community
  3. If one feature in Web Essentials cause a crash/hang, then the entire extension is broken
  4. Issues are much easier to deal with in smaller extensions
  5. By having smaller extensions, you can install just the ones you need

The code in Web Essentials for dealing with Bundling, minification and compiling was very error prone and almost impossible to maintain. For several months I wasn’t even able to compile Web Essentials itself due to a lot of weirdness in the node.js based compilers being used.

Help wanted

Given that these two extensions are brand new and the amount of requests for them has been so immense, it becomes really important that they both are working awesomely when Visual Studio 2015 goes RTM. So please help me test them out by installing them and reporting any issues to their GitHub issue tracker. If you want to contribute then you’re more than welcome to send pull requests with modifications and/or unit tests. If you want to add new features, all I ask is that you open an issue first so we can discuss it before sending the pull request.

These extensions are for a huge portion of Visual Studio web developers who don’t want to setup Grunt/Gulp to handle the client-side workflows, but instead have happily relied on Web Essentials in the past. These extensions are for you.

11 Comments

A few months ago I wrote about some small handy extensions I created for Visual Studio. This is part 2 with even more handy extensions. So here are some of the extensions I’ve worked on since then.

Open Command Line

Though I’m not a console-person, I do use both PowerShell and the regular command line quite a bit. Mostly I use the command line to run Grunt commands or with other commands that have to do with my Visual Studio projects.

The problem is that I always have to cd my way to the root of my projects before I start executing any commands.

Open Command Line

With the Open Command Line extension I can now just hit Alt+Space to open my console of choice already on the path of my project root. It supports any console including PowerShell, cmd, Bash etc.

Download Open Command Line on the VS Gallery

Open from Azure Websites

Sometimes when I build websites, I need to download the deployed content and run it locally. That’s a little cumbersome to do manually, so this extension helps make this super easy.

The extensions adds an Open from Azure Websites button that does it all automatically and opens the remote website as a project in Visual Studio.

Open from Azure Websites

Download Open from Azure Website on the VS Gallery 

Visual Studio Auto Updater

I love Visual Studio extensions and I use a lot of them every day. However, it can sometimes be annoying to keep them all up-to-date when new versions are released.

Visual Studio Auto UpdaterThe Visual Studio Auto Updater will automatically download and install updates to extensions in the background so you don’t ever have to do it manually again. It will only update the extensions that you have approved for auto updating.

Download Visual Studio Auto Updater on the VS Gallery

All of these extensions are of course open source and available on either my GitHub profile or on the LigerShark profile.

4 Comments

Update Jan 16, 2015 – The newly released Visual Studio 2015 CTP 5 also supports Grunt/Gulp Intellisense using the files available in this blog post. In fact, the Intellisense will be a lot better in CTP 5 due to the support for Object Literal Intellisense in the JavaScript Editor.

I’ve spent some time figuring out how to get Intellisense working for Grunt and Gulp in the JavaScript editor. Today, I hit a breakthrough that lights up Intellisense automatically. All it requires is that you perform the following two steps:

  1. Download the JavaScript Intellisense files (zip with two .js files)
  2. Copy them to C:\Program Files (x86)\Microsoft Visual Studio 12.0\JavaScript\References

If you’ve installed Visual Studio under a different path, then you’ll have to find the correct folder at that location instead.

This trick also works in Visual Studio 2015 Preview, but then the folder to copy the JavaScript files to is: C:\Program Files (x86)\Microsoft Visual Studio 14.0\JavaScript\References

Here’s what it looks like when editing GulpFile.js:

GulpFile.js Intellisense

And here is GruntFile.js:

GruntFile.js Intellisense

This is my first attempt, so please give it a try and let me know what you think. I want to try building this into Visual Studio 2015 so your feedback is super important.