Skip to content
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

How do I ignore satellite assembly when publishing? #8359

Open
Nirmal4G opened this issue Jul 20, 2019 · 6 comments
Open

How do I ignore satellite assembly when publishing? #8359

Nirmal4G opened this issue Jul 20, 2019 · 6 comments
Labels
Functionality:Restore Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Style:PackageReference Type:Feature

Comments

@Nirmal4G
Copy link

Nirmal4G commented Jul 20, 2019

From: NuGet/docs.microsoft.com-nuget#1549

I want to reduce the my size of my published project. For local testing, I don't need all the language specific resources, just the neutral version is more than enough. I also test them manually by removing and adding language specific resources when the project is running!

So, How do I ignore the language folders from NuGet PackageReference?

edit by @nkolev92

Related to #5986

@Nirmal4G
Copy link
Author

There are no options for excluding resources in *Assets metadata on Framework/Project/PackageReference.

In addition to existing options (like compile, runtime, etc...), I would like a resource option, that can handle resources.

@heng-liu
Copy link
Contributor

Hi, thanks for reporting this issue!
Do you mean for now, you put localized resource assemblies in a single package? If yes, have you tried to use localized satellite packages ?

@heng-liu heng-liu added the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Jul 22, 2019
@Nirmal4G
Copy link
Author

No, it's how I consume a single/meta package with satellite dlls.

For e.g. If you put ExcludeAssets="Runtime" the runtime assets (native folder) from the referenced package, will be excluded from the projects' restore deps graph. But there is no option for resources!

@heng-liu
Copy link
Contributor

Will using localized satellite packages solve your problem? It will separate localized resources and IntelliSense XML files into satellite packages. You may check the two different approaches here: https://docs.microsoft.com/en-us/nuget/create-packages/creating-localized-packages

@Nirmal4G
Copy link
Author

Nirmal4G commented Jul 24, 2019

I think you misunderstood my problem.

I'm not the one creating those packages, @microsoft is. So, If they separate resources in to different packages, then, yes, that would solve my problem.

Roslyn team have packages with Microsoft.CodeAnalysis* ID. Those package have satellite assemblies within a single package, not following the guideline you mentioned above and as do so many other packages.

My issue comes down to this, Would you guys change your packaging style just for me and few others? NO.

We can currently include and exclude specific asset types in PackageReference through IncludeAssets, PrivateAssets, ExcludeAssets. They have compile, runtime, build, content, etc... but no resource type for satellite assemblies.

I have no need for other languages in my test deployment. So I want to exclude all the resources, that I produce and the resources that I get from the packages. How do I do that?

@heng-liu heng-liu added Triage:Investigate and removed WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Jul 25, 2019
@nkolev92 nkolev92 added Type:Feature Functionality:Restore Style:PackageReference Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Triage:Investigate labels Apr 27, 2020
@ImrePyhvel
Copy link

The issue is still relevant.

I do want my own satellite assemblies to be included for localization, but I need to exclude SOME satellite assemblies from dependencies, for example from https://www.nuget.org/packages/Microsoft.Data.SqlClient which packs in additional 10x 250KB files. My app has nothing to do with most languages forced on me (chinese, korean, whatnot.. ), nor do I want technical error messages in our logs to be in languages the support team does not understand. I do not want localization for this specific dependency.

Yes, it should be thought of by package authors, but it would be naive to hope every author would and packages in the wild prove they don't. Hence package consumers should have the option to choose which resources to include on build with greater control and exclude all sattellite assemblies when needed.

It would be sufficient if we were able to exclude explicit assets by path. This way nuget would not have to know about the concept of "satellite assemblies".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Restore Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Style:PackageReference Type:Feature
Projects
None yet
Development

No branches or pull requests

5 participants