Skip to content

LIB016 error when using fileMappings #792

@Matthew-Ricks-USBE

Description

@Matthew-Ricks-USBE

Describe the bug

Libraries with corresponding files generate LIB016 error despite fileMappings picking unique files. Seems to only apply to jsdelivr and unpkg providers.

To Reproduce

Steps to reproduce the behavior:

  1. Visual Studio 17.12.4, classic .NET Framework project has NuGet package Microsoft.Web.LibraryManager.Build version 3.0.71.
  2. Use this libman.json:
{
  "version": "3.0",
  "defaultProvider": "unpkg",
  "defaultDestination": "Scripts/",
  "libraries": [
    {
      "library": "jquery-visible@1.2.0",
      "files": [],
      "fileMappings": [
        {
          "files": [
            "jquery.visible.min.js"
          ]
        }
      ]
    },
    {
      "library": "jquery.toaster@1.2.0",
      "files": [],
      "fileMappings": [
        {
          "files": [
            "jquery.toaster.js"
          ]
        }
      ]
    }
  ]
}
  1. Pair of LIB016 errors for unincluded files are generated.

Expected behavior

The mapped files are placed successfully--no other files--and no errors are generated during build/restore.

Additional context

Originally I was using cdnjs for the jquery-visible library, which all works fine locally, but it's been failing more often than not on my build server--LIB002, but it's clearly available on cdnjs--so tried to switch providers only to run into this issue.

Switching jquery-visible to the jsdelivr provider produces the same LIB016 error(s), so there's some sort of overlap between jsdelivr and unpkg that doesn't include/affect the cdnjs provider.

Using files rather than fileMappings avoids the issue, but then libman messes with my .NET Framework csproj, and I'd rather it didn't do that. I don't think there'd be an issue in SDK projects, but upgrading is currently out of scope.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions