Creating a project template with the required NuGet packages, as Fabrice has already suggested, is probably the approach I would take. To get the latest versions of the NuGet packages you could use the NuGet Package Updater package. That would get around the project template currently only supporting installing a specific version of a NuGet package.
Alternatively you can store useful PowerShell scripts inside the NuGet profile. Create a file called NuGet_profile.ps1 in the %UserProfile%\Documents\WindowsPowerShell directory (e.g. C:\Users[YourUserName]\Documents\WindowsPowerShell\NuGet_profile.ps1).
Inside the NuGet_profile.ps1 you can add PowerShell functions that you can call from the Package Manager Console window inside Visual Studio. You will need to restart Visual Studio before the functions can be called. An example NuGet_profile.ps1 file is shown below.
function Install-StandardPackages {
param(
[Parameter(position=0, mandatory=$true)]
[string]$projectName
)
Install-Package elmah -ProjectName $projectName
Install-Package SqlServerCompact -ProjectName $projectName
}
function Install-StandardPackagesForAllProjects {
foreach ($project in Get-Project -all) {
Install-StandardPackages $project.Name
}
}
Now with these functions defined you could run the following in the Package Manager Console to install elmah and SqlServerCompact into a project called MyProject.
Install-StandardPackages MyProject
Or you could install elmah and SqlServerCompact into all projects in the currently open solution by running the following in the Package Manager Console.
Install-StandardPackagesForAllProjects
The -ProjectName parameter in the Install-Package command is used to specify the name of the project that the package will be installed into. The tests suffix looks like it is part of the name of the project containing unit tests.