0
votes

I have a very simple post build script which packages all dlls from my project to a custom nuget server. This works fine, however, when opening package manager from any solution, I see the nuget package as a new install, as opposed to the expected 'update' option.

The nuspec file I am using is:

<?xml version="1.0"?>
<package >
  <metadata>
    <id>Objects.ForConsumers</id>
    <version>1.2015.1111.11</version>
    <title>Objects.ForConsumers</title>
    <authors>My Firm</authors>
    <owners>My Firm</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Objects For Consumers</description>
    <releaseNotes></releaseNotes>
    <copyright>Copyright 2015</copyright>
    <tags>Objects For Consumers</tags>
  </metadata>
  <files>
    <file src="*.dll" target="lib" />
  </files>
</package>

The version number is incremented with each build.

The commands are essentially

nuget pack Objects.ForConsumers.nuspec

nuget push Objects.ForConsumers.1.2015.1111.12.nupkg -s http://nuget.myserver.com myApiKey

Can anyone suggest which this is happening?

enter image description here

2
Can you post a screenshot of your package manager?KnightFox
Posted as requested.DavidReid

2 Answers

0
votes

You have selected the "online" option on the panel/tab on the left. If you select "Updates" and search for your package, you should see the update button.

0
votes

I finally stumbled over the resolution to this. My nuspec file has the following:

  <files>
    <file src="*.dll" target="lib" />
  </files>

I updated this as follows:

  <files>
    <file src="*.dll" target="lib" />
    <file src="*.dll" target="lib/net40" />
  </files>

(Adding in the specific folder for my .net version) And all is working now!

Hope this helps somebody else in the future.