# Automating VS

**URL:** <https://www.ruby-forum.com/t/automating-vs/159558>\
**Category:** IronRuby\
**Created:** [February 5, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/automating-vs/159558 "2009-02-05T20:08:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![barby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@barby](https://www.ruby-forum.com/u/barby)\
**Post date:** [February 5, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/automating-vs/159558/1 "2009-02-05T20:08:00Z")

</div>

Hi

A while ago I remeber seeing a screencast where John L. shows how to  
use  
ironruby to automate visual studio.  
I can’t find the screencast anymore but I would be interested to know  
which  
API was used. Was that just using EnvDTE ?

I’m asking because at work we are using GAT to automate visual studio  
and to  
create a kind of software factory (without the visual designers)  
When it comes to developing with GAT I think most of us will agree that  
there are more pleasant ways to develop and debug your work.

So I may get the chance to get them to use IronRuby for some of that  
stuff  
as long as we can hide from the use case/LOB developers.  
Using GAT for us is a hazard to make our sprints. Most of our story  
points  
for example go into GAT development and debugging, granted that we do  
make  
it do some crazy stuff too.

Thanks

---

<div class="post-metadata">

**Author:** ![barby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@barby](https://www.ruby-forum.com/u/barby)\
**Post date:** [February 5, 2009, 9:28pm UTC](https://www.ruby-forum.com/t/automating-vs/159558/2 "2009-02-05T21:28:37Z")

</div>

Ivan,

The RubyConf2008 talk? It’s on confreaks:  
[http://rubyconf2008.confreaks.com/ironruby.html](http://rubyconf2008.confreaks.com/ironruby.html)

I’m pretty sure it’s using the new managed API for VS2010… EnvDTE is  
painfull…

---

<div class="post-metadata">

**Author:** ![barby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@barby](https://www.ruby-forum.com/u/barby)\
**Post date:** [February 5, 2009, 9:31pm UTC](https://www.ruby-forum.com/t/automating-vs/159558/3 "2009-02-05T21:31:33Z")

</div>

D’oh, it’s not RubyConf it’s PDC:  
[http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV/TL44.wmv](http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV/TL44.wmv) check around the  
35minute mark.

On Thu, Feb 5, 2009 at 2:11 PM, Michael L.  
\<removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![barby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@barby](https://www.ruby-forum.com/u/barby)\
**Post date:** [February 7, 2009, 4:10am UTC](https://www.ruby-forum.com/t/automating-vs/159558/4 "2009-02-07T04:10:21Z")

</div>

Na, that was definitely VS 2008. We just had our VS ninja Oleg write a  
VS extension that hosts the DLR, so Ruby code could control VS. But  
beats me if I know where that VS extension is.

~js

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Michael  
Letterle  
Sent: Thursday, February 05, 2009 11:12 AM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] automating VS

Ivan,

The RubyConf2008 talk? It’s on  
confreaks:[http://rubyconf2008.confreaks.com/ironruby.html](http://rubyconf2008.confreaks.com/ironruby.html)

I’m pretty sure it’s using the new managed API for VS2010… EnvDTE is  
painfull…  
On Thu, Feb 5, 2009 at 1:30 PM, Ivan Porto C.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
Hi

A while ago I remeber seeing a screencast where John L. shows how to  
use ironruby to automate visual studio.  
I can’t find the screencast anymore but I would be interested to know  
which API was used. Was that just using EnvDTE ?

I’m asking because at work we are using GAT to automate visual studio  
and to create a kind of software factory (without the visual designers)  
When it comes to developing with GAT I think most of us will agree that  
there are more pleasant ways to develop and debug your work.

So I may get the chance to get them to use IronRuby for some of that  
stuff as long as we can hide from the use case/LOB developers.  
Using GAT for us is a hazard to make our sprints. Most of our story  
points for example go into GAT development and debugging, granted that  
we do make it do some crazy stuff too.

Thanks

---

<div class="post-metadata">

**Author:** ![barby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@barby](https://www.ruby-forum.com/u/barby)\
**Post date:** [February 7, 2009, 7:29am UTC](https://www.ruby-forum.com/t/automating-vs/159558/5 "2009-02-07T07:29:05Z")

</div>

Yes, that was VS 2008. Unfortunately the demo contained some unreleased  
features so I couldn’t publish the code. But the idea was simple - an  
addin-manager (C#) that hosts DLR and allows ruby scripts to create and  
handle menu commands:

require ‘rubyaddin’

class TestRunnerAddin \< RubyAddin  
set\_command\_label “Run Test”  
set\_command\_tooltip “Run selected test”  
set\_command\_menu “Code Window”

```
def self.execute()
    ctx = get_vs_context()
    file = ctx.ActiveDocument
    ...
end

```

end

But then to make something useful you still need to cope with EnvDTE  
(which was provided as part of context).

–  
Oleg

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Jimmy  
Schementi  
Sent: Friday, February 06, 2009 6:23 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] automating VS

Na, that was definitely VS 2008. We just had our VS ninja Oleg write a  
VS extension that hosts the DLR, so Ruby code could control VS. But  
beats me if I know where that VS extension is.

~js

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Michael  
Letterle  
Sent: Thursday, February 05, 2009 11:12 AM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] automating VS

Ivan,

The RubyConf2008 talk? It’s on  
confreaks:[http://rubyconf2008.confreaks.com/ironruby.html](http://rubyconf2008.confreaks.com/ironruby.html)

I’m pretty sure it’s using the new managed API for VS2010… EnvDTE is  
painfull…  
On Thu, Feb 5, 2009 at 1:30 PM, Ivan Porto C.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
Hi

A while ago I remeber seeing a screencast where John L. shows how to  
use ironruby to automate visual studio.  
I can’t find the screencast anymore but I would be interested to know  
which API was used. Was that just using EnvDTE ?

I’m asking because at work we are using GAT to automate visual studio  
and to create a kind of software factory (without the visual designers)  
When it comes to developing with GAT I think most of us will agree that  
there are more pleasant ways to develop and debug your work.

So I may get the chance to get them to use IronRuby for some of that  
stuff as long as we can hide from the use case/LOB developers.  
Using GAT for us is a hazard to make our sprints. Most of our story  
points for example go into GAT development and debugging, granted that  
we do make it do some crazy stuff too.

Thanks

---

<div class="post-metadata">

**Author:** ![barby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@barby](https://www.ruby-forum.com/u/barby)\
**Post date:** [February 7, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/automating-vs/159558/6 "2009-02-07T14:33:08Z")

</div>

I’m pretty sure there’s a demo out there somewhere with John using 2010  
and  
interacting with the new xaml code editor…
