

Now all we need to do is to put both the PowerShell files in a tools folder and in the same folder as where we have tools folder we run the command nuget spec ClassNamer. When the above script is run it will import the module ClassNamer.psm1.
VISUAL STUDIO PACKAGE MANAGER CONSOLE CODE
The code looks like: param($installPath, $toolsPath, $package, $project) I basically copied the code from Phil Haack's blog post about the same topic. The next part is to write the script that will get the module imported, init.ps1, to the Package Manager Console.

There is two part of this code, the function definition and the export command which I guess define which functions that are public from this module. $answer = $doc.getElementByID("classname") The code for the module ClassNamer.psm1 look like: function Get-ClassName The first part is to write the actual module that will do all the work. Since this is my first PowerShell ever the code might not be the best code ever, but that is not the point. The post consist of two parts the first part shows you the code we will run in order to get the class name and initialize the scripts. More precisely I will extend the Console with the feature of asking to generate a class name for me since sometimes when I develop I run out of imagination and at those points it can be good to get generated class names like CryptographicUserLogger :).
VISUAL STUDIO PACKAGE MANAGER CONSOLE HOW TO
I will in this post, most example code, show you how to extend the Package Manager Console in Visual Studio with a NuGet package. If you read my previous post about how to create a NuGet package this is a follow up on that post.

Menu Extending the NuGet Package Manager Console 25 October 2012 on nuget
