← Back to archive
Programming Notes

Fix for ASP.NET Core Not Loading NUGET_PACKAGES Correctly on Linux

When ASP.NET Core encounters the Error "path1 cannot be null" at runtime, it is related to NUGET_PACKAGES; environment variables can be added.

env=NUGET_PACKAGES=/root/.nuget/packages

env=NUGET_HTTP_CACHE_PATH=/root/.local/share/NuGet/v3-cache

Written by Master Sanfu on July 21, 2017. Please credit the source if you share.

Translation Notice: This English version was translated with AI assistance. Specialized, historical, religious, or culturally sensitive terms may contain nuances, inaccuracies, or debatable wording. In case of ambiguity or discrepancy, the original Chinese text shall prevail.