---
title: "Building .NET While Offline Using the Local NuGet Cache"
url: https://daily.dev/posts/building-net-while-offline-using-the-local-nuget-cache-2xwjyeeky
source_url: https://nodogmablog.bryanhogan.net/2024/11/building-net-while-offline-using-the-local-nuget-cache
type: article
source: "No Dogma Blog (Bryan Hogan)"
published: 2026-05-31T07:46:25.606Z
updated: 2026-05-31T09:04:20.896Z
tags: [".net", "c#", "nuget"]
reading_time: 2
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building .NET While Offline Using the Local NuGet Cache

**[No Dogma Blog \(Bryan Hogan\)](https://daily.dev/sources/bryanhogan)** · 2 min read · 0 upvotes · 0 comments

## Summary

When building .NET applications offline, the dotnet restore and build commands don't automatically use locally cached NuGet packages. The workaround involves three steps: locating the local NuGet cache with `dotnet nuget locals all --list`, adding the global-packages directory as a NuGet source with `dotnet nuget add source`, and specifying an explicit package version when running `dotnet add package`. This allows developers to build .NET apps without an internet connection using previously downloaded packages.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nodogmablog.bryanhogan.net/2024/11/building-net-while-offline-using-the-local-nuget-cache>

## Similar posts on daily.dev

- [How to Test and Debug a NuGet Package Locally Before Publishing](https://daily.dev/posts/how-to-test-and-debug-a-nuget-package-locally-before-publishing-s6pdjk8od) · We Are .NET · 2 upvotes · 0 comments
- [Using and authoring .NET tools](https://daily.dev/posts/using-and-authoring-net-tools-mr9rhw4pr) · .NET Escapades · 15 upvotes · 2 comments
- [The Complete Guide to Creating NuGet Packages in .NET](https://daily.dev/posts/the-complete-guide-to-creating-nuget-packages-in-net-4carsceoo) · We Are .NET · 0 upvotes · 0 comments

---

Tags: [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#), [#nuget](https://daily.dev/tags/nuget)

[View this post on daily.dev](https://daily.dev/posts/building-net-while-offline-using-the-local-nuget-cache-2xwjyeeky)
