Saturday, February 4, 2012

vsClojure - .cljproj is not supported by this version.

For a .NET developer, when starting out with Clojure it seems obvious to try to get it to work in Visual Studio rather than struggle with Emacs and Slime. So you visit the the Extension Manager, search for Clojure, and instal the extension.

If you then create a New Project, and select a Clojure project, this message can appear:

'<somestuff>\VisualStudio\10.0\Extensions\vsClojure\2.0.0\Templates\Projects\Clojure\Clojure.cljproj' cannot be opened because its project type (.cljproj) is not supported by this version of the application.
To open it, please use a version that supports this type of project.

So it seems that Visual Studio didn't know about the project type, the .cljproj. 

First attempt to fix vsClojure Failed
I tried something that was suggested in a posting somewhere.

Reset the Skip Package flags. 
This didn't work for me, but may work for you.
You locate Devenv.exe and run in the command line.
Devenv can usually be found at: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
run Devenv.exe /ResetSkipPkgs

The Workaround
I noticed that the DLL was at:
but the problem wasn't the loading of the DLL, it was the loading of the project with a name. cljpro.

So I thought of starting the REPL to see if that did something. Probably written in C# so it might register something somewhere.

So I ran:

This was found in the same folder as the Clojure dll.
I then tried to create the Clojure project in Visual Studio and it worked. 

No comments:

Post a Comment