An update to nuget support in OpenWrap

I’ve been pretty quiet lately, as we’ve been working very hard at the new package resolver infrastructure I’ll blog about soon.

In the meantime, if you use OpenWrap from the master branch (the packages will be updated on the server at the weekend), I’ve fixed an issue we were having with NuGet packages. Indeed, some packages produced by NuGet are not in compliance with the specs they’ve published. We now process those packages by ignoring all namespaces.

To add the v1 repository to OpenWrap, simply use the add-remote command.

PS C:\src\openwrap> o add-remote legacy nuget://feed.nuget.org/ctp2/odata/v1/Packages
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • http://codebetter.com/members/serialseb/default.aspx Sebastien Lambla

    If you’ve installed the binaries from the server, that’d be because the new binaries are not on there yet, as it seems the NuGet guys can’t get their packages generated according to their own XSDs…

    The fix is in, but the binaries probably won’t see the light of day before tonight, as there are significant changes in a whole bunch of scenarios (including versioning of dependencies) and I had to wait until today to be able to smoke test them in our environment here.

    For those specific issues you just reported, I’ve created the following entries. I encourage you to monitor those to see when they will be implemented.

    https://github.com/openrasta/openwrap/issues/issue/108
    https://github.com/openrasta/openwrap/issues/issue/109
    https://github.com/openrasta/openwrap/issues/issue/110
    https://github.com/openrasta/openwrap/issues/issue/111

    Thanks a lot for the feedback, it is very helpful.

  • NC

    You’re example on my 3rd link used -query

    “PS C:\src\demo> o list-wrap -query *castle* -remote nu”

    I assumed my wild card would find anything with castle in it and display those package names, then i could explicitly type in the package name I wanted to add.

    When I added the repo, i used the name ‘nu’ but I used the link from this blog post. So I had:

    “o add-remote nu nuget://feed.nuget.org/ctp2/odata/v1/Packages”

    When I re-added the repo under the name ‘nugets’ I did:

    “o add-remote nugets nuget://feed.nuget.org/ctp2/odata/v1/Packages”

    Thinking maybe I just typed it wrong the first time, and made sure I was more careful the second time around.

    Testing the query again:
    o list-wrap -query *nhibernate* -remote nugets
    o list-wrap -query *castle* -remote nugets
    o list-wrap -query *log4net* -remote nugets
    o list-wrap -query *log* -remote nugets

    I received the same error. It was at this point after renaming the repo and retrying a few queries that i gave up.

    I’m using the install from http://www.openwrap.org/

  • http://codebetter.com/members/serialseb/default.aspx Sebastien Lambla

    Are you saying you tried to do “add-wrap *castle*” ? If that’s the case, we should probably detect that and provide some hints as to what to do next (and maybe give a list of packages that seem to match the wildcard). The add-wrap command takes the name of the package, not a wildcard, which is indeed in the help for “get-help add-wrap”, where the -Name property is said to “Specify the name of the package to add”.

    If you have added the remote repository for nuget as per this post, the name of that repository would be called legacy, not necessarily nu. The name is whatever you decide to add when you create the remote.

    The error message indicates to you that the selected repository (in this example nu) was not found. From that, a quick look at get-help would show that a command (remote list) “Lists the configured remote repositories”.

    I’ll make a note to add more information to commands that accept a remote, to make sure you get a hint as to what to do next for those errors too.

    If you list the remotes as per the command, “o remote list” or “o list-remote”, you’d see that you either haven’t added the nuget repository, or you’ve added it under a different name.

    I can see there are quite a few wrong assumptions in the commands you’ve issued, and I’ll add issues to github to track each of those to make sure we provide more discoverability from within the commands for beginners.

    Thanks for the feedback.

  • NC

    Actually no, based on the 3rd link in my post i tried *nhibernate*, which gave me the error, followed by *castle*, *log4net*, *log*, *structure*. Then I tried “0 list-wrap -remote nu” which gave me the exact same error.

    “Selected repository wasn’t found. If you used -remote, make sure the remote repository exists.”

    So I tried re-adding the packages under the name “nugets”, and tried again, receiving the same error.

    I can’t get past that error.

  • http://codebetter.com/members/serialseb/default.aspx Sebastien Lambla

    NC,

    So you created a new project, which creates all that is necessary to get started, and you wanted to add nhibernate from nuget.

    At that stage, I assum you did something along the lines of add-wrap nhibernate and found nothing, seeing as that’s not hte way the package is called.

    At that point, you gave up and said it was too complicated compared to a point and click approach, and that is your right.

    You could’ve simply do “o list-wrap -remote nu” which would’ve shown you the pacakges that do exist. You would’ve discovered that the package name is called nhibernate.core, and not nhibernate.

    I’ll make sure to update the tutorial to include that command, and add I’ll also reiterate that the get-help command would’ve given you the list of all commands available with their documentation, a fact it seems you missed.

    As I said before, if those commands, which are very close equivalents to both the nuget console and the rubygems ones, are too much for you, I’d recommend staying in GUI land with whatever MS produces for VS.

    Alternatively, you could come and help build a gui for OpenWrap, to combine both it’s more powerful engine and an easy point-and-click UI.

    Thanks for your feedback.

  • NC

    I started here:
    http://www.openwrap.org/get-started.html

    Followed by:
    http://codebetter.com/blogs/sebastien_lambla/archive/2010/10/20/creating-a-new-project-with-openwrap.aspx

    This just caused empty folders to be created in multiple different locations. So I flagged that and attempted to see if i could get NH3 from NuGet so I looked at:

    http://codebetter.com/blogs/sebastien_lambla/archive/2010/10/17/using-nupack-as-a-package-repository-in-openwrap.aspx

    And this post, but it created an empty directory with some message:

    “Selected repository wasn’t found. If you used -remote, make sure the remote repository exists.”

    Lack of real documentation makes this too difficult to use.

  • http://serialseb.blogspot.com Sebastien Lambla

    NC,

    thanks for your feedback, but as it stands I’m not entirely sure what to make of it.

    What have you tried? What has failed? Which blog post? Did you install from the binaries? Did you install from source?

    What do you call intuitive? What did you expect and didn’t find?

    Sorry to hear you’ve given up, maybe another system with a UI will work better for you. If you do have some useful feedback we can incorporate in our release plan I’d be more than grateful to hear about it.

  • NC

    Took another shot at using OpenWrap. It’s just not intuitive, attempted to follow your blog posts but absolutely nothing works for me.

    /givenup