September CTP and VSLab again

by cisterni 7. September 2008 12:12

As discussed in the previous post we are working to get VSLab back on the September CTP because the VS project system has completely changed. The core mechanism used to build Viewlets do not depend on this integration, they rather rely on deeper mechanisms available on Windows. The only feature the VSLab addin used of the project system was the ability to send F# code to the F# interactive toolwindow. In the former implementation F# interactive was essentially a user control, now the system provides support for F# as a VS package, thus the toolwindow has a completely different implementation.

Although I'm talking with the F# product team I continued to look for a hack to quickly update VSLab because many people have downloaded it and I know how hateful is when a tool ceases working. Yesterday evening mostly by accident I found the solution that I quickly describe here to those interested in sending F# code to fsi.exe from VS addins. The first step is to obtain a reference to DTE2 object available from the VS automation model and here referred as appObj.

To show the F# interactive toolwindow you can simply trigger the menu command as follows:

appObj.ExecuteCommand("View.F#Interactive", "") 

The toolwindow should be loaded before you can get a reference to it: 

let tw = (appObj.ToolWindows).GetToolWindow("F# Interactive") :?> Microsoft.FSharp.VisualStudio.Session.FsiToolWindow

It is interesting to have a look to the cast, the object you are getting from GetToolWindow is not a COM wrapper but the .NET object of a type defined in the FSharp.VS.FSI.dll assembly. Now after a little bit of use of Reflector I found that the method I was interested in was executeNoHistory@182 that is clearly an inner function object and cannot be invoked directly. While I'm waiting for a public method I resorted to reflection to invoke it:

let mi = (tw.GetType()).GetMethod("executeTextNoHistory@182")

mi.Invoke(tw, [| ("2+2;;" :> obj) |]) |> ignore

And this is the only true dependency VSLab has from the F# VS integration. Now I'm working to port project templates, but these are minor things. Hope to release the new version VSLab by wednesday.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Design | General

Comments

9/9/2008 1:28:05 AM

trackback

Trackback from Rick Minerich's Development Wonderland

How to quickly set up your own VSLab-based free Matlab/Mathematica replacement

Rick Minerich's Development Wonderland

10/29/2008 5:41:15 PM

KarlTi

Hi All,
before opening up a new issue, i want to ask teh community.

System: Vista Ultimate SP1, VS2008 SP1.

i just downloaded R2D2 and installed that.
(F# Sept' CTP & DX Managed RT already installed).

- Then i started VS2008,
- choose "New Project | VSLab",
- Went to "Add-In Manager" checked "VSlab", clicked OK and get an error:

------------------------------------------------------------
The Add-in 'VSLab' failed to load or caused an exception.

Would you like to remove this Add-in?
If you choose yes, the file it was loaded from,
'C:\Program Files\University of Pisa\VSLab\VSLab.AddIn', will be renamed.
Error Message: <Unknown Error>
Error number: 80131604

------------------------------------------------------------

What is going wrong here?

Thank you for your help,

- Karl

KarlTi de

7/6/2009 3:07:53 PM

Jack

Thanks a lot.. great post

Jack

7/6/2009 4:09:35 PM

Jack

Thanks a lot.. great post

Jack

7/15/2009 4:24:36 AM

Z60M

I found this post through Bing. This must be a popular blog.

Z60M us

8/27/2009 2:22:57 AM

ugg boot sale

Thanks for the great post.

ugg boot sale gb

9/19/2009 3:42:41 PM

Orlando personal injury lawyers

This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It’s the old what goes around comes around routine. Did you acquired lots of lin

Orlando personal injury lawyers us

9/23/2009 3:34:41 PM

best cam chat software

Wonderful article, thanks for putting this together! This is obviously one great post. Thanks for the valuable information and insights you have so provided here

best cam chat software us

9/24/2009 1:48:03 PM

California toxic torts attorney

Aw, this was a really quality post. In theory I'd like to write like this too - taking time and real effort to make a good article... but what can I say... I procrastinate alot and never seem to get something done.

California toxic torts attorney us

9/29/2009 11:29:33 PM

seo specialist

Great post - keep up the good work.

seo specialist gb

10/1/2009 1:23:29 AM

christmas gifts

Great post from a great site!

christmas gifts gb

10/5/2009 1:03:44 PM

anti snoring products

I loved the way you exlained things. Much better many here


Regards

Evans

anti snoring products us

10/5/2009 3:39:51 PM

Mesothelioma attorney Los Angeles

Dude.. I am not much into reading, but somehow I got to read lots of articles on your blog. Its amazing how interesting it is for me to visit you very often

Mesothelioma attorney Los Angeles us

10/5/2009 6:21:11 PM

Texas mesothelioma lawyers

Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

Texas mesothelioma lawyers us

10/7/2009 1:43:58 PM

buy aion online items

I digged this for more news from you.



Regards and respect
James

buy aion online items us

10/7/2009 1:44:17 PM

aion online powerlevel

I added your post to my college Report


Regards

Somia

aion online powerlevel us

10/8/2009 2:45:00 PM

Pinball games

Admiring the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up!

Pinball games us

10/9/2009 9:05:01 AM

buy aion online items

Wonder full writing skills you got mate.


Regards

katiz

buy aion online items us

10/9/2009 9:11:41 AM

bienes raices san miguel de allende

This is the best post on this topic i have ever read.


Regards


Collins

bienes raices san miguel de allende us

10/9/2009 9:18:49 AM

buy cheap aion online account

Now this is hghly recommeded post for me. I will surely email this to my friend.


Regards

paul

buy cheap aion online account us

10/10/2009 5:06:35 PM

no teletrack payday loans

Interesting information. May I add this blog to my linkexchange directory ?

no teletrack payday loans us

10/15/2009 9:10:29 AM

metal barn

Hi nice POst

Regards

yanik

metal barn us

10/15/2009 9:14:19 AM

Sonoma lodging

Hi nice site design


Regards

Mainn

Sonoma lodging us

10/15/2009 9:17:34 AM

san miguel bed and breakfast

This is the best post on this topic i have ever read.


Regards

Showoff

san miguel bed and breakfast us

10/15/2009 9:19:10 AM

mexico travel deals

I loved the way you exlained things. Much better many here


Regards

Lee

mexico travel deals us

10/15/2009 10:01:55 AM

furnished apartment toronto

Now this is hghly recommeded post for me. I will surely email this to my friend.


Regards

Roman

furnished apartment toronto us

10/19/2009 12:19:38 PM

Answering Services

I bookmarked your post will read this latter


Regards

Martinez

Answering Services us

10/19/2009 12:21:09 PM

Provo Ut Real Estate

I posted your blog to my facebook group


Regards

Lusty

Provo Ut Real Estate us

10/20/2009 9:22:54 AM

beat drug test

I digged this for more news from you.



Regards and respect
Arvin

beat drug test us

10/21/2009 10:13:17 AM

watch smallville  Online

Wonder full writing skills you got mate.


Regards
Lusty

watch smallville Online us

10/22/2009 7:41:32 AM

Discount Puma

<p><a href="http://www.opuma.com">Puma" rel="nofollow">http://www.opuma.com">Puma Shoes Online Store</a> have the <a href="http://www.opuma.com">best" rel="nofollow">http://www.opuma.com">best puma shoes</a> !discount <a href="http://www.opuma.com">puma" rel="nofollow">http://www.opuma.com">puma" rel="nofollow">http://www.opuma.com">puma" rel="nofollow">http://www.opuma.com">puma shoes on sale</a>! You can get <a href="http://www.opuma.com">cheap" rel="nofollow">http://www.opuma.com">cheap puma shoes</a> such as <a href="http://www.opuma.com/mens-puma-future-cat-gt-ferrari-c-294.html">puma" rel="nofollow">www.opuma.com/...-ferrari-c-294.html">puma future cat ferrari</a>! Top quality, best service, free shipping! Go get your <a href="http://www.opuma.com">puma" rel="nofollow">http://www.opuma.com">puma" rel="nofollow">http://www.opuma.com">puma" rel="nofollow">http://www.opuma.com">puma shoes</a>!</p>
http://www.opuma.com

Discount Puma cn

10/23/2009 11:18:39 AM

buy cheap aion accounts

Hi nice POst

Regards

gary

buy cheap aion accounts us

10/23/2009 12:32:37 PM

buy aion online gold

I bookmarked your post will read this latter


Regards

hops kalis

buy aion online gold us

10/25/2009 9:57:42 AM

Kerja Keras Adalah Energi Kita

Thanks for taking the time to sharing this with us.
interesting blog.

Kerja Keras Adalah Energi Kita us

11/13/2009 7:16:46 AM

faxless payday loans

I always wanted to write in my site something like that but I guess you'r faster Smile

faxless payday loans us

11/13/2009 9:42:59 PM

payday loans

Nice post . keep up the good work

payday loans us

11/18/2009 10:02:36 AM

payday loans

I just hope to have understood this the way it was meant

payday loans us

11/18/2009 9:53:08 PM

faxless payday loans

Hmmm interesting stuff

faxless payday loans us

11/22/2009 10:32:07 PM

cash loans

Yea nice Work !Laughing

cash loans us

11/25/2009 3:38:15 PM

addicting games

Hey webmaster, your site's design is fantastic and i like it. Your blog posts are amazing. Please keep them coming. Cheers..

addicting games

11/26/2009 6:13:40 AM

Web Hosting

This is a great blog posting and very helpful. I really appreciate the research you put into it

Web Hosting cn

11/27/2009 12:31:23 PM

game online

Can you pleasee provide more information on this subject?? By the way your site is so sool. Cheers!!!!

game online

11/28/2009 9:32:46 AM

Wanda Sullivan

Any Comments? Nice post.

Wanda Sullivan us

11/28/2009 8:45:36 PM

Eva Zacker

Generally I do not post on articles, but I would like to say that this blog really forced me to do so! Thanks, really nice blog.

Eva Zacker us

11/29/2009 7:24:40 AM

Kevin Brown

Hey there,

Kevin Brown us

11/29/2009 8:30:37 AM

personalized dolls

There are assorted views on this, but I enjoyed your point of view. Aiden Brockie ~ personalized dolls

personalized dolls

11/29/2009 12:24:50 PM

youdoodolls

Although there are lots of information on this on the internet, I specially like your version. Outstanding, Josephine Clarke @ pocketpeople

youdoodolls

11/30/2009 8:35:23 AM

reverse number lookup

It's great to see people freely expressing their opinion.Thanks for your insights.

reverse number lookup us

12/1/2009 2:05:07 PM

Nicolas Hausfrissel

Generally I do not post on blogs, but I would like to say that this blog really forced me to do so! Thanks, really nice blog.

Nicolas Hausfrissel us

12/2/2009 6:23:29 AM

Web Hosting

Great information. Thanks for the post.

Web Hosting cn

12/2/2009 4:17:22 PM

Andrew Pelt

Well, the article is really the freshest on this notable topic. I agree with your conclusions and will thirstily look forward to your approaching updates. Saying thanks will not just be adequate, for the tremendous clarity in your writing. I will instantly grab your rss feed to stay privy of any updates. Pleasant work and much success in your business efforts!

Andrew Pelt

12/3/2009 8:00:13 AM

relieve back pain, memory foam mattress

I usually don’t post in Blogs but your blog forced me to, amazing work.. beautiful …

relieve back pain, memory foam mattress

12/4/2009 4:09:00 AM

proxy sites

Keep up the good work bro.Your article is really great and I truly enjoyed reading it.Waiting for some more great articles like this from you in the coming days.

proxy sites us

12/7/2009 9:32:53 PM

Article Friendly

I just couldnt leave your website before saying that I really enjoyed the quality information you offer to your visitors... Will be back often to check up on new stuff you post!

Article Friendly gb

12/9/2009 3:56:17 PM

personalized-gifts

Really intriguing post. Emma Bremner ~ tinypocketpeple

personalized-gifts

12/10/2009 3:29:27 AM

cheap Gucci Shoes on sale

I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.

cheap Gucci Shoes on sale gb

12/14/2009 2:18:39 AM

Dynalite

You wouldn't believe this but I have spent all day researching for some articles about this. Thanks for this, it was a essential read and has helped me out to no end. Kind regards,

Dynalite au

12/14/2009 6:02:45 AM

abercrombie fitch sale

good!

abercrombie fitch sale

12/15/2009 6:37:08 AM

braun 360 8985

awesome

braun 360 8985 jp

12/15/2009 7:17:49 PM

payday loans

Interesting stuff you've got here

payday loans us

Powered by BlogEngine.NET 1.4.0.0
Theme by Mads Kristensen

VSLab blog

VSLab is a Visual Studio extension designed to support Visual Studio interaction from F# interactive. It is a Microsoft product developed at University of Pisa, by a team lead by Antonio Cisternino.

Resources

Recent comments

Comment RSS

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2008