7

I have a project, which uses Chutzpah to run unit tests, however the project does not use Chutzpah any other way, it only uses its command line interface. When I installed the Chutzpah NuGet package, the reference was added to .nuget\packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
    <package id="Chutzpah" version="2.4.3" />
</packages>

I have package restore enabled for this project and the build successfully restores all other used packages but not Chutzpah. I assume it has to do with the fact, that the package reference is located in .nuget\packages.config and not in a project packages.config file, but I don't know why this happened and what is the correct way to work with this?

The Chutzpah NuGet package was added to the project via Visual Studio to a specific project.

To work around the issue I moved the package reference to a project packages.config file and the restore works fine.

3
  • i'm sure the real answer involves changing the nuget.targets file to include the .nuget folder in addition to the solution folders... but I took your shortcut for now Commented May 28, 2014 at 19:02
  • If you use the newer Automatic Package Restore does this problem go away? Commented Jun 18, 2014 at 13:44
  • I've had this problem before, I find that reinstalling the problem package updates the references to it. docs.nuget.org/docs/workflows/reinstalling-packages Commented Jul 24, 2014 at 6:46

1 Answer 1

1

Package Restore will not automatically restore solution-level packages. You will need to add a build step to get NuGet to restore the solution packages. For example:

.nuget/nuget.exe install .nuget/packages.config -o packages

For more information see this post on solution level packages.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.