Concurrent Package producing and consuming

Sep 2, 2011 at 10:18 PM

Can/How does NuGet handle the situation where a package is being developed at the same time it is being consumed.

Here is the scenario :

  1. Developer Steve is working on AwesomeLoggingComponent
  2. Steve publishees AwesomeLoggingComponent version 1.2 so others in his organization can use it.  He is not done with version 1.2, but it is usable
  3. Developer Bob is working on AwesomeConsoleApp and add's a reference to AwesomeLoggingComponent version 1.2
  4. NuGet works its magic and Bob is so happy that he doesnt have to write his own logging component
  5. Steve finds out that he spelled Awesome incorrectly, so he refactors and republishes version 1.2 of AwesomeLoggingComponent
  6. Bob needs to re-download/refresh his package

Is Bob stuck in the dark or can NuGet handle this scenario or does Bob need to come up with his own workaround?


thanks for your help

Sep 2, 2011 at 11:19 PM

I don’t see the issue here. Steve publishes 1.2, Bob upgrades to 1.2. Did I miss something?

Sep 3, 2011 at 12:00 AM

Except you make it sound like the package gets republished but with the same version? That's usually not recommended.

Sep 3, 2011 at 1:13 AM

So if I have release 10.2 coming out of AwesomeConsoleApp and it will use AwesomeLoggingComponent 1.2.  If I need to develop both in parallel how would I make sure NuGet refreshes to the correct package.  

I am not good at defining this problem, but I don't think I am the only one trying to figure this scenario out.   If you read the most recent posts to that topic it talks about this scenario.  Someone suggested putting in an alwaysCheckFeed flag so the package will get updated when NuGet hits the server.

Sep 9, 2011 at 10:21 AM

Please don't republish packages with the same version number, that causes all sorts of trouble. If you have control over versioning (which you have, as it's an internal component) better adopt a scheme where in x.y.z.q the x.y.z part is the version of component and q is the version of the package. You can bump it up in situations where you fix something like signed-vs-unsigned, missing files in the package etc. In this case, however, I would advise to increment the actual version in the component. Changing the spelling of something is a breaking change in the API.