# nik codes

## The Saga of Readme Files and NuGet

When we released Glimpse back in April of 2011, we included a readme.txt in our NuGet package providing brief documentation and instructions to help users understand how to get started with Glimpse.

Even worse, nobody knew it was there.

So at the end of June 2011 we added a little NuGet and PowerShell magic to our package that would open up the readme file for the user in Visual Studio upon package installation by adding a tools/install.ps1 file:

param($installPath,$toolsPath, $package,$project)
$path = [System.IO.Path]$readmefile = $path::Combine($installPath, "path\to\your.file")
$DTE.ItemOperations.OpenFile($readmefile)

This simple script has been working well for us over many releases and thousands of downloads, but I’ve always felt that this functionality should be built into NuGet itself. Apparently I’m not the only one that feels this way, as there has been a feature request on CodePlex for this since October 2010 asking for this very thing. (The comments on this thread are a good read. Full disclosure, I am a participant on it.)
Fast forward to last week, when Drew Miller tweeted:
Want your NuGet package to open a Readme file after installing? Here's how, by convention:  nuget.codeplex.com/workitem/211— Drew Miller (@anglicangeek) March 12, 2012
This is great news, as now NuGet will essentially do what I’ve always hoped it would: open readme.txt files automatically. The new feature, coming in NuGet 1.7, builds upon NuGet’s convention over configuration roots by opening a file named readme.txt placed in the root of the package. This will facilitate simple readme.txt discoverability problems like we had with Glimpse – which is wonderful and should cover most use cases.
For more advanced scenarios (IE: opening other file types, opening files from other locations, opening multiples files, supporting older versions of NuGet, etc) feel free to use the PowerShell script above.
Please note, NuGet 1.7 is not yet released and does not currently have a published release date.
@nikmd23 No actual date (we don't do release dates) but it's in final testing now and will be released soon.— Drew Miller (@anglicangeek) March 12, 2012
– By Nik Molnar

var o = document.getElementById('crt-68769658');
if ("undefined"!=typeof Criteo) {
var p = o.parentNode;
p.style.setProperty('display', 'inline-block', 'important');
o.style.setProperty('display', 'block', 'important');
});
} else {
o.style.setProperty('display', 'none', 'important');
o.style.setProperty('visibility', 'hidden', 'important');
}