-
Notifications
You must be signed in to change notification settings - Fork 21
Command Line Reference
- RUNNER OPTIONS
- DISASSEMBLER OPTIONS
- INSTALLER OPTIONS
- LISTER OPTIONS
- UPDATER OPTIONS
- UNINSTALLER OPTIONS
Specify options to start with Prig.
run [-process] <string> [-help] [-arguments <string>]
Executes the specified *.exe
under the Prig. In the design of the unmanaged profiling API of .NET, it is also possible that by some environment variables is enabled. However, using this option makes it more easier.
You can filter the target process through environment variables if the process you want to apply Prig starts the child process of it. There are other ways to customize the behavior by some environment variables. For details, please see the below examples.
NOTE: Before you execute this option, you have to install the directory that target process exists as the scope of application of Prig in advance. See also Installer option.
Display help message.
Process to execute. If its path contains any spaces, you shall surround with "(double quotes).
This option is mandatory.
Program options for process. If the option is plural, you shall separate each option with space and surround with "(double quotes).
CMD C:\> prig run -process "C:\Program Files (x86)\NUnit 2.6.3\bin\nunit-console-x86.exe" -arguments "Test.program1.dll /domain=None"
This command executes the process designated by -process
option with the program options designated by -arguments
option.
PS C:\> 'prig run -process ".\packages\nunit.Runners.2.6.4\tools\nunit-console.exe" -arguments ".\ProfilersChainTest\bin\Debug\ProfilersChainTest.dll /domain=None /framework=v4.0"' | Out-File runtests.bat -Encoding default
PS C:\> $env:URASANDESU_PRIG_CURRENT_DIRECTORY = (Resolve-Path .\ProfilersChainTest\bin\Debug).Path
PS C:\> $env:URASANDESU_PRIG_TARGET_PROCESS_NAME = "nunit-agent"
PS C:\> & .\packages\OpenCover.4.5.3723\OpenCover.Console.exe -target:runtests.bat -filter:+[ProfilersChain]*
To measure code coverage, set working directory and the target process name to each environment variable and run tests with OpenCover. Note that this command has to be run in PowerShell.
CMD C:\> set URASANDESU_CPPANONYM_LOGGING_SEVERITY=0
CMD C:\> prig run -process "C:\Program Files (x86)\NUnit 2.6.3\bin\nunit-console.exe" -arguments "ClassLibrary1Test.dll /domain=None"
In this command, set logging severity DEBUG -- DEBUG:0, VERBOSE:1, INFO:2, WARNING:3 and ERROR:4. In default, it has been set to INFO -- and execute. Log file is output into the log directory of current directory.
Specify options to disassemble with Prig.
dasm -assembly <string> [-help]
dasm -assemblyfrom <string> [-help]
Disassembles the summary of specified assembly. The summary that is name, version, culture, public key token, processor architecture, full name, runtime version and location is returned as csv format. To format the result, using ConvertFrom-Csv
in PowerShell is convenience. This option returns all summaries of the assemblies that are qualifying condition in spite of the processor architecture and runtime version of parent process. Therefore, note that it has difference behavior from .NET default Gacutil.exe
tool or each type of System.Reflection
namespace.
Display help message.
Assembly Display Name to disassemble. If its name contains any spaces, you shall surround with "(double quotes).
Either this option or 'assemblyfrom' is mandatory.
Assembly Path to disassemble. If its path contains any spaces, you shall surround with "(double quotes).
Either this option or 'assembly' is mandatory.
CMD C:\> prig dasm -assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
This command disassembles the assembly designated by -assembly
option.
CMD C:\> prig dasm -assemblyfrom "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll"
This command disassembles the assembly designated by -assemblyfrom
option.
Specify options to install as a target package of Prig.
install [-package] <string> [-source] <string> [-help]
To apply Prig against a *.exe
, at first, you have to install the source as the package that is the scope of application of Prig. After only installing, you can execute any *.exe
with Prig(About executing, please see the help for Runner option). This effect is enabled until uninstalling the package. In default, the source of the test execution engine for Visual Studio("C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow") has already installed.
Display help message.
Package to install. Currently, there is no convention, but easy to understand and globaly identified naming isrecommended. It is better to apply the package name same as Chocolatey or NuGet.
This option is mandatory.
Package location to install. If its path contains any spaces, you shall surround with "(double quotes).
This option is mandatory.
CMD C:\> prig install NUnit -source "C:\Program Files (x86)\NUnit 2.6.3\bin"
This command installs NUnit as a target packages of Prig. NUnit is located at "C:\Program Files (x86)\NUnit 2.6.3\bin", so you have to specify the directory path.
Specify options to list the packages that Prig installed as targets.
list [[-filter] <string>] [-help] [-localonly]
Returns all installed packages, sources and additional delegates in list. The content is JSON format, so parsing by ConvertFrom-Json
in PowerShell is convenience.
Display help message.
Filter to list. Against the package name or source, it is used as regular expression pattern, and also the case is ignored. If this option is not specified, the command enumerates all installed packages.
Indicates the search location is local only. In currentversion, this option is ignored if specified.
CMD C:\> prig list NUnit -localonly
This command lists the packages that Prig installed as the method replacement targets. Packages are filtered by the name "NUnit".
PS C:\> prig list | ConvertFrom-Json | Format-Custom
This command lists all packages and parses the results. Format-Custom
can expand the hierarchical structure. Note that this command has to be run in PowerShell.
Specify options to update a package.
update [-package] <string> [[-delegate] <string>] [-help]
Updates the information that installed package has. Updatable information is below:
- delegate
For details, please see each description of sub option.
Display help message.
Specify the packages to update by semicolon delimited format. All
indicates applying same update option to all installed packages.
A configuration for update. This option adds the assembly that contains the Indirection Delegates. If you want to replace the method that has three or more out/ref parameters, you can add available delegates by using this. This option can only be specified when specifying -package
option to All
. If its path contains any spaces, you shall surround with "(double quotes). Also, if you want to use multiple assemblies, specify them by semicolon delimited format.
NOTE: You have to specify at least one configuration.
CMD C:\> prig update All -delegate "C:\Users\User\AdditionalDelegates\ThreeOrMoreRefOutDelegates\bin\Release\ThreeOrMoreRefOutDelegates.dll"
This command updates all package to use additional delegates for a method replacement. Also you have to specify the -delegate
option because the delegates is contained in ThreeOrMoreRefOutDelegates.dll
Specify options to uninstall a package from Prig.
uninstall [-package] <string> [-help]
Uninstalls the installed package.
Display help message.
Package to uninstall. You have to specify the package name that is same as when installed. However, the case is insensitive. All
indicates uninstalling all packages.
This option is mandatory.
CMD C:\> prig uninstall NUnit
This command uninstalls NUnit from Prig.
-
Home
- QUICK TOUR [SRC]
- FEATURES
- CHEAT SHEET
- PACKAGE MANAGER CONSOLE POWERSHELL REFERENCE
- COMMAND LINE REFERENCE
- APPVEYOR SUPPORT
- MIGRATION
- From Microsoft Research Moles [SRC]
- From Microsoft Fakes [SRC]
- From Telerik JustMock [SRC]
- From Typemock Isolator [SRC]