Willem Toerien
Willem Toerien

Reputation: 260

Using chocolatey or nuget for a package that adds plug-ins to a tool in another package

This is a bit tricky to explain, but I'll try my best. Please ask if you have any questions...

Question

I have a nuget package A that is referencing a tool in another package B of mine. The tool is a msbuild task and an executable and uses MEF. Package A adds plug-ins to package B and have targets to be added when another project references package A. When another project reference package A, nuget will insert the targets the referencing project.

Now, the task in package B does have a property to point where to find plug-ins. So I'm not worrying much about copying dll's here and there. However, What I

  1. Should I use chocolatey for (B), or nuget, or both?
  2. What is the best practices for tool sharing in packages?
  3. What is the best practices for using plug-ins for a tool in a package that exists in chocolatey, nuget or both?

Upvotes: 2

Views: 372

Answers (2)

Willem Toerien
Willem Toerien

Reputation: 260

Okay, so I talked to some people and browsed google a lot and found my answer.

  1. Just nuget. "chocolatey is focused on applications and tools, and not necessarily developer focused." - ChocolateyFAQs. The tool I am using is more a developer focused tool than a tool to be used by itself.
  2. Inside the tools folder. duh... "The tools folder of a package is for powershell scripts and programs" - Creating And Publishing A Package Even though package B doesn't have references, it's a package that contains a tool that will be used by another package for development purposes. Both is required by a project that wants to make use of package A. What I am basically doing is sharing a tool and extending it via plug ins.
  3. Unfortunately, I haven't found much information on accessing a package from another package without knowing the other package's directory; because of the version. So when I update package B, I have to modify package A to use package B's new version number. In my case, the targets file.

Upvotes: 0

ferventcoder
ferventcoder

Reputation: 12561

Answers for the above based on what I currently understand:

  1. NuGet is for distributing software libraries (DLLS) that are used for referencing in software projects to build tools/apps/frameworks that are distributed on Chocolatey.
  2. You need to elaborate on this item more.
  3. Chocolatey has published naming conventions which elaborate a little on package contents: https://github.com/chocolatey/chocolatey/wiki/CreatePackages#naming-your-package

Upvotes: 2

Related Questions