Resharper Magic Tricks

Last week, I gave a presentation at the GSP Developers’ Guild’s monthly meeting where I talked about some of the cool (maybe hidden) things that ReSharper can do for you. In this article I’m going to summarize my talk and give links to where you can get the Custom Live Templates, and Extensions. I realize that this post is lessened by not having some of the visuals (no projector, etc).


ReSharper Intro


ReSharper can do some really cool things. 


ReSharper can bulk fix code style issues like variable names conventions.




Code completion is made easier and code simplification is highlighted.


It  can also help with if statement nesting or showing you extra code that can be reduced.


New to Resharper 9 is finding references on NuGet. I referenced a type from MomentSharp - a DateTime library that I wrote - but I don’t have it referenced in the project. I can use the light blub or Alt + Enter and “Find this type on”.


Also new to ReSharper 9 is support for C# 6 features like string interpolation.

Read More

Making Bookmarklets Cool Again

At some point Bookmarklets died and no one played their dirge.


If you don’t know what a bookmarklet is, it’s a small piece of javascript code embedded in a bookmark. In some cases, the script injects a javascript file into the the website where the bookmark was clicked. This injection is makes them super useful but is probably also what made them disappear. 


XSS (Cross-site scripting) is a topic for another day, but you should beware of it you're not. Go look it up, I’ll wait. No really, this article will still be here when you get back.


In the past few weeks, I’ve been creating some interesting bookmarklets to help with my web development. Some of these I’ve found, others I’ve created (mine). To use them, simply drag each headings link to your bookmark bar.


Last Modified:




Want to know the last time an asset was updated? Do note that this bookmarklet only works with static content. It won’t work on server side rendered content like Asp.Net or PHP. If the alert shows you today, right now, it’s most likely dynamically generated.


Read More

Magical one page telerik reporting viewer

In an effort to simplify a project that used Telerik’s Reporting Engine, I wanted to create a single View that listed the available reports and a single View to hold the HTML Report Viewer. In the middle of the project a new requirement was added; you know how that goes. Some reports needed to be able to have querystring parameters come from a related View. This is how I did it. Behold the magic.


First I built my View to list the reports. Each report had a link like this:


@Html.ActionLink("Click Me", "Report", 
    new { title = "Report Title", path = "Namespace.Path.To.Report" }, 
    new { target = "_blank", @class = "btn btn-primary" })


You can get the Namespace path from the code behind file of the report.


Set up an ActionResult like this:


public ActionResult Report(string path, string title)


    ViewBag.ReportPath = path + ", ProjectNS";

    ViewBag.Title = title;

    return View();



ProjectNS should be your root Namespace. 


Read More

Using Grunt to JSHint and JSCS your JavaScript code.

This is part 2 to my last post, which you’ll want to read first since I’m going to assume some of your gruntfile.js has some necessary settings.


Using Grunt to JSHint (Code Quality) and jscs (Code Style checker) your JavaScript code.


In this post, I'm going to show you how to get Gruntjs to check your JavaScript Code for quality in Visual Studio 2015.


Add this to your package.json file.


"grunt-jscs": "latest",
"grunt-contrib-jshint": "latest"


This will add JSCS and JSHint to your node_modules folder and let us run our tasks.






to gruntfile.js at the bottom with the rest of your loadNpmTasks


Read More

How to get Grunt to compile your LESS files on save, and at build, in VS 2015.

I’m trying out Visual Studio (VS) 2015, which at the time of this writing, is in RC. Like most developers, the first thing I do with a shiny new VS is to install my tools and plugins. Of course I got Resharper (R#) installed and the PostFix Templates extension for R# installed.


Lately, I’ve been playing around with Win 8/10 JS apps that I’ve started in VS 2015, but I hadn’t opened any existing applications in VS 2015 since I work on some team projects. VS 2013 had one-way project upgrading and I had some issues with a previous team where not everyone was on the same version of VS.


Today, I had both VS 2013 and 2015 opened at the same time. This caused some issues with R#’s licensing platform so I made the leap and opened one of my web projects in VS 2015.


Let me back up a little: since I mostly do web development, I work with LESS quite a bit. Once upon a time I used a Post Build event to execute an npm command to compile my LESS files. As most web developers do, I have Web Essentials (WE) installed and at some point it finally stopped giving me issues with Bootstrap’s LESS files.


Moving forward: I had opened a web application in VS 15 and tried to save a LESS file. I noticed that it didn’t recompile the LESS file to CSS. That’s when I noticed that I had forgotten to install WE! Off to the VS Extension Manager! What’s this? WE installed and in this version, they’ve stripped the compilers out.


Which brings me to writing this post:


How to get Grunt to compile your LESS files on save, and at build, in VS 2015.


Read More

About Me

Hello, I’m Jonathan Peterson (aka Eonasdan)! I’m a web developer and CEO of Paladin Cloudware.

I have over 8 years of experience developing a wide array of web applications and websites. In my free time, I contribute to several open source projects.

As a die-hard developer, you’ll find me programming in my head on the rare occasions when I'm without an Internet connection.

Find me on:


telerik, ReSharper, Tips And Tricks, less, grunt, c#, visual studio, code quality, visual studio 2015