Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM UI: NullReferenceException when signature validation fails #10042

Closed
dtivel opened this issue Sep 17, 2020 · 0 comments · Fixed by NuGet/NuGet.Client#3672
Closed

PM UI: NullReferenceException when signature validation fails #10042

dtivel opened this issue Sep 17, 2020 · 0 comments · Fixed by NuGet/NuGet.Client#3672
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:VisualStudioUI Product:VS.Client Type:Bug

Comments

@dtivel
Copy link
Contributor

dtivel commented Sep 17, 2020

  1. Create a new test certificate .\CreateTestCertificate.ps1 –AddAsTrustedRootAuthority.
  2. Sign a package: NuGet.exe sign <PackageFilePath> -CertificatePath <PfxFilePath>.
  3. Create a project.
  4. Add a NuGet.config file to the solution with the following content:
<configuration>
    <config>
        <add key="signatureValidationMode" value="require" />
    </config>
</configuration>
  1. Save, close, and reopen the solution.
  2. Open NuGet PM UI.
  3. Add a package source for the directory containing the package signed in step 2.
  4. Attempt to install that package.

Result:

System.NullReferenceException: Object reference not set to an instance of an object.
at NuGet.PackageManagement.UI.dll!NuGet.PackageManagement.UI.NuGetUI.ProcessSignatureIssues(NuGet.Packaging.Signing.SignatureException ex)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:ErrorHandling warnings and errors/log messages & related error codes. Functionality:VisualStudioUI Product:VS.Client Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants