-
Notifications
You must be signed in to change notification settings - Fork 224
Clean up rules around what is a valid dependency version in the project.json file #438
Comments
We should update the project templates to have a version number in the project.json when creating a new project. Do it. Do it now! |
New set of rules: Dependencies can have a specific type or by "any". Within the specific type certain fallback orders are allowed: Project -> [] Any means the dependency can come from Package or Project (Framework/GAC/SDK are specially declared in their own section). We need a generic way of specifying the type of dependency (type is already taken to mean things like dev, build and shouldn't be confused with this). {
"dependencies": {
"A": "1.0.0"
}
} A is of type any. If it's not a project then it will be considered a package and search for in the configured feeds when restoring. {
"dependencies": {
"A" : { "target": "project" }
}
} {
"dependencies": {
"A" : { "version": "1.0.0-*", "target": "package" }
}
} |
Current decision from the design meeting: {
"dependencies": {
"A": "1.0.0-*",
"B" : { "version": "1.0.0-*", "target": "package" },
"ClassLibrary12" : { "target": "project" },
"ClassLibrary34" : { "target": "project" }
}
} |
Targets can be used to restrict a dependency so that it can only be satisfied by a particular type of library.
Targets can be used to restrict a dependency so that it can only be satisfied by a particular type of library.
Targets can be used to restrict a dependency so that it can only be satisfied by a particular type of library.
Targets can be used to restrict a dependency so that it can only be satisfied by a particular type of library.
Targets can be used to restrict a dependency so that it can only be satisfied by a particular type of library.
The current rules are too fuzzy and need to be more clearly defined. Today we have 3 kinds of references:
Today we allow
""
for project dependencies since versions don't matter for projects. We also allow it for SDK references so you don't have to know what version System.Data actually is. This leads to ambiguity so we're going to stop allowing empty versions:ClassLibrary1 - This is an example of a project reference. The version is ignored completely for source references. Whatever version of the source you have as project reference will be used.
System.Data - This is an SDK reference for .NET 4.5, if there's no version 4.0.0.0 on this platform this will be an error
Newtonsoft.Json - This is a package reference
The text was updated successfully, but these errors were encountered: