none
NuGet Package is not detected even though the files are existing

    Question

  • I've been stuck in this error for 2 days now. I tried repairing VS 2015 Enterprise Edition with update 3, deleted the packages and restoring them via NuGet Restore, and I removed the reference of the package in the project but still, the problem persists.

    Here's the error code:

    Severity Code Description Project File Line Suppression State
    Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\packages\StyleCopPlus.MSBuild.4.7.49.5\build\StyleCopPlus.MSBuild.props. PrecisionLibraryPortable D:\Codes\VSTS\PST\Precision Engine\PrecisionLibraryPortable\PrecisionLibraryPortable.csproj 186


    I confirm that the file that it says missing is in the correct directory. I've attached here a screenshot and some from the Build Output window result. I hope these could help diagnose the problem. Thank you.

    1>Building with tools version "14.0".
    1>Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="14.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=293424.
    
    
    1>Target "AssignLinkMetadata" skipped, due to false condition; ( '$(SynthesizeLinkMetadata)' == 'true' ) was evaluated as ( '' == 'true' ).
    1>Target "EnsureNuGetPackageBuildImports: (TargetId:9)" in project "D:\Codes\VSTS\PST\Precision Engine\PrecisionLibraryPortable\PrecisionLibraryPortable.csproj" (target "PrepareForBuild" depends on it):
    1>Set Property: ErrorText=This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
    1>Using "Error" task from assembly "Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    1>Task "Error" (TaskId:5)
    1>  Task Parameter:Text=This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\packages\StyleCopPlus.MSBuild.4.7.49.5\build\StyleCopPlus.MSBuild.props. (TaskId:5)
    1>D:\Codes\VSTS\PST\Precision Engine\PrecisionLibraryPortable\PrecisionLibraryPortable.csproj(186,5): error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\packages\StyleCopPlus.MSBuild.4.7.49.5\build\StyleCopPlus.MSBuild.props.
    1>Done executing task "Error" -- FAILED. (TaskId:5)
    

    Thursday, November 3, 2016 5:40 AM

All replies

  • Hi Paulo R. Flores,

    First, please check your NuGet Package Manger version, the latest version should be 3.5. If not, please download and install the latest version from below link.

    https://dist.nuget.org/index.html

    Then please create a new project and install the same NuGet package and build it to check whether it also has the same issue in the new project.

    If the new project working fine, this issue should related to that specific project. Please move the original project files to a new project one by one and build the new project.

    If the new project also has this issue, please try with following steps to troubleshoot this issue.

    1. Check the permissions for packages folder, whether it has enough permissions to do any operations.
    2. Clear Visual Studio caches under path "C:\Users\username\AppData".
    3. Delete the packages folder to clear the NuGet packages caches and clean the project.

    Best Regards,
    Weiwei


    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 MSDNFSF@microsoft.com.


    Friday, November 4, 2016 9:45 AM
    Moderator