0

I'm trying to publish a project on NuGet staging server. The project has two dependencies: Mono.Cecil and ILRepack.

When installing my project at project level:

  • Mono.Cecil dependency is installed automatically at project level. I can also find it in the target directory of the project.

  • ILRepack dependency is installed too, but at solution level. There is no mention of ILRepack.dll in the target directory.

Since my project requires both Mono.Cecil and ILRepack to be actually in the target directory, this is rather annoying. There is no “Copy Local” to check like for ordinary references.

How do I force NuGet dependencies to be at the scope of the project and to be copied to target directory during the build?

Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199

1 Answers1

0

Found it. The problem was that the NuGet package metadata was referencing ILRepack, when the one I actually needed is ILRepack.Lib.

Since ILRepack package doesn't contain the assemblies to be used in a project, but rather an executable to be called directly, it was forced to be installed at the scope of the solution, and there are no actual references at project level. Makes sense.

Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199