NuGet Server on old version

Topics: General
Nov 19, 2012 at 10:18 AM

Hi,

In my company they have an internal NuGet gallery running on an IIS Server.  This was set up some time ago by some guys that have since left the company.

It has some packages in already, but I am unable to upload new ones due to this error:

"The Package could not be uploaded: The schema version of 'TestProject' is incompatible with version 1.5.0.0 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942"

I've found the nuget.exe on the IIS server, and I ran nuget update -self from the command line.  It said it updated NuGet.exe, from 1.6.21205.9031 to 2.1.2, did that successfully, but I still get the same "1.5.0.0" version error when I try to put a package up.

Can anyone help?

Thanks in advance...

Developer
Nov 19, 2012 at 2:52 PM

You'll need to update the NuGet.Core package in the gallery.

Nov 19, 2012 at 3:10 PM
Edited Nov 19, 2012 at 3:11 PM

I figured I'd just refresh the whole gallery site with the latest master from git.

I was about to celebrate as it looked fine, and my package now went in OK.

HOWEVER, the NuGet feed into Visual Studio now gives an http 500, just trying to debug why....

When I browse to http://mynugetserver/api/v2 in a browser I get this:

 

The server encountered an error processing the request. The exception message is 'Object reference not set to an instance of an object.'. See server logs for more details. The exception stack trace is:

Server stack trace: at NuGetGallery.Configuration.GetHttpSiteRoot() in c:\paultest\NuGetGallery-master\Website\App_Start\Configuration.cs:line 122 at System.Lazy`1.CreateValue() Exception rethrown at [0]: at NuGetGallery.Configuration.GetHttpSiteRoot() in c:\paultest\NuGetGallery-master\Website\App_Start\Configuration.cs:line 122 at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at NuGetGallery.Configuration.GetSiteRoot(Boolean useHttps) in c:\paultest\NuGetGallery-master\Website\App_Start\Configuration.cs:line 67 at NuGetGallery.V2Feed.CreateDataSource() in c:\paultest\NuGetGallery-master\Website\DataServices\V2Feed.svc.cs:line 29 at System.Data.Services.DataService`1.CreateProvider() at System.Data.Services.DataService`1.HandleRequest() at System.Data.Services.DataService`1.ProcessRequestForMessage(Stream messageBody) at SyncInvokeProcessRequestForMessage(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

 

Not sure what the problem is there...any suggestions!?!?

Nov 19, 2012 at 3:36 PM

Hmmm, my config file was wrong, I hadn't set Gallery:SiteRoot in the appSettings.

But, still not working.  The 500 has gone, but I now get "An error occurred while processing this request." in Visual Studio when I go to my feed.

The URL I have for the feed is:

http://mynugetserver/api/v2/

Is this correct?

When I go to that URL in a browser I now get this:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<service xml:base="http://mynugetserver/api/v2/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
  <workspace>
    <atom:title>Default</atom:title>
    <collection href="Packages">
      <atom:title>Packages</atom:title>
    </collection>
  </workspace>
</service>

Nov 19, 2012 at 5:07 PM

Solved in case anyone else encounters the same issue.

Well, I didn't solve it, the guy here did:

https://github.com/NuGet/NuGetGallery/issues/640

It was exactly what I was experiencing, and his fix worked.

Please note I didn't have to do the last bit (install WCF Data Services 5.0 for OData V3) I just added the 2 packages he refers to.