Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automating Visual Studio 2012 with Powershell, doing it wrong?

I was exploring Visual Studio automation with powershell. At least from what I can find, it seems that powershell is the thing to use to automate visual studio.

$dte = New-Object -ComObject VisualStudio.DTE

The above line, I see creates a new Visual Studio 10 denenv.exe in process monitor, and then also a warning is thrown about not being able to create the object.

WARNING: Creating an instance of the COM component with CLSID {656D8328-93F5-41A7-A48C-B42858161F25} from the IClassFactory failed due to the following error: 80010001.

It seems like maybe since there is a delay, that may be there is a timeout. This CLSID is for the visual studio 10 DTE, and it appears there is not DTE for 2012.

Can I create a Visual Studio 2012 instance at all? Or does this matter? Or am I approaching this all wrong?

All I really want to do is create a solution, and then traverse a directory to add all of the .csproj files I can find. I have repository of about 70 odd projects that I'd like to put in a mega solution. This powershell solution, seems like it may not be the best way anymore.

Definitely could have had this done now if I'd just done this manually, but I thought this was an interesting exploratory exercise but it's just becoming a headache now.

like image 307
David Avatar asked Apr 17 '26 21:04

David


1 Answers

I think this AddIn should suit my need: Solution Maker

like image 175
David Avatar answered Apr 20 '26 16:04

David



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!