This is a quick post on how to get the Visual Studio 2010 vsClojure Extension manager up and running.
Step 0. Install The Extension
Fire up Visual Studio and go to the Tools menu. From there select the the ‘Extension Manager..’ option. When the Extension Manager click on the ‘Online Gallery’ bar on the left hand side of the window. Next enter vsClojure on the upper right corner of the window. Your window should look, something like this:
Now click on the download button and follow the directions. When the extension has been installed you will need to restart visual studio if it doesn’t do it for you.
Step 1. Create a Clojure Project
When Visual Studio has restarted close any solutions that you my have open and create a new Clojure project. When you do a File|New or Click on the New Project link from the startup page you should see Clojure listed under the ‘Installed Templates’ section on the left:
Select Clojure, name the project whatever you want and click the OK button. When the project is created you will have a project with a file named program.clj and a reference to the Clojure.dll file.
The first time I installed the extension and created a project the reference to the Clojure.dll was to a dll in a location that did not exist, “\1.2.0\Clojure.dll”. I did a quick search and found this post and it resolved my issue. I only had this problem the first time I installed the extension all subsequent installs have worked flawlessly.
Step 2 – Run the Project
Running a Clojure project is done just like running a C# project, by using your f5 key. When I do that I see:
If you receive an error when you try and run the project that starts with:
\1.2.0\Clojure.Compile core The system cannot find the path specified.
Follow these instructions and it should resolve your problem.
Not an earth shattering blog post by any means but if you are a .NET person looking to expand his/her horizons like myself this may be a way to get you exposed to Clojure While I go through my Clojure book(s) I will be working with both the ‘real’ Clojure (JVM based) and Clojure CLR (since I work in a .NET environment).
I have a feeling there will be more Clojure posts in the not too distant future.