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

Microsoft.EntityFrameworkCore.Sqlite how to prevent all the runtime binaries from being emitted? #37147

Open
catmanjan opened this issue Nov 26, 2023 · 4 comments

Comments

@catmanjan
Copy link

Describe the bug

I've logged this here dotnet/efcore#32382

We have a project which only runs on windows x64 and uses Microsoft.EntityFrameworkCore.Sqlite

I notice in the bin folder there are sqlite dependencies for just about every computer on earth... How can we prevent these from being emitted?

and was asked to follow up with nuget team who then asked me to raise this with the sdk team

We use efcore in our project however we only target win-x64 environments, can nuget do something to allow efcore to only emit the architecture files needed for supported architectures.

To Reproduce

Build any dotnet project with a dependency on Microsoft.EntityFrameworkCore.Sqlite

@julealgon
Copy link

Folks, what's the status on this?

We have a deployment process today where we take the raw output of a msbuild command and I wanted to see if I could reduce the footprint of our deployment package by forcing a single RuntimeIdentifier to our projects, seeing as we only ever target Windows in x64 for now. We have a ton of dependencies that generate a runtime folder with several child folders for different architectures and I was hoping that setting this value in the project would cause those folders to go away and only contain a single win-x64 folder.

However, it appears that building doesn't take the RuntimeIdentifiers property into account at all: after building my project that has a value of win-x64, I still get all other architecture dependencies in my bin folder:

image

image

However, this is what I'd expect to see if the property was respected:
image

I understand that using publish does seem to trim down the files, but that's not currently available to us without a substantial change in our deployment pipeline.

@MiYanni MiYanni removed the untriaged Request triage from a team member label Feb 15, 2025
@MiYanni
Copy link
Member

MiYanni commented Feb 15, 2025

@catmanjan I think you would need to provide a http://aka.ms/binlog to investigate. As others have mentioned on all the associated issues you've made in other repos... its complicated. A binlog allows us to see who is outputting those folders and I can see why they are outputting them. Then, I might be able to give a suggestion on properties/items you could change in your project to no longer output them.

@catmanjan
Copy link
Author

@MiYanni
Copy link
Member

MiYanni commented Mar 5, 2025

@MiYanni here you go filebin.net/fu7koy5f0c8nhi12

@catmanjan I finally got around to catching up on some of my notifications and...

Image

😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants