Search code examples
visual-studionugetnuget-packagenuspec

Nuget Package Manager not displaying package info in VS2019


My NuGet package "MyTestPackage" is installed in a C# project in Visual Studio 2019. When I view it via the NuGet Package Manager, it does not display the package info in the pane on the right.

I have included screenshots of my package and a package that properly displays the package info in the right pane.

How should I create my package such that the package info displays properly?


MyTestPackage.nuspec file:

<?xml version="1.0" encoding="utf-8"?>
<package >
  <metadata>
    <id>MyTestPackage</id>
    <version>1.0.0</version>
    <authors>Ben</authors>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <license type="expression">MIT</license>
    <projectUrl>http://project_url_here_or_delete_this_line/</projectUrl>
    <iconUrl>http://icon_url_here_or_delete_this_line/</iconUrl>
    <description>Package description</description>
    <releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
    <copyright>$copyright$</copyright>
    <tags>Tag1 Tag2</tags>
    <dependencies>
      <group targetFramework=".NETStandard2.1">
        <dependency id="SampleDependency" version="1.0.0" />
      </group>
    </dependencies>
  </metadata>
</package>

I create my package by calling:

nuget pack MyTestPackage.nuspec

Properly displayed package info: Package that properly displays



My package:

My package


Solution

  • All I had to do was change the "Package Source" to either "All" or "local".

    I still don't understand why the package source would affect displaying the package info. 🤷‍♂️