You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Projects that add a reference to Endjin.RecommendedPractices automatically pick up references to a couple of development-only packages. But we're using an unsupported mechanism to achieve this.
Development-only references are, by definition, not transitive. This makes it tricky to create a NuGet package that causes anything depending on it to pickup references to development-only references. If our package simply has a reference to a development-only package, that will not be picked up transitively by anything using our package.
In general, that's the point of development-only packages. However we do in fact want these references to be pushed out exactly one level deep.
Currently, we achieve this by meddling with the <PackageReference> item group in the .props file this package injects into the build process. However, the docs tell you explicitly not to do this:
@MikeEvansLarah suggested that if the nuspec refers to the relevant dev-only packages, that these might be picked up by anything depending directly on Endjin.RecommendedPractices, without them also being pushed out to indirect dependents. We should see if that works because it would enable us to avoid doing a thing the docs tell you not to, and it might also work better with NuGet tooling - currently, projects using Endjin.RecommendedPractices get suggestions from the NuGet package manager to update these refs, and if a developer accepts that, it messes things up. Also, if this mechanism works, it's possible that dependabot will start offering to update this project appropriate. (Currently, it doesn't understand what we're doing.)
The text was updated successfully, but these errors were encountered:
Projects that add a reference to
Endjin.RecommendedPractices
automatically pick up references to a couple of development-only packages. But we're using an unsupported mechanism to achieve this.Development-only references are, by definition, not transitive. This makes it tricky to create a NuGet package that causes anything depending on it to pickup references to development-only references. If our package simply has a reference to a development-only package, that will not be picked up transitively by anything using our package.
In general, that's the point of development-only packages. However we do in fact want these references to be pushed out exactly one level deep.
Currently, we achieve this by meddling with the
<PackageReference>
item group in the.props
file this package injects into the build process. However, the docs tell you explicitly not to do this:https://learn.microsoft.com/en-us/nuget/concepts/msbuild-props-and-targets#guidance-for-the-content-of-msbuild-props-and-targets
@MikeEvansLarah suggested that if the
nuspec
refers to the relevant dev-only packages, that these might be picked up by anything depending directly onEndjin.RecommendedPractices
, without them also being pushed out to indirect dependents. We should see if that works because it would enable us to avoid doing a thing the docs tell you not to, and it might also work better with NuGet tooling - currently, projects usingEndjin.RecommendedPractices
get suggestions from the NuGet package manager to update these refs, and if a developer accepts that, it messes things up. Also, if this mechanism works, it's possible that dependabot will start offering to update this project appropriate. (Currently, it doesn't understand what we're doing.)The text was updated successfully, but these errors were encountered: