Monday, 1 October 2012

VisualStudio C# REPL - O2 Platform

Checkout the new O2 VisualStudio Extension published at VisualStudio Gallery: VisualStudio C# REPL - O2 Platform

As you can see by the title and menu items, the focus of this extension is on the C# REPL environment that allows the real time coding of VisualStudio :)

Please give it a test drive. If you find any issues drop me a line or add them here.

Also checkout this reddit thread on this topic for more comments and code samples

Description from VisualStudio Gallery page (Copy and Paste)

This extension provides a C# REPL Scripting environment (based on O2 Platforms's FluentSharp APIs).

In addition to being able to write and execute quick C# snippets (in a REPL environment), you can program VisualStudio IDE in real time! 

Here is a code sample that shows how to use FluentSharp's VisualStudio API to manipulate multiple parts of the VisualStudio IDE:

FluentSharp is an API that dramatically simplifies the use of .NET Framework APIs. It makes extensive use of .NET ExtensionMethods and it reduces the amount of code required (while making it more readable).

To use FluentSharp in your VisualStudio project you can use NuGet:

For more information and script examples see:


1) Menu created by installer:
2) C# REPL environment with FluentSharp VisualStudio API
3) Executing the Sample Script provided (2nd link from the REPL menu)
4) What VisualStudio looks like after executing the sample script


MeowMeow said...

Any support for VS 2012? Since the theme editor came out, I've switched over entirely from VS 2010.

Dinis Cruz said...

That is a good question, I haven't tried it in VS 2012, but it should be easy to port.

It is possible to develop vs 2012 extensions with vs 2010? (I haven't upgrade)

Dinis Cruz said...

Hi, can you try now in VS2012?

I just pushed a new version with the compatibility set to allow VS2010 and VS2012 installs

MeowMeow said...

I tried the installing the new package from the visual studio gallery, but it gave me the following error message:

"Could not load file or assembly '"Microsoft.VisualStudio.CommonIDE, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a30' or one of its dependencies. The system cannot find the file specified."

The install log shows it as Version 4.4.7, and that it failed directly after it found VS 2010 Professional. It appears to have been looking in "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE", and I can confirm that the file is not present there.

Now when starting VS 2012, I get "The 'Windows Forms Designer Package' package did not load correctly." And points me to the activity log for configuration changes. Followed by multiple "The 'Visual Studio Component Model Host Package' package did not laod correctly" messages. It starts, but it seems odd. I'm delving more into it, will let you know what I find out.

Dinis Cruz said...

Can you try something: start VisualStudio with the SHIFT key pressed.

If the O2 dlls are being loaded a LogViewer should pop-up , but there might be an issue with that missing DLL.

I need to get VS2012 installed somewhere, but if you want you could run the extension from the Source.

The github repository is and here is the solution file to load: