Why can't I build this app at work, but I can at home?

Falanga, Rod, DOH 245 Reputation points
2025-03-11T14:12:28.7133333+00:00

At work I was trying to build a Blazor app that a colleague had written. It refused to work.

So, when I got home last night, I tried a simpler Blazor app. It built perfectly at home. So, I then added my work account as a contributor to my personal GitHub account at home.

This morning, I accepted the invitation I sent to myself from my personal GitHub account. I cloned the repo, then got into VS 2022, and tried to build the simple Blazor app. It failed with these errors:

Unable to find package Microsoft.NET.Sdk.WebAssembly.Pack. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages Unable to find package Microsoft.AspNetCore.Components.WebAssembly. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages Unable to find package Microsoft.NET.ILLink.Tasks. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages Unable to find package Microsoft.NETCore.App.Runtime.Mono.browser-wasm. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages Unable to find package Microsoft.AspNetCore.Components.WebAssembly.Server. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages Unable to find package Radzen.Blazor. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages Unable to find package Microsoft.AspNetCore.Components.WebAssembly. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages

Why am I unable to build the app at work, but I can easily build it at home?

Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,112 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dou Xu-MSFT 400 Reputation points Microsoft External Staff
    2025-03-12T02:20:57.2466667+00:00

    Hello Falanga, Rod, DOH,

    Welcome to Microsoft Q&A forum.

    From looking at your error message,

    No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages

    Looks like these packages are missing from the source provided in your Nuget.config file at work.(Usually located at=>C:\Users\your user name\AppData\Roaming\NuGet)

    Please try the followings:

    1.Make sure you have the official NuGet package reference in the NuGet.config file. You can add it by going to Tools -> NuGet Package Manager -> Package Manager Settings, selecting Package Sources, and adding https://api.nuget.org/v3/index.json if it's not already there.

    enter image description here

    You can also run the command to list all configured NuGet sources configured in your work machine.

    dotnet nuget list source
    

    2.Click on "Clear All Nuget Cache(s)" via Tools->Options->Nuget Package Manger->General

    Then select Allow Nuget to download missing packages or run dotnet restore to install missing packages. enter image description here

    Best Regards,

    Dou


    If the answer is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.