Giter Site home page Giter Site logo

pmccommand's Introduction

PMCCommand

Allows commands to be sent to the VisualStudio package management console from the command line.

Setup

For this to work, you need to make sure that you have VisualStudio installed on the system. The version assumed is VS2015, but it should work for any VisualStudio version.

Example Usage

Make sure that the full project path is used. The command interface for DTE does not like relative paths.

PMCCommand 1.0.0

  -n, --nugetcommand    Required. The NuGet package management console command
                        to execute.

  -p, --project         Required. The full path of the .csproj or .sln file in
                        which to run the command.

  -v, --vsversion       (Default: 15.0) The VisualStudio version for DTE
                        interaction.

  -d, --debug           (Default: False) Print debuging output to the console.

  --help                Display this help screen.


Example: 
PMCCommand.exe --nugetcommand "Update-Package Newtonsoft.Json" --project "C:\Foo\Bar\foobar.csproj"

Example error output

Errors experienced in the nuget command line interface are printed out after running.

Update-Package : 'blah' was not installed in any project. Update failed.
At line:1 char:1
+ Update-Package blah; $error > C:\Windows\TEMP\tmpF776.tmp ; "False" > C:\Windows 
...
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Update-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement 
   .PowerShellCmdlets.UpdatePackageCommand
 

The additional commands after the Update-Package blah command are to ensure that errors are captured, and that execution of the main STAThread does not continue until AFTER the nuget command is completed.

Running with Jenkins or someother build server

Make sure that the user that will be doing the action has the appropriate rights. This StackOverflow Answer addresses the specific problem. Instead of applying the changes to Microsoft Word Document set it for Microsoft Visual Studio <version>.

If you continue to have issues, it MAY be due to the executable being compiled for Any CPU. Compile for x86 and try again.

Additional Resources if you are interested

pmccommand's People

Contributors

augu8346 avatar benwtrent avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.