Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 972 Bytes

File metadata and controls

47 lines (36 loc) · 972 Bytes
title description author ms.date ms.topic ms.reviewer f1_keywords
NuGet Error NU5030
NU5030 Error code
nkolev92
11/15/2018
reference
karann
NU5030

NuGet Error NU5030

The license file 'LICENSE.txt' does not exist in the package.

Issue

The license file is referenced in the metadata with either PackageLicenseFile in the csproj or the license element in the nuspec, but the file itself was not included in the expected location within the package.

Solution

Include the file in the package, for example:

If pack with the targets:

<PropertyGroup>
    <PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
</PropertyGroup>

<ItemGroup>
    <None Include="licenses\LICENSE.txt" Pack="true" PackagePath="" />
</ItemGroup>

If packing with a nuspec:

<package>
  <metadata>
    <license type="file">LICENSE.txt</license>
  </metadata>
  <files>
      <file src="licenses\LICENSE.txt" target="" />
  </files>
</package>