Brainstorm: Converting Apps to use NuGet

Coordinator
Feb 16, 2011 at 4:15 AM

During a lunchtime discussion an interesting scenario came up. What if I already am working on a project that references log4net, since so many projects do, how do I take advantage of NuGet when a new version of Log4Net comes out?

Now this may be a bad example because they never seem to release new versions, but bear with me. :)

I'm not sure if this would be a feature of NuGet itself or it could be a package that adds a new command. But the basic idea is this.

Although packages are not 1-1 with assemblies, in many cases they are. So imagine if you could run a command that would look at all your assembly references and suggest packages to replace them with? Ideally, we'd implement a service on the NuGet.org side that would maintain an index of package contents to package id. That way, you could send our server a list of assemblies and versions, and we'd send back package IDs that contain those assemblies, if any.

The goal would be to make it easy to upgrade a site from one that has plain old assembly references to one that is using NuGet to maintain dependencies. Thoughts?

Feb 16, 2011 at 4:44 AM

I have been working through this problem with out intenral packages. I think this scenerio is probably more common than installing new packages. I know its hard to come to if from that perspective, but you have to consider there is a tom of existing code that hobbled along before nuget. So the easier it is to get on board and figure out the onboarding process to use nuget better the overall experience will be

sent from my mobile

Coordinator
Feb 16, 2011 at 4:53 AM

Yeah, I could even see having an application upgrade wizard type thing. You right click on a project and select “Upgrade to use NuGet” and it would give present you with a list of assemblies it recognizes and the proposed changes and you could check/uncheck any of them and then run it.

Feb 16, 2011 at 5:10 AM

Yes, Fowler and I were discussing this exact thing a week or two ago. I think it's worth putting on the list, though IMO it's somewhat lower priority than all the cool features we're planning for 1.2. :)

Note that a cheap way to achieve some of the benefit is to simply install the package. e.g. if your project is using Log4Net, just install the Log4Net package into it, which should effectively 'convert' your app to using NuGet for it. It's not a full solution, but I think in many cases it just might be good enough until we get to provide the full deal.

To take the idea even further, it could take any DLL it doesn't recognize, automatically create a package from it, push it to the feed and then install it. No, I don't really mean that, but I bet I had you going :)

Coordinator
Feb 16, 2011 at 4:54 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.