How to open readme url for NuGet package?

In NuGet, you can put the readme.txt file in the pacakge root and it will open automatically. However, I have seen NuGet packages open the URL during installation. How this is done (you can see an example with this NuGet package ).

+6
source share
2 answers

This is done using the PowerShell script in the tools \ install.ps1 package. Download the Glimpse package package , extract the archive, find the tools \ install.ps1 file.

Below you will find the following script that performs navigation:

$DTE.ItemOperations.Navigate("http://getglimpse.com/Version/Install/?" + $package.Id + "=" + $package.Version) 
+10
source

You need to add the powershell script package to the package:

  • Init.ps1 starts when the package is first installed in the solution
  • Install.ps1 is executed every time the package is installed in the project.

Source: http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#Automatically_Displaying_a_Readme.txt_File_During_Package_Installation

+1
source

All Articles