user34537
user34537

Reputation:

NuGet Source Control Integration

I checked out my project using git and saw the assembles I installed with NuGet as missing. I tried building and got a missing assembly error so I tried to re-add it with NuGet but NuGet says I have added that dll/reference to my project (it has a green checkmark).

I went into the options and checked get missing ref during build and did a rebuild and I am still getting missing asm errors.

How do I use NuGet with source control?

Upvotes: 0

Views: 938

Answers (3)

Sudhanshu Mishra
Sudhanshu Mishra

Reputation: 6733

[For the benefit of those who land here via a web search] As of NuGet 2.0, "Restore Packages" is a step that can be performed by the build before attempting to build your solution:

See this from official NuGet docs

Enabling package restore for a solution can be done through Visual Studio GUI and the changes made to the project are similar to what @Precipitous suggests in his comment. In essence you do this: Right click on the solution in Visual Studio and click "Enable NuGet Package restore".

Upvotes: 0

bhuvak MSFT
bhuvak MSFT

Reputation: 361

What exact error are you seeing with package restore ? http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages - has more details around enabling package restore.

Upvotes: 0

Nathan Hillyer
Nathan Hillyer

Reputation: 1979

Right Click Solution (and projects) -> Enable NuGet Package Restore

or...

Check the packages folder into source control.

YMMV, NuGet is terrible at integrating with source control.

Upvotes: 2

Related Questions