简体   繁体   中英

How to deploy third party nuget packages (dependencies) globally to the server in .NET Core?

I have this application that depends on WindowsAzure.Storage nuget package . On my local machine everything works fine. Yet when I deploy it to the server it complains that:

An assembly specified in the application dependencies manifest (ProjectName.deps.json) was not found: package: 'Microsoft.WindowsAzure.ConfigurationManager', version: '3.2.3'
path: 'lib/net40/Microsoft.WindowsAzure.Configuration.dll'

Well, it makes sense, because I have not taken this package on the server.

I know I can use SCD via runtime identifiers to have all required assemblies being deployed to the server. But that needs more disk space, because I have more applications to deploy ahead.

How can I install that package globally in the server, so that all deployed applications would find the required assemblies?

You can use a runtime package store. The steps here should get you set up.

https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM