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

  • Home
  • SEARCH
  • 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 6681751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:37:33+00:00 2026-05-26T04:37:33+00:00

I am on a two-man team using Team Foundation Server for our source control.

  • 0

I am on a two-man team using Team Foundation Server for our source control. I started a new solution. For that solution I created several projects. In many of them I used NuGet to install AutoMapper and Unity. I then right clicked on the solution and selected "Add to Source Control". I then checked in the resulting pending changes.

The other person on my team did a get latest and all of the NuGet references are failing for him.

So, I figured I needed to add the packages folder. So I did that.

After I did that, the NuGet references are still failing (for him).

Also, when I try to add a NuGet Package to a file I get this error now:

Access to the path ‘C:\src\MyPath\ToMySolution\packages\repositories.config’ is denied.

I assume this is because the repositories.config file is now under source control (so it is read only until manually checked out).

So, here are my two questions:

  1. How or what do I check in so that the NuGet packages are valid for my coworker when he does a get latest?
  2. Is there a way to not have to manually check out the NuGet files when I need to use NuGet?

Am I doing this wrong? Or is NuGet not really meant for use with source control?

  • 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-26T04:37:33+00:00Added an answer on May 26, 2026 at 4:37 am

    Edit 2014/03/31: The manual MSBuild-based package restore enablement is no longer needed, see also http://xavierdecoster.com/migrate-away-from-msbuild-based-nuget-package-restore.

    Edit 2012/02/07: This is now a built-in feature of the NuGet vsix, called Enable Package Restore.

    Obsolete Alternative

    There is a NuGet package for that, it’s called NuGetPowerTools. It adds two new commands to the NuGet Package Manager Console in Visual Studio, amongst which Enable-PackageRestore is the interesting one for you.

    It will add a .nuget folder which contains nuget.exe, nuget.settings.targets and nuget.targets.
    When you run enable package restore, it will enumerate all projects in your solution and add an import nuget.targets statement in the project files (which are actually msbuild files themselves).

    Whenever you build a project or the entire solution, nuget will fetch all packages for that project/solution, as defined in the packages.config file. This happens in a pre-build step.

    So, in short:

    1. do not check-in packages
    2. do check-in the config files (repositories.config and packages.config files)
    3. use Enable Package Restore
    4. check-in the .nuget folder

    Whenever someone gets the sources, whether that’s another developer in the team or a build agent, the msbuild process will be instructed to fetch any required packages in a pre-build step.

    Also, when the packages are not committed into TFS Source Control, you won’t hit the read-only flag issues, or merge conflicts with binary files.

    If you want, you can also check-out the underlaying reasoning for this approach on my blog.

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

Sidebar

Related Questions

I have created two processes using fork(). The child process is producing and writing
I recently joined a team that was formerly a one man show to maintain
Two questions: Can someone point me to unbiased data that compares .NET performance to
So we have varying opinions on how to deal with our source in regard
man 3p printf man 3 printf The above two man page gives different info
Real simple question. According to my man-page, these two will do the same: time_t
I read from man pages of execve that if a process(A) call execve, the
've written two functions in a file commit_hooks.py that I want to run before
I have two arrays the store the values of two lines that are read
I have a poor man's replication setup that I can't do anything about. Some

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.