Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6051191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:46:28+00:00 2026-05-23T07:46:28+00:00

Whenever I start a project I want to install the NuGet packages Elmah, Glimpse,

  • 0

Whenever I start a project I want to install the NuGet packages Elmah, Glimpse, MvcScaffolding, Squishit and … – well those are the ones I am aware of. Maybe I should be installing others as well?

Anyway, instead of having to remember all these it would be good to put this all in a script and all I have to do is run that. However, this is the first time I have come into contact with PowerShell and I am not sure how to do this.

I have looked at an example project and the script looks simple enough, but I am confused as to why there is a need to install the package with a .test suffix? Why also the -Project parameter?

For example,

Install-Package SqlServerCompact -Project MileageStats.Data.SqlCe
Install-Package SqlServerCompact -Project MileageStats.Data.SqlCe.tests

I have done a Google search to find out more, but I think I am looking in the wrong places.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:46:28+00:00Added an answer on May 23, 2026 at 7:46 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I start a new project, I have to go through setting up the
I downloaded the latest Mono.Cecil and now whenever I start up my project it
Whenever I start a new software project I spend a good amount of time
I want to start using GitHub Pages for my project's website. This simply requires
Whenever I start a new project in Flex builder I always have to go
Whenever I start my emulator from Eclipse it loads, but I CANNOT open the
Whenever I start a shell in vim using :sh, it doesn't source my ~/.bashrc
The screen which shows whenever i start Netbeans is very annoying, and among the
Scenario I've created a windows service, but whenever I start it, it stops immediately.
After upgrading to latest Eclipse ADT 17 , whenever I start editing layout in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.