Closed sayedihashimi closed 2 years ago
@sayedihashimi I checked your package - in your case the following property was missing:
<ContentTargetFolders>content</ContentTargetFolders>
I will check other packages - likely the same issue.
It's present in the doc, so nothing to fix there.
SpecFlow.Templates.DotNet
has a different issue causing the content to appear twice, other templates have the same issue with having no <ContentTargetFolders>content</ContentTargetFolders>
defined.
Inform those authors on how to fix their templates.
Thanks @vlada-shubina, not sure how I missed that. I have added an issue to track adding validation to ensure duplicate content isn't in a template .nupkg https://github.com/sayedihashimi/template-sample/issues/48.
After following the steps at https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates#packing-a-template-into-a-nuget-package-nupkg-file my template nuget package has the content duplicated in the nuget package.
There is a
content
and andcontentFiles
folder in the .nupkg which has the same files. I played around with the csproj for a few min to see what is going on but didn't have time to fully investigate.The code for my template is at https://github.com/sayedihashimi/sayedha.templates.
I also found the following nuget packages which I believe suffer from the same issue.
Can we get the doc updated so that it doesn't duplicate the content in the generated nupkg file? After we should reach out to these template authors to fix their nuget packages as well.