Browse Source

Show help in package management console.

pull/15/head
Matt Ward 15 years ago
parent
commit
612f075644
  1. 8
      src/AddIns/Misc/PackageManagement/Project/PackageManagement.csproj
  2. 25
      src/AddIns/Misc/PackageManagement/Project/Src/Scripting/PackageManagementConsoleHost.cs
  3. 685
      src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Cmdlets.dll-Help.xml
  4. 39
      src/AddIns/Misc/PackageManagement/RequiredLibraries/about_NuGet.Cmdlets.help.txt
  5. 7
      src/AddIns/Misc/PackageManagement/Test/Src/Helpers/TestablePackageManagementConsoleHost.cs
  6. 26
      src/AddIns/Misc/PackageManagement/Test/Src/Scripting/PackageManagementConsoleHostTests.cs

8
src/AddIns/Misc/PackageManagement/Project/PackageManagement.csproj

@ -227,10 +227,18 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\RequiredLibraries\about_NuGet.Cmdlets.help.txt">
<Link>about_NuGet.Cmdlets.help.txt</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\RequiredLibraries\LICENSE.txt"> <None Include="..\RequiredLibraries\LICENSE.txt">
<Link>NuGet-LICENSE.txt</Link> <Link>NuGet-LICENSE.txt</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="..\RequiredLibraries\NuGet.Cmdlets.dll-Help.xml">
<Link>PackageManagement.Cmdlets.dll-Help.xml</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="PackageManagement.addin"> <None Include="PackageManagement.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>

25
src/AddIns/Misc/PackageManagement/Project/Src/Scripting/PackageManagementConsoleHost.cs

@ -103,12 +103,14 @@ namespace ICSharpCode.PackageManagement.Scripting
void WriteInfoBeforeFirstPrompt() void WriteInfoBeforeFirstPrompt()
{ {
WriteNuGetVersionInfo(); WriteNuGetVersionInfo();
WriteHelpInfo();
WriteLine();
} }
void WriteNuGetVersionInfo() void WriteNuGetVersionInfo()
{ {
string versionInfo = String.Format("NuGet {0}", GetNuGetVersion()); string versionInfo = String.Format("NuGet {0}", GetNuGetVersion());
ScriptingConsole.WriteLine(versionInfo, ScriptingStyle.Out); WriteLine(versionInfo);
} }
protected virtual Version GetNuGetVersion() protected virtual Version GetNuGetVersion()
@ -120,6 +122,27 @@ namespace ICSharpCode.PackageManagement.Scripting
return nuGetVersion; return nuGetVersion;
} }
void WriteLine(string message)
{
ScriptingConsole.WriteLine(message, ScriptingStyle.Out);
}
void WriteLine()
{
WriteLine(String.Empty);
}
void WriteHelpInfo()
{
string helpInfo = GetHelpInfo();
WriteLine(helpInfo);
}
protected virtual string GetHelpInfo()
{
return "Type 'get-help NuGet' for more information.";
}
void WritePrompt() void WritePrompt()
{ {
ScriptingConsole.Write(prompt, ScriptingStyle.Prompt); ScriptingConsole.Write(prompt, ScriptingStyle.Prompt);

685
src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Cmdlets.dll-Help.xml

@ -0,0 +1,685 @@
<?xml version="1.0" encoding="utf-8" ?>
<helpItems schema="maml">
<!-- Install-Package command -->
<command:command
xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<command:details>
<command:name>
Install-Package
</command:name>
<maml:description>
<maml:para>Installs a package.</maml:para>
</maml:description>
<maml:copyright>
<maml:para></maml:para>
</maml:copyright>
<command:verb>Install</command:verb>
<command:noun>Package</command:noun>
<dev:version></dev:version>
</command:details>
<maml:description>
<maml:para>Installs a package and its dependencies into the project.</maml:para>
</maml:description>
<!-- Cmdlet syntax section-->
<command:syntax>
<command:syntaxItem>
<maml:name>Install-Package</maml:name>
<command:parameter required="true" position="1">
<maml:name>Id</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>IgnoreDependencies</maml:name>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>ProjectName</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Version</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Source</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<!-- Cmdlet parameter section -->
<command:parameters>
<command:parameter required="true" position="1">
<maml:name>Id</maml:name>
<maml:description>
<maml:para>Specifies the package ID of the package to install.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
<dev:type>
<maml:name></maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>IgnoreDependencies</maml:name>
<maml:description>
<maml:para>Installs only this package and not its dependencies.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>ProjectName</maml:name>
<maml:description>
<maml:para>Specifies the project to install the package into. If ommitted, the active project is chosen.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Source</maml:name>
<maml:description>
<maml:para>Specifies the URL or directory path for the package source containing the package to install. If omitted, looks in the currently selected package source to find the corresponding package URL.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Version</maml:name>
<maml:description>
<maml:para>Specifies the version of the package to install. If omitted, defaults to the latest version.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
</command:parameters>
<!-- Link section -->
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online version:</maml:linkText>
<maml:uri>http://nuget.codeplex.com/</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Install-Package</maml:linkText>
<maml:uri/>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<!-- Get-Package command -->
<command:command
xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<command:details>
<command:name>
Get-Package
</command:name>
<maml:description>
<maml:para>Gets the set of packages available from the package source. Use the -ListAvailable flag to list packages available from the package source.</maml:para>
</maml:description>
<maml:copyright>
<maml:para></maml:para>
</maml:copyright>
<command:verb>Get</command:verb>
<command:noun>Package</command:noun>
<dev:version></dev:version>
</command:details>
<maml:description>
<maml:para>Gets the set of packages available from the package source. Defaults to only showing the list of installed packages. Use the -ListAvailable flag to list packages available from the package source.</maml:para>
</maml:description>
<!-- Cmdlet syntax section-->
<command:syntax>
<command:syntaxItem>
<maml:name>Get-Package</maml:name>
<command:parameter required="true" position="named">
<maml:name>Source</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>ListAvailable</maml:name>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Updates</maml:name>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Recent</maml:name>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Filter</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>First</maml:name>
<command:parameterValue required="true">int</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Skip</maml:name>
<command:parameterValue required="true">int</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<!-- Cmdlet parameter section -->
<command:parameters>
<command:parameter required="false" position="named">
<maml:name>Source</maml:name>
<maml:description>
<maml:para>Specifies the URL or directory path for the package source containing the package to install. If omitted, looks in the currently selected package source to find the corresponding package URL.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>ListAvailable</maml:name>
<maml:description>
<maml:para>Gets packages available from the online package source.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Recent</maml:name>
<maml:description>
<maml:para>Gets the list of recently installed packages.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Updates</maml:name>
<maml:description>
<maml:para>Gets packages that have an update available from the package source.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Filter</maml:name>
<maml:description>
<maml:para>Specifies a filter string used to narrow down the list of packages returned. The filter is searched for in the package Id and in the description.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>First</maml:name>
<maml:description>
<maml:para>Specifies the number of packages to return from the beginning of the list.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Skip</maml:name>
<maml:description>
<maml:para>Skips (does not return) the specified number of packages, counting from the beginning of the list.</maml:para>
</maml:description>
</command:parameter>
</command:parameters>
<!-- Link section -->
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online version:</maml:linkText>
<maml:uri>http://nuget.codeplex.com</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-Package</maml:linkText>
<maml:uri/>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<!-- Uninstall-Package command -->
<command:command
xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<command:details>
<command:name>
Uninstall-Package
</command:name>
<maml:description>
<maml:para>Uninstalls a package.</maml:para>
</maml:description>
<maml:copyright>
<maml:para></maml:para>
</maml:copyright>
<command:verb>Uninstall</command:verb>
<command:noun>Package</command:noun>
<dev:version></dev:version>
</command:details>
<maml:description>
<maml:para>Uninstalls a package. If other packages depend on this package, the command will fail unless the –Force option is specified.</maml:para>
</maml:description>
<!-- Cmdlet syntax section-->
<command:syntax>
<command:syntaxItem>
<maml:name>Uninstall-Package</maml:name>
<command:parameter required="true" position="1">
<maml:name>Id</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>RemoveDependencies</maml:name>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Force</maml:name>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Version</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<!-- Cmdlet parameter section -->
<command:parameters>
<command:parameter required="true" position="1">
<maml:name>Id</maml:name>
<maml:description>
<maml:para>Specifies the package ID of the package to uninstall.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
<dev:type>
<maml:name></maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>RemoveDependencies</maml:name>
<maml:description>
<maml:para>Uninstalls the package and its unused dependencies.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>ProjectName</maml:name>
<maml:description>
<maml:para>Specifies the project to uninstall the package from. If ommitted, the default project is chosen.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Version</maml:name>
<maml:description>
<maml:para>The version of the package to uninstall. If omitted, defaults to the latest version.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
</command:parameters>
<!-- Link section -->
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online version:</maml:linkText>
<maml:uri>http://nuget.codeplex.com</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Uninstall-Package</maml:linkText>
<maml:uri/>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<!-- Update-Package command -->
<command:command
xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<command:details>
<command:name>
Update-Package
</command:name>
<maml:description>
<maml:para>Updates a package.</maml:para>
</maml:description>
<maml:copyright>
<maml:para></maml:para>
</maml:copyright>
<command:verb>Update</command:verb>
<command:noun>Package</command:noun>
<dev:version></dev:version>
</command:details>
<maml:description>
<maml:para>Updates a package and its dependencies to a newer version.</maml:para>
</maml:description>
<!-- Cmdlet syntax section-->
<command:syntax>
<command:syntaxItem>
<maml:name>Update-Package</maml:name>
<command:parameter required="true" position="1">
<maml:name>Id</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>IgnoreDependencies</maml:name>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>ProjectName</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Version</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Source</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<!-- Cmdlet parameter section -->
<command:parameters>
<command:parameter required="true" position="1">
<maml:name>Id</maml:name>
<maml:description>
<maml:para>Specifies the package ID of the package to update.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
<dev:type>
<maml:name></maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>IgnoreDependencies</maml:name>
<maml:description>
<maml:para>Updates all of the package’s dependencies to the latest version. False by default.</maml:para>
</maml:description>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>ProjectName</maml:name>
<maml:description>
<maml:para>Specifies the project containing the project to update. If ommitted, the default project is chosen.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Source</maml:name>
<maml:description>
<maml:para>Specifies the URL or directory path for the package source containing the package to install. If omitted, looks in the currently selected package source to find the corresponding package URL.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>Version</maml:name>
<maml:description>
<maml:para>Specifies the version that the package will be upgraded to. If omitted, defaults to the latest version.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
</command:parameters>
<!-- Link section -->
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online version:</maml:linkText>
<maml:uri>http://nuget.codeplex.com/</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Update-Package</maml:linkText>
<maml:uri/>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<!-- New-Package command -->
<command:command
xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<command:details>
<command:name>
New-Package
</command:name>
<maml:description>
<maml:para>Creates a package.</maml:para>
</maml:description>
<maml:copyright>
<maml:para></maml:para>
</maml:copyright>
<command:verb>New</command:verb>
<command:noun>Package</command:noun>
<dev:version></dev:version>
</command:details>
<maml:description>
<maml:para>Creates a new package when supplied with a Nuspec package specification file.</maml:para>
</maml:description>
<!-- Cmdlet syntax section-->
<command:syntax>
<command:syntaxItem>
<maml:name>New-Package</maml:name>
<command:parameter required="false" position="0">
<maml:name>ProjectName</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="true" position="1">
<maml:name>SpecFileName</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="true" position="2">
<maml:name>TargetFile </maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>NoClobber</maml:name>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<!-- Cmdlet parameter section -->
<command:parameters>
<command:parameter required="false" position="0">
<maml:name>ProjectName</maml:name>
<maml:description>
<maml:para>Specifies the project containing the NuSpec file to use when creating the package. If omitted, the current project selected in the console is used.</maml:para>
</maml:description>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="true" position="1">
<maml:name>SpecFileName</maml:name>
<maml:description>
<maml:para>Specifies the NuSpec file used to create the package. If omitted, the NuSpec file within the current project is used if there is only one such file.</maml:para>
</maml:description>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="true" position="2">
<maml:name>TargetFile </maml:name>
<maml:description>
<maml:para>Specifes the full name of the output NuPkg file.</maml:para>
</maml:description>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>NoClobber</maml:name>
<maml:description>
<maml:para>If specified, the target file is not overwritten.</maml:para>
</maml:description>
</command:parameter>
</command:parameters>
<!-- Link section -->
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online version:</maml:linkText>
<maml:uri>http://nuget.codeplex.com</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>New-Package</maml:linkText>
<maml:uri/>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<!-- Add-BindingRedirect command -->
<command:command
xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<command:details>
<command:name>
Add-BindingRedirect
</command:name>
<maml:description>
<maml:para>Adds binding redirects to the config file.</maml:para>
</maml:description>
<maml:copyright>
<maml:para></maml:para>
</maml:copyright>
<command:verb>Add</command:verb>
<command:noun>BindingRedirect</command:noun>
<dev:version></dev:version>
</command:details>
<maml:description>
<maml:para>Examines all assemblies within the output path for a project and adds binding redirects to the application (or web) configuration file where necessary.</maml:para>
</maml:description>
<!-- Cmdlet syntax section-->
<command:syntax>
<command:syntaxItem>
<maml:name>Add-BindingRedirect</maml:name>
<command:parameter required="true" position="1">
<maml:name>ProjectName</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<!-- Cmdlet parameter section -->
<command:parameters>
<command:parameter required="true" position="1">
<maml:name>ProjectName</maml:name>
<maml:description>
<maml:para>Specifies the project to analyze and add binding redirects to.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
</command:parameters>
<!-- Link section -->
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online version:</maml:linkText>
<maml:uri>http://nuget.codeplex.com</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Add-BindingRedirect</maml:linkText>
<maml:uri/>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<!-- Get-Project -->
<command:command
xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<command:details>
<command:name>
Get-Project
</command:name>
<maml:description>
<maml:para>Gets the active or specified project.</maml:para>
</maml:description>
<maml:copyright>
<maml:para></maml:para>
</maml:copyright>
<command:verb>Get</command:verb>
<command:noun>Project</command:noun>
<dev:version></dev:version>
</command:details>
<maml:description>
<maml:para>Returns a reference to the DTE (Development Tools Environment) for the active or specified project.</maml:para>
</maml:description>
<!-- Cmdlet syntax section-->
<command:syntax>
<command:syntaxItem>
<maml:name>Get-Project</maml:name>
<command:parameter required="false" position="1">
<maml:name>Name</maml:name>
<command:parameterValue required="true">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>All</maml:name>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<!-- Cmdlet parameter section -->
<command:parameters>
<command:parameter required="false" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the project to return. If ommitted, the active project is returned.</maml:para>
</maml:description>
<command:parameterValue required="true">
string
</command:parameterValue>
</command:parameter>
<command:parameter required="false" position="named">
<maml:name>All</maml:name>
<maml:description>
<maml:para>Returns every project in the solution.</maml:para>
</maml:description>
</command:parameter>
</command:parameters>
<!-- Link section -->
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Online version:</maml:linkText>
<maml:uri>http://nuget.codeplex.com</maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Get-Project</maml:linkText>
<maml:uri/>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
</helpItems>

39
src/AddIns/Misc/PackageManagement/RequiredLibraries/about_NuGet.Cmdlets.help.txt

@ -0,0 +1,39 @@
TOPIC
about_NuGet
SHORT DESCRIPTION
Provides information about NuGet Package Manager commands.
LONG DESCRIPTION
This topic describes the NuGet Package Manager commands. NuGet is an integrated package
management tool for adding libraries and tools to .NET projects.
The following NuGet cmdlets are included.
Cmdlet Description
------------------ ----------------------------------------------
Get-Package Gets the set of packages available from the package source.
Install-Package Installs a package and its dependencies into the project.
Uninstall-Package Uninstalls a package. If other packages depend on this package,
the command will fail unless the –Force option is specified.
Update-Package Updates a package and its dependencies to a newer version.
New-Package Creates a new package when supplied with a Nuspec package specification file.
Add-BindingRedirect Examines all assemblies within the output path for a project and adds binding
redirects to the application (or web) configuration file where necessary.
Get-Project Returns a reference to the DTE (Development Tools Environment) for the active
or specified project.
SEE ALSO
Online documentation: http://go.microsoft.com/fwlink/?LinkID=206619
Get-Package
Install-Package
Uninstall-Package
Update-Package
New-Package

7
src/AddIns/Misc/PackageManagement/Test/Src/Helpers/TestablePackageManagementConsoleHost.cs

@ -48,5 +48,12 @@ namespace PackageManagement.Tests.Helpers
{ {
return VersionToReturnFromGetNuGetVersion; return VersionToReturnFromGetNuGetVersion;
} }
public string TextToReturnFromGetHelpInfo = String.Empty;
protected override string GetHelpInfo()
{
return TextToReturnFromGetHelpInfo;
}
} }
} }

26
src/AddIns/Misc/PackageManagement/Test/Src/Scripting/PackageManagementConsoleHostTests.cs

@ -215,5 +215,31 @@ namespace PackageManagement.Tests.Scripting
Assert.IsTrue(contains); Assert.IsTrue(contains);
} }
[Test]
public void Run_TextDisplayedBeforeFirstPromptDisplayed_HelpInfoDisplayed()
{
CreateHost();
string expectedHelpMessage = "Type 'get-help NuGet' for more information.";
host.TextToReturnFromGetHelpInfo = expectedHelpMessage;
RunHost();
bool contains = scriptingConsole.AllTextPassedToWriteLine.Contains("Type 'get-help NuGet' for more information.");
Assert.IsTrue(contains);
}
[Test]
public void Run_TextDisplayedBeforeFirstPromptDisplayed_BlankLineBeforePrompt()
{
CreateHost();
host.TextToReturnFromGetHelpInfo = "abc";
RunHost();
string actualLastLine = scriptingConsole.LastLinePassedToWriteLine;
string expectedLastLine = String.Empty;
Assert.AreEqual(expectedLastLine, actualLastLine);
}
} }
} }

Loading…
Cancel
Save