salesnas.blogg.se

Visual studio package manager console
Visual studio package manager console








visual studio package manager console
  1. VISUAL STUDIO PACKAGE MANAGER CONSOLE HOW TO
  2. VISUAL STUDIO PACKAGE MANAGER CONSOLE CODE

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.

  • Query the doc object of the relevant element and extract the value.
  • Get the doc, which is the DOM of the web page.
  • Sleep while busy (should probably add a max loop counter).
  • The code is pretty straight forward, but here is a short description of the Get-ClassName function:

    visual studio 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.

    visual studio package manager console

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










    Visual studio package manager console