Conan: Add support for using and publishing Nuget packages.

Created on 29 Aug 2019  路  3Comments  路  Source: conan-io/conan

Conan currently seems to work with Conan packages only. Could you roughly tell how much work it'd be to make the Conan client to fetch deps and upload packages to Nuget or Maven repositories? Is the architecture of Conan prepared to be extended with supporting other package formats?

I'm asking because we're considering Conan, but we have a lot of processes built already around Nuget and Maven packages and we can't add the new repository format. If you provide some guidelines, we're happy to do the necessary work.

question

Most helpful comment

Hi @mfronczyk

I am afraid not, Conan is a package manager specifically designed and optimized for native C and C++ code and multi-platform, born out from our own frustrations of other existing solutions (basically the non existence of a real C and C++ package manager, but other languages limited attempts). The Conan model of managing package recipes and different binaries for different configurations and platforms is the core of Conan and, it is basically incompatible with what nuget or maven do. It doesn't make sense to even try to integrate those other solutions, and the amount of work would be huge, and later maintenance and evolution impossible.

If you want to keep your existing packages with other technologies, I would suggest to start using Conan just for new and limited things. There is no need to go all or nothing with Conan:

  • You might be able to use Conan just for a new open source third party library. Start small, and move from there.
  • You can create Conan packages even if they are built from other processes or tools, with conan export-pkg, no need to always do the build from sources inside the Conan recipes.

Setting up a new Conan repository is just 2 clicks in Artifactory, for example. The amount of work necessary to setup Conan repositories might be 3 or 4 orders of magnitude less than trying to implement a consumption of Nuget or Maven packages from Conan.

All 3 comments

Hi @mfronczyk

I am afraid not, Conan is a package manager specifically designed and optimized for native C and C++ code and multi-platform, born out from our own frustrations of other existing solutions (basically the non existence of a real C and C++ package manager, but other languages limited attempts). The Conan model of managing package recipes and different binaries for different configurations and platforms is the core of Conan and, it is basically incompatible with what nuget or maven do. It doesn't make sense to even try to integrate those other solutions, and the amount of work would be huge, and later maintenance and evolution impossible.

If you want to keep your existing packages with other technologies, I would suggest to start using Conan just for new and limited things. There is no need to go all or nothing with Conan:

  • You might be able to use Conan just for a new open source third party library. Start small, and move from there.
  • You can create Conan packages even if they are built from other processes or tools, with conan export-pkg, no need to always do the build from sources inside the Conan recipes.

Setting up a new Conan repository is just 2 clicks in Artifactory, for example. The amount of work necessary to setup Conan repositories might be 3 or 4 orders of magnitude less than trying to implement a consumption of Nuget or Maven packages from Conan.

Thanks @memsharded. I think this will be a blocker because our infrastructure team will need to maintain another repository type and they might not want to just for us.

Thanks @memsharded. I think this will be a blocker because our infrastructure team will need to maintain another repository type and they might not want to just for us.

Sure, no problem, I understand sometimes it is difficult to get that.

Just in case, if you still would like to start using Conan internally just for your team, I don't know if you know about Artifactory-CE for Conan which is free (even for commercial purposes). You might consider using your own Artifactory-CE instance locally, it is relatively easy to run it just for your team. We have had other teams at big cos doing this first and later convincing IT when they are happy about it.

As there is little we can do here, I am closing this issue now, but feel free to ask if you have any further question. Cheers!

Was this page helpful?
0 / 5 - 0 ratings