-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtual Packages #2391
Comments
+1 Debian has a similar concept and it's very useful: http://www.debian.org/doc/debian-policy/ch-relationships.html#s-virtual |
Is it a dependency? How is it fulfilled if there are many of them? Which one wins? |
@davidfowl Yes, it would be a dependency. I like the idea of specifying a "default" implementation in the depending nuspec. A GUI could allow the user to select one. Multiple implementations installed into the same project might need to be blocked, but it could also be left up to the contract to define. E.g. VS would error/warn if there are multiple files named |
It has been more than two years. Is there any update? |
Nope |
Then is this feature ever considered? Would at least Pull Request be reviewed and merged? (Only after that we can discuss about possible implementation details.) |
If we name the virtual package with <dependency id="Microsoft.Data.Sqlite" version="*"/> According to specification, <dependency id="Microsoft.Data.Sqlite"/> (Virtual packages in Debian don't have version either.) |
I want chocolatey-archive/chocolatey#7 to be implemented in NuGet.
Scenario 1
There are quite a few different versions of
sqlite3.dll
. For example, there is the official version shipped by the SQLite team. There is also SQL Cipher which adds encryption capabilities. TheMicrosoft.Data.Sqlite
package could work with either of these packages.It would be great if
Microsoft.Data.Sqlite
could depend on a virtual package named something likeSQLite.Virtual
. This dependency would need to be satisfied at install time, but it could be satisfied by either theSQLite
orSQLCipher
package.Scenario 2
You could imagine a library that needs an
IJsonSerializer
, but doesn't care which one. They too could depend on a virtual package. The contract of the virtual package would be defined by the library. For example, they might useMEF
to import the serializer.The text was updated successfully, but these errors were encountered: