How to associate documentation page with a Nuget package

Jun 14, 2011 at 3:24 PM

Just getting started with Nuget and really like it so far.  I've come across a small problem, maybe someone out there can help?

I have set up a local Nuget repository and I've created a couple of packages for some common libraries we've created in house.  I've configured Visual studio to point to this local repository as well as the standard one and can see and access my packages within visual studio - so far so good!

To finish things off, I'd like to add a link to a documentation web page for each package so that developers who are browsing packages on the local repository can see what they do. In other words, I'd like it to be similar to the packages in the official Nuget reposistory, where u can click on the project information link to see more details about the package.

Any idea what I have to do to enable this link for a local nuget repository.  My initial thought was to set the project url - I did this via the Nuget Package Explorer. I checked the nuspec file produced and the project url seems ok:

<projectUrl>http://localhost/MyLocalNuget/Docs/MyDll/Index.html</projectUrl>

the Url works fine if I paste into a browser address bar, but when I click on it from within visual studio (or the Nuget Package Explorer) it doesn't do anything.  Does the url have to be in a certain format or does it have to be a certain path relative to the package? or am I using completely the wrong approach

Any advice, pointers welcome.

thanks

Jun 14, 2011 at 4:50 PM

For security reason, we don't do anything in Visual Studio if the project Url is pointing to localhost.

Jun 14, 2011 at 5:40 PM
dotnetjunky wrote:

For security reason, we don't do anything in Visual Studio if the project Url is pointing to localhost.

That's a pretty poor user experience to have a url that clicking it does nothing. I find the security concerns to be minimal personally, but if you really feel that's the justification then there should be a warning confirmation that can be told by the user to allow localhost urls.

Jun 14, 2011 at 5:43 PM

I don't think there are many real scenarios where you would end up having packages with a project link pointing to localhost. Typically, the point of a nuget repo is to share with others, so localhost will just not work well. So while it's technically feasible to add fancier handling for this, it's hard to make a case for it priority wise :)

Jun 14, 2011 at 5:56 PM

I agree. If we do want to show warning, it should be at the time of package creation, e.g. nuget.exe and package explorer.

Jun 15, 2011 at 8:44 AM

Thanks for that - moved docs to another server (where they will be anyway - localhost was just me playing around with things) and all working 100% now.  I guess a warning in package explorer would be nice to have.  cheers

Jun 15, 2011 at 3:19 PM

I will make sure I'll add that to package explorer in that next release.

Jun 15, 2011 at 10:03 PM
Edited Jun 15, 2011 at 10:06 PM
davidebbo wrote:

I don't think there are many real scenarios where you would end up having packages with a project link pointing to localhost. Typically, the point of a nuget repo is to share with others, so localhost will just not work well. So while it's technically feasible to add fancier handling for this, it's hard to make a case for it priority wise :)

I guess this is stranger of a notion than I thought, I can think of a few scenarios but they would really depend on the package being installed first.