2

When I create a new class library, for use with nuget, it has these dependencies / frameworks by default:

{
  //.... stuff.....

  "dependencies": {
    "System.Collections": "4.0.10-beta-23019",
    "System.Linq": "4.0.0-beta-23019",
    "System.Threading": "4.0.10-beta-23019",
    "System.Runtime": "4.0.10-beta-23019",
    "Microsoft.CSharp": "4.0.0-beta-23019"
  },

  "frameworks": {
    "dotnet": { }
  }
}

Question 1

Does -beta- in the dependencies section of project.json actually mean they're beta versions?!

If so, why is it creating dependencies on beta versions?


Question 2

When I install this nuget package, it attempts to install these dependencies alongside the package.

enter image description here

But in the target application, do I not already have references to System.Linq, System.Collections, and so on?

(I had wondered if this was because the nuget package was referencing the -beta- versions, rather than the 4.0.0.0 as referenced in the target project. But this behaviour continued, event after changing 4.0.10-beta-23019 to 4.0.0.0 )

Martin Hansen Lennox
  • 2,837
  • 2
  • 23
  • 64
  • You're using `project.json`, which is part of the not-fully-released DNX etc ecosystem. Yes, everything's beta (or RC1) at the moment. If you create a "traditional" class library, you won't have a project.json at all. – Jon Skeet Nov 18 '15 at 18:26
  • Thank you Jon. So I should be going for `Class Library` project rather than `Class Library (Package)?` And would I then use the nuget package explorer to enter the details contained in `project.json`? – Martin Hansen Lennox Nov 18 '15 at 19:00
  • Yes, that's right. That's if you're happy *not* to target the new DNX stuff, of course. – Jon Skeet Nov 18 '15 at 19:02
  • TBH I'm not clued up enough to know what the implications would be. Right now I'd be happy to just to package up some MVC-age (models, enums, attributes) and have them as a shareable package. Am I on the right track? – Martin Hansen Lennox Nov 18 '15 at 19:09
  • Well I don't really know what you mean by "shareable package" at this stage, but that sounds like a different kind of question. I'd steer clear of DNX if you're not experienced in ASP.NET yet though - there are some rough edges still. I'm sure it'll be fine by release :) – Jon Skeet Nov 18 '15 at 19:38

0 Answers0