This project is read-only.

Visual Studio 2010

Oct 8, 2010 at 6:03 PM

Is a Visual Studio 2010 compatible Spec# package in the works?

Why is there no discussion/issues of this (that I can find, anyway) yet?


Oct 9, 2010 at 4:07 AM

Such a mode would be nice to have, but we have no current plans (in RiSE at Microsoft Research) to provide one.  I don't know if it would be easy or if it would be a lot of work.


Mar 4, 2011 at 6:16 PM
Edited Mar 4, 2011 at 6:28 PM


As of recently, the source distribution compiles and registers/runs with Visual Studio 2010 (and not 2008 - but see instructions). As far as we know, it all works (but please let us know if not :)). The build process has also been changed to make it more robust - please check out the instructions for building the sources via the "Home" link, which have been updated.

If you just want the binaries, this should be reflected in the nightly build zip files which our build server produces, which you can find at Downloads->Other Downloads->Planned->Nighty Builds. But if you do try this, please wait a few days first, as we haven't properly tested yet that we are generating complete zip files with the new build process. You probably also want to double-check the messages from "codeplexbot" on the Source Code page, just to see that the results of the nightly build were reasonably ok :)

Hope that helps,


Mar 4, 2011 at 9:12 PM

That is fantastic!  I've been experimenting with CodeContracts but they just aren't the same as the potential I see in Spec#.  I love the clarity of Spec# and hope that the intellisense can be implemented (if it hasn't been already) to improve the learning curve for dabblers like myself.

If intellisense support is not yet present, what would it take to implement?  Can the community help?  Can we support the project monetarily?


Mar 7, 2011 at 10:42 AM
Edited Mar 7, 2011 at 4:38 PM

Hi - quick update. Unfortunately it seems we are not quite there yet. Although Spec# itself runs and compile fine in Visual Studio 2010, the Spec# project type doesn't yet show up in the menus when trying to create a new project. Not sure why this is - hopefully it will be easy to fix..... [EDIT: we think this is now fixed :) ]

Thanks for the encouraging message :) I don't know intellisense in much depth, but I think at least some of the features are already implemented (unless I misunderstand what it's all about). Is something specific missing?



Mar 7, 2011 at 8:37 PM


The problem that Alex mentioned should be fixed by now. Feel free to try out the most recent nightly build (under Downloads ==> Other Downloads ==> Planned ==> Nightly builds) and let us know if that works for you.

Best regards,


Apr 20, 2011 at 2:05 AM

Unfortunately, I am still having trouble creating new Spec# projects. I can create a new project, but all files are in a template folder. Editing them changes the templates, and new files get added to the template folder instead of the specified project folder. The best workaround seems to be to manually copy the files and edit the Project entry in the solution (.sln) file.

Apr 20, 2011 at 4:19 PM


I can't reproduce this behavior on my Spec# installation. Which version of Visual Studio and Windows are you using? Are you using the Spec# nightly builds?

Best regards,


Sep 24, 2012 at 8:08 PM

I have downloaded the 2011-10-03 version.  And I have Visual Studio 2010.  Now the .zip file contains two directories (Binaries and Templates) but no README.txt file, no setup.exe file, no install.msi file. Can someone please tell me how to install Spec# so that I can use it from VS-2010?  I'm using Win7.

(Just taking a wild stab, I tried running Register.cmd, but I got a bunch of error messages.

'regasm' is not recognized as an internal or external command, operable program or batch file.
'regasm' is not recognized as an internal or external command, operable program or batch file.
'regasm' is not recognized as an internal or external command, operable program or batch file. )

Sep 24, 2012 at 8:12 PM


Initial guess based on the regasm errors is that you need to run this from the Visual Studio Command Prompt.

Sep 24, 2012 at 9:10 PM

See the installation instructions here:

Sep 24, 2012 at 10:57 PM
Edited Sep 24, 2012 at 10:58 PM

Thanks.  That helped a lot.  I manually unblocked the 41 .dlls and then it worked. (I'm not sure it would have worked if I hadn't already added the directory containing regasm to my system path variable.) Three suggestions: Put the instructions in the .zip as a README.txt file; tell people what a visual studio command prompt is; tell the user to run that thing as an administrator.  An msi or setup.exe file would help the more windows challenged among us. (I wasn't always windows challenged, but each version of windows seems to make it harder to do any systems administrations tasks.)

Sep 25, 2012 at 3:11 AM

Now that I can create a Spec# project, I'm ready to start verifyin' stuff. I was a bit disappointed not to see a "Verify" menu as with VCC. I did manage to use sscBoogie to find some bugs from cmd.exe. Is there a way to use VS-2010 for verification, e.g. as part of the build process or as a separate step.

Sep 25, 2012 at 7:17 AM


The verifier can indeed be run from Visual Studio. If it isn't running, you might need to edit your solution Properties to check that the verifier is chosen to run there. You can also choose to run the verifier in the background (while editing) if you wish, and a few other options. You can find details in the Spec# tutorial, and there are also some introductory presentations on the Microsoft Research site (although they are less about running the tool, I think). Links are on the home page:

The issue with unblocking .dlls is a (frustrating) Windows security feature (for any downloaded .dlls), that I don't think it can be avoided. You can, however, make it less painful - it is possible to unblock the .zip file before unzipping it, and then all of the .dlls should be dealt with for free. So, hopefully that'll help next time.

Sep 25, 2012 at 7:28 PM

Thanks Alexander.  I am now verifying to my heart's content.

Sep 25, 2012 at 7:49 PM
You're welcome! I'm glad to hear it's working now. And thanks for the suggestions - a readme seems a good idea!

----- Reply message -----
From: "TheodoreNorvell" <[email removed]>
To: "Summers Alexander John" <[email removed]>
Subject: Visual Studio 2010 [specsharp:230181]
Date: Tue, Sep 25, 2012 20:28

From: TheodoreNorvell

Thanks Alexander. I am now verifying to my heart's content.

Read the full discussion online<>.

To add a post to this discussion, reply to this email ([email removed]<mailto:[email removed]?subject=[specsharp:230181]>)

To start a new discussion for this project, email [email removed]<mailto:[email removed]>

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe<> on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at