Sometimes, we need to execute a short part of code to accomplish a unique and simple task, like deleting all files of a folder and his subfolders or testing a network communication… All sort of tasks that you don’t need/want to create a project or a page/form.
So, I have written on my spare time a Visual Studio AddIn(winform application) that can help me to execute this sort of code.
It’s a first shot realised in 1-2 hours, so it’s simple and incomplete but usefull.
I have call this plug-in JustInTimeCode(not the true meaning of Just-in-time, but greater than on the fly…)
As all visual studio plugins, the integration is difficult(installers are not adapted to deploy correctly VS add-ins), so I will explain the installation steps:
- Download the add-in here
- Rename the file extension to rar extension(.ppt to .rar)
- Extract the archive in your hard drive(ex: c:\Program Files\JustInTimeCode\)
- Copy the JustInTimeCode.AddIn file in your VS UserProfile directory (ex: user_name\MyDocuments\Visual Studio 2005\Addins or/and user_name\MyDocuments\Visual Studio 2008\Addins)
- Edit the copied file(addin file) and change the path in the “Assembly” Markup to refere the assembly located in your program file folder(in my example, c:\Program Files\JustInTimeCode\JustInTimeCode.dll)
- Launch VS2005 or VS2008
- A new entry exist in your tool menu called JustInTimeCode.
How to use it ? On your left, select the language and the references that you need to execute the code located on the text area(the references list in not exhaustive for the moment…) and click execute.