Download It Now! Exec Inline: A VS2003 add-in that lets you run a chunk of code
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

Download It Now! Exec Inline: A VS2003 add-in that lets you run a chunk of code

Execute Selected Code item on edit menu

A couple of months ago I showed a short demonstration of an addin i use called Exec Inline -- well here's the installer code for Visual Studio 2003

Download the Code for ExecInline Download the code for 'ExecInline'

I've put the source code up, instead of the installer file. This is a great opportunity for a member of the developer community to get the installer working on other people's machines. First person to tell me how to make the installer work (for people other than myself) gets some kind of prize.

How to install the add-in:

Just download the ".msi" file and run it. Follow the prompts, etc.

Now when you load Visual Studio 2003, you should find a new option in the Edit menu, called 'Execute Selected Code'

Add it to the toolbar in Visual Studio 2003

Add the command to the toolbar

Right click on the toolbar and select 'customize'. Then go to the 'commands' tab, select the 'Addins' category, and find the command called 'Execute Selected Code'. Drag the little icon (with the lightbulb) to a handy place in the toolbar.

How to use the add-in

  1. Highlight the code you wish to run.
  2. Press the 'Execute Selected Code' item in the Edit menu (or the lightbulb if you've added it to the toolbar).
  3. The code is compiled and immediately executed in its own little assembly

Sorry it's not Visual Studio 2005 friendly!

When I have a chance I'll create a Visual Studio 2005 version and release that too.

Sorry no code!

If I get the time, I'll perform a few urgently needed improvements to the code and then release that for ya. I'm really not trying to keep it to myself -- it's just hard to find the time.

When I've moved the project to Visual Studio 2005 then I'll possibly release the source code on CodePlex -- then additions and modifications can be sent in easily. It's a fun little tool, but far too limited in its current state.

All Credit Belongs to...

As I've said before, all credit for this invention goes to these four places:

Code compilation retyped from jconwell's Dot Net Script Project at CodeProject.

Wrapper around compilation via dstang2000's DynamicCompileAndRun project.

Help with writing a VS Add-in: Scott Swigart, PasteAs Visual Basic Add-in

And help with getting the currently selected text from the IDE, via Kevin McFarlane's VS Csharp Macros page.

CodeProject and MSDN, what brilliant resources! No credit goes to me -- jconwell, dstang2000 and Scott Swigart, they did all the tricky bits.

Also, the idea was partially inspired by Don Syme's F# interactive which I first saw mentioned on John Lam's website -- but mostly inspired by Ctrl-E from SQL Query Analyzer. In fact the more I look into this little side project the less credit I deserve. I am a flea on the back of bigger fleas, ad infinitum.

Feedback welcome!!

Thanks to the people who volunteered to beta test this previously. Sorry I didn't incorporate your feedback into this edition, but the words "no, still broken" weren't actually all that helpful ;-) Just kiddin, I appreciate your help. All ideas, complaints will be read thoroughly prior to deletion.





'http://' on Sat, 06 Jan 2007 09:33:52 GMT, sez:

cool tool dude.



'Richard Thomas' on Mon, 08 Jan 2007 09:08:02 GMT, sez:

Unfortunately, I can't get this nifty tool to work. When I run VS 2003 I get:

---------------------------
Microsoft Development Environment
---------------------------
The Add-in 'ExecInline' failed to load or caused an exception.
Would you like to remove this Add-in?
If you choose yes, you will need to reinstall the Add-in to use it again.

Error Message: Class not registered


Error number: 80040154
---------------------------
Yes No
---------------------------

Thanks!



'lb' on Mon, 08 Jan 2007 20:18:07 GMT, sez:

thanks for the report Richard.

Can you tell me:

do you have both Visual Basic and C# installed? (i think you'll need both. But it shoudln't fail that early anyway...)

HAS ANYONE HAD ANY SUCCESS with this tool? I'm considering yanking it, if the installer is missing something.



':(' on Wed, 10 Jan 2007 11:10:47 GMT, sez:

same error here



'Jeff' on Thu, 05 Apr 2007 03:42:38 GMT, sez:

Yeh I can get it to work if i compileit on my own machine.

But simply running the installer isn't good enough -- you have to compile it.

Thanks for sharing the code Leon!



'Eric D. Burdo' on Thu, 05 Apr 2007 10:23:08 GMT, sez:

Heres a vote for the 2005 edition. :)




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. But the right to delete any post for any reason is reserved. Don't make me do it. Comments may be republished, emailed to your loved ones or printed and used as toilet paper. Who reads this legal bit anyhow?

TimeSnapper is a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

TimeSnapper won last year's Developer Competition at Larkware.com, and is used by over 10,000 people.

Articles

21 tools used in our MicroISV 21 tools used in our MicroISV
Lost Treasures of the DOS World: tree! Lost Treasures of the DOS World: tree!
The Virtual Machine Machine and the Virtual Virtual Machine The Virtual Machine Machine and the Virtual Virtual Machine
Should Linq To Sql Go Should Linq To Sql Go "Open Source"?
Redux: New Synchronisation Idea Overlooked By Microsoft Redux: New Synchronisation Idea Overlooked By Microsoft
New Synchronisation Idea Overlooked By Microsoft Live team New Synchronisation Idea Overlooked By Microsoft Live team
Visual Studio UX Taskforce, Office UX Taskforce... etc. Visual Studio UX Taskforce, Office UX Taskforce... etc.
How to be Jeff Atwood How to be Jeff Atwood
Reuse good -- Abstractions better! Reuse good -- Abstractions better!
Word of the day: Upsert Word of the day: Upsert
awesome Atli tooltip awesome Atli tooltip
Leaky Abstractions? Try Asp.Net! Leaky Abstractions? Try Asp.Net!
A truly original thought A truly original thought
Throw New VirtualMachine(); Throw New VirtualMachine();
Undo, redo, predo, preundo Undo, redo, predo, preundo
A little A little "bit" of programming therapy
Coding Koan: the power of one Coding Koan: the power of one
Behavior Driven Development: As Human As Possible Behavior Driven Development: As Human As Possible
What To (Really) Do If You Find Out Your Parents Are Using Vista (redux) What To (Really) Do If You Find Out Your Parents Are Using Vista (redux)
What To Do If You Find Out Your Parents Are Using Vista What To Do If You Find Out Your Parents Are Using Vista
Sample Code From Text-Adventure Game Platforms Sample Code From Text-Adventure Game Platforms
TimeSnapper 3.0 -- an interactive, bubbling cauldron of possibilities TimeSnapper 3.0 -- an interactive, bubbling cauldron of possibilities
The laptop compubody sock The laptop compubody sock
Everything that's bad for you is suddenly good for you! Everything that's bad for you is suddenly good for you!
Everything I know about Code Reviews I learnt from Star Wars (and JCooney) Everything I know about Code Reviews I learnt from Star Wars (and JCooney)
Syntax highlighting of strings Syntax highlighting of strings
Google AppEngine: evil virus or viral evil? Google AppEngine: evil virus or viral evil?
Workflow software: I'm calling the bluff. Workflow software: I'm calling the bluff.

Archives .: secretGeek :: Complete Archives :.
25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Top 10 SecretGeek articles Top 10 SecretGeek articles

Downloads

TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 2.5: with password protection

ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Next Action NextAction
Managing the top of your mind



[powered by Google] 


Thai Erawan, Brisbane Restaurant, delicious thai food in paddington Thai Erawan, Brisbane Restaurant
World's Simplest Code Generator (html edition) World's Simplest Code Generator
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker
How to be depressed How to be depressed
You are not inadequate.



Recommended Reading

The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Reginald Braithwaite
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Joel Pobar
Eric Sink
Joel Spolsky
Des Traynor

Aggregated Links

programming.reddit.com
dzone
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
n links today
new and notable
morning coffee
learning .net
weekly link post
(my del.icio.us account)

LinkedIn profile
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2006 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2006 .: privacy