Some kudos and real-world experience regarding StudioShell

Mar 27, 2014 at 4:54 PM
This may be a rare thing to do, but I wanted to take a moment and extend some gratitude and respect to beefarino, the developer of StudioShell. Here are some things that I have recently experienced with StudioShell, which have convinced me of its worth:
  • Reported an issue and a new release came out within 24 hours fixing my specific issue -- While I'm sure you can't expect this all the time, I'm very impressed the dev is so on top of things
  • Updated all my TypeScript files in the solution to use the TypescriptCompile build action using one line of code:
ls dte:/Solution/Projects/Client.Web/Scripts/app/pages/*.ts -r | ForEach-Object {Set-ItemProperty -Path ($_.PsPath + '/ItemProperties/BuildAction') -Name Value -Value 4}
(4 is the constant value of the TypescriptCompile build action)
  • Saved myself some money -- I wanted to have my T4 templates compile AFTER every build, and after trying to do it with MSBUILD (fail), reviewing several non-free add-ins for their abilities (fail), and finally attempting to build my own Visual Studio add-in (fail), I was able to do it using StudioShell's ability to load modules when the solution is loaded:
The following finally did the trick (after I installed the 1.6.3 release), when placed in my solution directory and given the same base-name as my solution file and an extension of .psm1 ("solutionname.psm1")
function Invoke-TransformAll {
    Write-Host "Transforming templates";
    $dte.ExecuteCommand('TextTransformation.TransformAllTemplates')
    Write-Host "Template transformation complete";
}

Export-ModuleMember -function Invoke-TransformAll
Register-ObjectEvent $buildEvents OnBuildDone -Action { invoke-TransformAll; }

Write-Host "Solution module loaded";
Putting StudioShell into autoload mode provided the means to have this auto-build feature work all the time without me even having to remember to start it up.

Overall, I am more impressed with StudioShell than I have been with anything related to Visual Studio in quite a long time. Perhaps it's my experience with Perl from years ago, but the power available through the combination of Powershell's syntax, the VS DTE automation API's, and StudioShell's binding everything together is simply awe-inspiring.

Well done.
Coordinator
Mar 28, 2014 at 12:12 PM
Thank you for sharing these experiences, and for the kudos. And moreover, thank you for reporting the issues in the first place!