-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hook for excluding certain build output extensions from the nuget package #10690
Comments
Can't you override that property in a target before the PackTask is executed?
|
What happens to an existing project that set |
Oh I did misread the proposal above. I see 31 hits of that property being used in the dotnet org alone: https://github.com/search?q=org%3Adotnet+AllowedOutputExtensionsInPackageBuildOutputFolder&type=code. And about 3k on GitHub overall: https://github.com/search?q=AllowedOutputExtensionsInPackageBuildOutputFolder&type=code. |
I don't have many concerns. If you add a default value that is set conditionally, you could avoid breaking people that are using this to include extra files. <DefaultAllowedOutputExtensionsInPackageBuildOutputFolderCondition="'$(DefaultAllowedOutputExtensionsInPackageBuildOutputFolderCondition)' == ''">dll; .exe; .winmd; .json; .pri; .xml</DefaultAllowedOutputExtensionsInPackageBuildOutputFolderCondition>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(DefaultAllowedOutputExtensionsInPackageBuildOutputFolderCondition); $(AllowedOutputExtensionsInPackageBuildOutputFolder)</AllowedOutputExtensionsInPackageBuildOutputFolder> Maybe something less wordy :D |
Thanks @nkolev92, i will put up a pr for it. |
Currently there is no way to exclude certain output extensions from the package.
https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets#L48
adding something like should do the trick
cc @safern @nkolev92 @ericstj @ViktorHofer
The text was updated successfully, but these errors were encountered: