Not Referencing Assembly After Package Install

Feb 13, 2011 at 8:12 PM

I put my first package on NuGet, and when I try to install it in a VS project, it put everything in the packages directory as expected, but it doesn't add a reference to the DLL in my project. The project is called "Spackle" so you can search for the one there if you'd like.

Any help would be appreciated.

Regards,
Jason

Developer
Feb 13, 2011 at 8:15 PM

Can you print the contents of your package:

nuget pack -v 

Should show you what's inside your package when you build.

Developer
Feb 13, 2011 at 8:16 PM

I just took a look at your package. It's not build properly. References go into the lib folder.

Feb 13, 2011 at 8:26 PM

I tried that command. Nuget tells me "Unknown option"

?

Feb 13, 2011 at 8:27 PM

I thought you could put assemblies in directories specific to a version of teh .NET framework (http://haacked.com/archive/2011/01/12/uploading-packages-to-the-nuget-gallery.aspx)

Here's what I have

\lib

   \.NetFramework 4.0

      Spackle.dll

   Spackle.pdb

   Spackle.XML

Feb 14, 2011 at 4:42 PM

Try naming your folder as "NET40" instead.

Developer
Feb 14, 2011 at 4:52 PM

When I downloaded the package there was no lib folder. I think that was the problem.

Feb 14, 2011 at 5:38 PM

Yeah, it works now, I figured out that my folder setup was borked. Everything works now, thanks to those who helped out.

Feb 14, 2011 at 5:51 PM

Btw, we have a debugging tool, called NuGet Package Explorer, to help you look into your .nupkg file after it is created. It is a convenient way to verify your package's structure. You can install it here:

http://nuget.codeplex.com/releases/view/59864