Share via


This project references NuGet package(s) that are missing on this computer

Question

Thursday, September 6, 2018 10:56 PM

Hello!

I have a problem to compile my web application. I get this error:

Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=317567. JackpotCity C:\Users\Andreas\Documents\Visual Studio 2017\Projects\JackpotCity\JackpotCity.csproj 1461

I have openened this in Visual Studio 2017:

Tools >> Nuget Package Manager >> Package Manager Settings

Here I have checked both:

"Allow NuGet to download missing packages" and "Automatically check for missing packages during build in Visual Studio"

However I still get this error all the time. I don't know what I need to do to let Visual Studio 2017 download the missing packages?

Thank you!

All replies (5)

Wednesday, September 12, 2018 7:27 PM âś…Answered

Hi Sara,

I tried to create a new project and moved one file at a time and compiled each time I moved something. 

I think I perheps could have solved something in this way. It now compiles anyway and I will see if it works online soon.

I thank you for your help!


Friday, September 7, 2018 6:23 AM

Hi friend,

Welcome to the MSDN forum.

Have you tried to move the application files to another location? Please try to create a new web application and check if this issue persists or not.

Refer to the error message, please close this solution and edit the .csproj file and correct the relative path to the solution folder, please have a look at this similar issue.

If it not works, please share the detail error message and which file is missing? That will help us to analysis this issue.

Best regards,

Sara

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]


Friday, September 7, 2018 8:40 AM

Thanks for answer,

1. I tried to create a new webapplication and that did Build successfully!

2. I checked the thread you gave but are not sure how to change the .csproj file. I know that I had this solution(webapplication) on another computer before. I can see when I open the project the first time and try to build it that it tries to download nuget packages but then goes to show the error: This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them

References/Files missing: log4net, Microsoft.Threading.Tasks, Microsoft.Threading.Tasks.Extensions, Microsoft.Threading.Tasks.Extensions.Desktop, System.IO, System.Net.Http, System.Net.Http.Extensions, System.Net.Http.Primitives, System.Net.Http.WebRequest, System.Runtime, System.Threading.Tasks, Zlib.Portable

3. The below is my .csproj file. I can't see any relative path to the solution folder here? The path to my application is this one: C:\Users\Andreas\Documents\Visual Studio 2017\Projects\JackpotCity\JackpotCity.sln

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>false</UseIISExpress>
    <Use64BitIISExpress />
    <IISExpressSSLPort />
    <IISExpressAnonymousAuthentication />
    <IISExpressWindowsAuthentication />
    <IISExpressUseClassicPipelineMode />
    <UseGlobalApplicationHostFile />
  </PropertyGroup>
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <StartPageUrl>
          </StartPageUrl>
          <StartAction>CurrentPage</StartAction>
          <AspNetDebugging>True</AspNetDebugging>
          <SilverlightDebugging>False</SilverlightDebugging>
          <NativeDebugging>False</NativeDebugging>
          <SQLDebugging>False</SQLDebugging>
          <ExternalProgram>
          </ExternalProgram>
          <StartExternalURL>
          </StartExternalURL>
          <StartCmdLineArguments>
          </StartCmdLineArguments>
          <StartWorkingDirectory>
          </StartWorkingDirectory>
          <EnableENC>False</EnableENC>
          <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>

Monday, September 10, 2018 8:58 AM

Hi friend,

Thank you for your update.

Does those missing references are existing under the NuGet folder: C:\Users\Andreas\Documents\Visual Studio 2017\Projects\JackpotCity\packages? 

Please try to right click the 'Reference' under Solution and manually add those missing references or download it through the NuGet manager, see if it works or not.

Best regards,

Sara

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]


Friday, October 5, 2018 9:13 PM

In my case, I just had to delete packages folder in my local machine and build the solution.