-
Notifications
You must be signed in to change notification settings - Fork 965
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
Getting only needed resources on nuget install #59
Comments
Is this related to the large number of potentially unnecessary resource.dll files being added by Humanizer? It's made my bin directory a bit of a mess and clients are asking why so many separate DLLs are needed? |
Correct. This is going to be a breaking change to implement; so we're leaving it for V2. In the meantime, the only way to get a clean output folder is to delete the resources after build. |
For what it's worth, I'd like to see the languages separated as separate localization packages too. |
A workaround for this issue is to add the following to your pre-build event.
The encoded characters are correct. Double Quote and Ampersand have to be XML Escaped inside of the |
Question for everyone asking to split this out -- what's really driving this? I just checked and the localization files are about 325 KB...overall, not huge. The benefit of the current approach is that "it just works" for all downstream consumers. If you create a library that uses Humanizer, which language dependencies would you choose? Do you force that choice on your consumers who might not know that there are localization packages available? I guess I'm partially trying to understand what the concern or care is about, what's driving it? |
We're a corporate software shop. We cater to US clients that speak ubiquitiusly english. My build engineers freak out whenever a new DLL shows up in the BIN directory for the asp.net app, much less 38 new folders. These folders aren't needed, at all for our scenario which caters exclusively to english, which is already the assembly neutral language. While you're right, the overall size of files is 325 KB, the number of extra files/folders is excessive. |
Okay, so I'm thinking that the NuGet localization strategy would work. MyGet may have support for this already too. I don't think it'll make the cut for 2.0 beta 1 but hopefully should be fairly soon after. |
So here's a question re the structure. I was going to have a "meta-package" that includes all of the locales for convenience. This would be essentially v1 behavior. The question is which should be the "default"? I.e., should the The alternative is that Thoughts? FWIW, I'm leaning towards the non-breaking change, making Humanizer a meta package and moving the implementation into the Humanizer.Core package. |
Non-breaking change sounds good. GFI |
Is there a non Core sub-library of humanizer? Why add the name core? Another option would be to add a targets file to the distribution that would support keeping the satellite resource directories you want to include, and deleting the ones you dont. That would allow you to always have a single package, and allow users to customize which localiztion packages they want... |
So NuGet has very specific naming conventions for doing "the right thing" with packages containing just satellite assemblies. They have to be in the form That said, if you want them all, you can also take the main package which is a meta-package now. The idea of a meta-package is that it contains no files itself but just pulls in other packages. In this way, we can have the following split (and the naming is just for the packages, nothing has changed in the library itself):
Make sense? |
@onovotny thank you for the fantastic explanation. I agree that this sounds like a viable solution and meets my needs. Where did you read about this convention? http://docs.nuget.org/create/creating-localized-packages doesn't describe what you just specified. |
@jeremysimmons: it's in that link under the "Satellite Package Approach". For the purposes of the convention, |
@onovotny Unless I am missing it, Satellite Package Approach doesn't specify the naming convention that includes the |
No, you're correct. That |
@onovotny the naming convention was the only point I was questioning, and simply from a learning perspective to understand where the community had documented that convention. Are there other packages that use this convention that you're aware of? |
I'm honestly not sure. It's hard to search for meta packages to see how they're named. I can say that Rx uses Rx-Main, for example, to pull in five other packages. Microsoft.OData.Core exists and pulls In a couple others. Micrososoft.OData.Client pulls in Core and adds to it. My hope was that by keeping the main Humanizer "as-is", that it'd minimize disruption. These docs definitely need updating to describe the packages before release. |
Update 1 for VS 2015 contains the fixes for UWP support for the localized packages. This has been merged and pushed to the CI MyGet feed:
The The main Humanizer package does pull in a lot of packages into |
Closing this thread out but please open new issue threads if you discover issues when testing the new packages. Thanks! |
hard to contain the joy. THANK YOU! |
@onovotny Are the individual Humanizer.Core packages going to be published on nuget.org? Or is there some other way I'm missing to get them? |
@i3arnon I imagine they will publish to Nuget when it's a stable package. Currently they are pre-release. Add the myget.org feed to your nuget feeds, and then you should be able to search for the package. This documentation on the official nuget package manager extension for visual studio may help you https://docs.nuget.org/create/hosting-your-own-nuget-feeds#creating-remote-feeds |
i have installed all packages but how do i specify which language to use? |
how can I use arabic language in Humanizer |
I guess this answers the question: #1002 (comment) |
I was experiencing this issue, the problem was that I was calling |
@hmemcpy raised a valid concern:
NuGet supports two localization approach: single & satellite localized packages. Humanizer currently uses single localized package & I don't think it's possible to achieve this in this mode.
I think it's a good idea to switch to satellite packages even though it's a breaking change for this and other benefits.
To Do:
The text was updated successfully, but these errors were encountered: