The NO Visual Studio movement: Compiling .net projects in Notepad++

What is the NO Visual Studio Movement?

I don't talk about it much, but I'm the chief of an underground technical movement called the 'NO Visual Studio' movement, or NoVS to its friends.

NO in this case doesn't mean 'No.' We steal from the NoSQL movement and re-define NO to mean 'Not Only'.

In NoVS we respect that sometimes a set of lightweight tools can be more powerful (and certainly more enjoyable) than the 'one tool to rule them all' philosophy of VS. Sometimes low-power = high productivity.

The movement has its roots in this talk by Charles Petzold, 'Does Visual Studio Rot the Mind?' The final section, 'The Pure Pleasures of Pure Coding' is most relevant:

I decided to use plain old ANSI C, and to edit the source code in Notepad -- which has no IntelliSense and no sense of any other kind -- and to compile on the command line...

...there's no APIs, there's no classes, there's no properties, there's no forms, there's no controls, there's no event handlers, and there's definitely no Visual Studio.

It's just me and the code, and for awhile, I feel like a real programmer again.

He says everything right there in a nutshell. Every word is like strong whiskey.

In keeping with the NoVS movement, my favourite machine is a mini-laptop I use on the bus. It's a true 'No Visual Studio' machine where the only IDE is Notepad++.

Mostly I write javascript, and occasionally C# and Silverlight. NimbleText, for example, was developed almost entirely 'NoVS' style.

I've tweaked my setup lately so that I can compile entire .net projects from inside notepad++ -- and I thought I'd share that bit with you now.

Compiling .net projects in Notepad++

Download this file and put it in your Documents folder:

Download tryCompile.txt (rename it as .bat)

Rename it to tryCompile.bat... and always read batch files before running them on your own machine. (On a stranger's machine you can afford to be less cautious)

Once you've got that file in place, find notepad++'s shortcuts file. It should be here: %APPDATA%\NotePad++\shortcuts.xml

Edit that file. And under this tag <UserDefinedCommands> add the following node:

<Command name="MSBuild" Ctrl="yes" Alt="no" Shift="yes" Key="66">%USERPROFILE%\Documents\tryCompile.bat &quot;$(CURRENT_DIRECTORY)&quot;</Command>

Now, while editing any file that is part of an existing .net project, hit Ctrl-Shift-B. That will launch 'TryCompile.bat' which will in turn locate and build the correct project file for you. (It will also add an MSBuild option to the Run menu in Notepad++)

This works for C# projects, projects, Data dude projects -- anything that includes a proj file that MSBuild can consume.

If you have other tools, hacks or tweaks to further the cause don't hesitate to share them.


My book "Choose Your First Product" is available now.

It gives you 4 easy steps to find and validate a humble product idea.

Learn more.

(By the way, I read every comment and often respond.)

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.