Allow reading PackageType from LockFile after restore #12934
Labels
Functionality:Restore
Priority:3
Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.
Type:Feature
NuGet Product(s) Involved
NuGet SDK
The Elevator Pitch
We're currently able to define custom package types for packages. We can search for those packages using the NuGet rest API, but from a C# project perspective they are just normal dependencies.
Documentation suggests we should write a custom tool to deal with those custom package types.
I'm currently investigating the option to use a custom package type to mark plugin packages for Stride with name
StridePlugin
. We use MSBuild to perform package restore on user's solution and then parse and read theproject.assets.json
usingLockFileFormat
. DespitePackageType
property existing on theLockFileTargetLibrary
it is not being populated within the lock file nor is it attempted to be read here:https://github.com/NuGet/NuGet.Client/blob/67959d51c158942cdfc2aa5e14e37429931e6579/src/NuGet.Core/NuGet.ProjectModel/LockFile/LockFileFormat.cs#L507
Additional Context and Details
To provide a little more context - a Stride user references runtime dependencies in their project. If a library they reference requires a build time plugin we want to be able to read that from it's list of dependencies, detect which dependency is a plugin and load it.
Stride plugins may have a different target framework and would reference design/build time assemblies which the user wouldn't want to be included with their output - thus plugins need to be distinguishable and likely used in conjecture with
developmentDependency
.The text was updated successfully, but these errors were encountered: