Coder Social home page Coder Social logo

Comments (4)

chriseldredge avatar chriseldredge commented on July 20, 2024

It looks like NuGet Package Explorer automatically appends api/v2/package to whatever URL you tell it to publish to.

http://localhost.klondike.foolhq.com/ => http://localhost.klondike.foolhq.com/api/v2/package

http://localhost.klondike.foolhq.com/api/packages => http://localhost.klondike.foolhq.com/api/pacakges/api/v2/package

None of these URIs are valid in Klondike. The correct place to put packages is to /api/packages.

I could put redirects into Klondike to work around this, but really the client should not be doing this. In my opinion this bug is in NuGet Package Explorer, not Klondike.

from klondike.

leblancmeneses avatar leblancmeneses commented on July 20, 2024

Can you add a route in web api to accept both? I don't think this is their bug. api/v2 is just saying that it is nuget v2.x compliant. The free nuget servers (filesystem) all implement api/v2 route also.

I tried adding a url rewrite but recently found out it doesn't work unless you ignore the route. RouteTable.Routes.IgnoreRoute("api/v2/{*pathInfo}"); . Either way if we want this to work in package explorer this code base is more appropriate place to resolve it.

        <rule name="Workaround for Nuget Package Explorer">
            <match url="^api/v2/package(.*)$" ignoreCase="false"/>
            <action type="Rewrite" url="/api/packages{R:1}" appendQueryString="true"/>
        </rule>

please.....

from klondike.

chriseldredge avatar chriseldredge commented on July 20, 2024

Out of curiosity have you asked the NuGet Package Explorer developer(s) to fix this issue on their side? The behavior of their client is different from NuGet command line client, Visual Studio package manager, Package Manager Console, and even OctopusDeploy.

It seems silly to add special work-arounds for an individual client that behaves differently than everything else.

from klondike.

leblancmeneses avatar leblancmeneses commented on July 20, 2024

Just did - thanks: https://nuget.codeplex.com/workitem/4168

from klondike.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.