Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget package not adding reference on custom package

I created a nuspec file:

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>MyPackage.dll</id>
    <version>3.5</version>
    <authors>Me</authors>
    <owners>Me</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>The description</description>
    <tags>tag1</tags>
  </metadata>
</package>

In a directory with the file strucutre

  • MyPackage
    • Assemblies
      • MyPackage.dll
    • MyPackage.nuspec

I created my package using nuget.exe pack myPackage.nuspec and placed it in my local sources. I can find and install it from visual studio at which point

  • The dll is copied into the packages directory
  • But the reference is not added to the project
  • No repositories.config is created
  • No packages.config is created

What am I missing?

like image 496
George Mauer Avatar asked May 19 '11 21:05

George Mauer


1 Answers

In case someone runs into this in the future. The solution was that the 'Assemblies' directory needed to be renamed 'lib'. The documentation was wrong (been updated, now it's correct).

Big thanks to dotnetjunky over on codeplex

like image 85
George Mauer Avatar answered Jan 03 '23 17:01

George Mauer