I believe you need to use Runtime package store.
Starting with .NET Core 2.0, it's possible to package and deploy apps against a known set of packages that exist in the target environment. The benefits are faster deployments, lower disk space usage, and improved startup performance in some cases.
Refer: https://learn.microsoft.com/en-us/dotnet/core/deploying/runtime-store
Hope this helps.