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
First let me preface this by thanking you for this awesome work. I was somewhat doing a much poorer implementation of your solution before I found your package, deleting all that ugly stuff was a relief ❤️
Is the feature request related to a problem
I'm making a package to ease up my configuration across for all my project, much like your ProjectDefaults and I want to include a reference to Polyfill. While this project is a development dependency that is not supposed to flow as an indirect reference, it is actually possible to include it by removing the PrivateAssets="all" of the PackageReference. I'm doing this to automatically include a collection of analyzer packages for exemple.
Describe the solution
The issue is that the targets file of Polyfill does not flow as an indirect dependencies because it's not present in a buildTransitive folder of the nuget (more info here) just in case). Doing so, while kind of unnatural for a development dependency (hence why I am requesting your opinion here), is quite an easy fix by adding <file src="Polyfill.targets" target="buildTransitive"/> to the nuspec.
Describe alternatives considered
Currently I am repacking your code files into my own package like so
<!-- fix for Polyfill transitive reference -->
<ImportProject="$(MSBuildThisFileDirectory)Polyfill.targets"Condition="Exists('$(MSBuildThisFileDirectory)Polyfill.targets')"/>
<ItemGroup>
<CompileUpdate="@(Compile)">
<VisibleCondition="'%(NuGetItemType)' == 'Compile' and '%(NuGetPackageId)' == 'DefaultCSharp'">false</Visible>
</Compile>
</ItemGroup>
This works fine but obviously I would prefer for your project to be a proper dependency instead of hiding it like so, more people who are stuck supporting multiple targets should know about it :).
Additional context
My full project is here for completeness, again thank you for this.
The text was updated successfully, but these errors were encountered:
Since your package is declared as a development dependency it should be added by default with PrivateAssets="All" which prevent its transitive inclusion. You have to explicitly remove that for the reference to flow, which nobody should do (except me because I like going against the flow).
Again my usage is definitely not conventional so I would totally understand you not making this change.
First let me preface this by thanking you for this awesome work. I was somewhat doing a much poorer implementation of your solution before I found your package, deleting all that ugly stuff was a relief ❤️
Is the feature request related to a problem
I'm making a package to ease up my configuration across for all my project, much like your
ProjectDefaults
and I want to include a reference toPolyfill
. While this project is a development dependency that is not supposed to flow as an indirect reference, it is actually possible to include it by removing thePrivateAssets="all"
of thePackageReference
. I'm doing this to automatically include a collection of analyzer packages for exemple.Describe the solution
The issue is that the targets file of
Polyfill
does not flow as an indirect dependencies because it's not present in abuildTransitive
folder of the nuget (more info here) just in case). Doing so, while kind of unnatural for a development dependency (hence why I am requesting your opinion here), is quite an easy fix by adding<file src="Polyfill.targets" target="buildTransitive"/>
to the nuspec.Describe alternatives considered
Currently I am repacking your code files into my own package like so
and in the targets file of my own package
This works fine but obviously I would prefer for your project to be a proper dependency instead of hiding it like so, more people who are stuck supporting multiple targets should know about it :).
Additional context
My full project is here for completeness, again thank you for this.
The text was updated successfully, but these errors were encountered: