Is Visual Studio 2013 ignoring your .gitignore file?

Well, it was for me. Specifically I wanted it to exclude the nuget packages folder which in theory should have been as simple as uncommenting a single line in .gitignore.

Except… VS2013 (with update 2) insisted on still checking in the packages folder. Odd.

Turns out various folks have hit the same problem and the answer turns out to be pretty simple.

  • Close Visual Studio.
  • Navigate to your .git folder
  • Delete ms-persist.xml
  • Restart Visual Studio

And hey presto, all is well.

If you exclude the packages folder then you also need to enable nuget package restore  – check out this great walkthrough.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s