+
+ +
+
+

+ @Html.BreakWord(Model.Id) + @Model.Version + + @if (Model.IsVerified.HasValue && Model.IsVerified.Value) + { + + } +

+ +
+ + @if (!Model.Deleted && !String.IsNullOrWhiteSpace(Model.Description)) + { +

@Html.PreFormattedText(Model.Description, Config)

+ } + + @if (Model.Validating) + { + @ViewHelpers.AlertWarning( + @ + This package has not been published yet. It will appear in search results and + will be available for install/restore after both validation and indexing are complete. Package + validation and indexing may take up to an hour. Read more. + + ) + if (Model.EmbeddedLicenseType != EmbeddedLicenseFileType.Absent) + { + @ViewHelpers.AlertWarning( + @ + The license link will become available once package validation has completed successfully. + + ) + } + + if (Model.ValidatingTooLong) + { + @ViewHelpers.AlertWarning( + @ + Package validation is taking longer than expected. This is not normal, but we are on it! + + ) + } + } + + @if (Model.FailedValidation) + { + @ViewHelpers.AlertDanger( + @ + Package publishing failed. This package could not be published due to the following reason(s): +
    + @foreach (var issue in Model.PackageValidationIssues) + { +
  • @Html.Partial("_ValidationIssue", issue)
  • + } +
+ @if (!Model.PackageValidationIssues.Any(i => i.IssueCode == ValidationIssueCode.Unknown)) + { + var issuePluralString = Model.PackageValidationIssues.Count > 1 ? "all the issues" : "the issue"; + Once you've fixed @issuePluralString with your package, you can reupload it with the same ID and version. + } + else + { + Please contact support@nuget.org to help fix your package. + } +
) + } + + @if (Model.Deleted) + { + @ViewHelpers.AlertDanger( + @ + This package has been deleted from the gallery. It is no longer available + for install/restore. + + ) + } + + @if (Model.IsPackageVulnerabilitiesEnabled && Model.Vulnerabilities != null) + { + @Html.Partial("_DisplayPackageVulnerabilities") + } + + @if (Model.IsPackageDeprecationEnabled && Model.DeprecationStatus != PackageDeprecationStatus.NotDeprecated) + { + @Html.Partial("_DisplayPackageDeprecation") + } + + @if (Model.IsPackageRenamesEnabled && Model.PackageRenames != null && Model.PackageRenames.Count != 0) + { + @Html.Partial("_DisplayPackageRenames") + } + + @if (Model.Prerelease) + { + @ViewHelpers.AlertInfo( + @ + This is a prerelease version of @(Model.Id). + + ) + } + @if (Model.NuGetVersion.HasMetadata) + { + @ViewHelpers.AlertInfo( + @ + This package has a SemVer 2.0.0 package version: @(Model.FullVersion). + + ) + } + @if (Model.VersionRequestedWasNotFound) + { + @ViewHelpers.AlertWarning( + @ + The specified version @Model.VersionRequested was not found. You have been taken to version @(Model.Version). + + ) + } + @if (Model.HasNewerRelease) + { + @ViewHelpers.AlertInfo( + @ + There is a newer version of this package available. +
See the version list below for details. +
+ ) + } + else if (Model.HasNewerPrerelease) + { + @ViewHelpers.AlertInfo( + @ + There is a newer prerelease version of this package available. +
See the version list below for details. +
+ ) + } + + @if (Model.Listed && Model.IsIndexed.HasValue && !Model.IsIndexed.Value && Model.Available) + { + @ViewHelpers.AlertWarning( + @ + This package has not been indexed yet. It will appear in search results + and will be available for install/restore after indexing is complete. + + ) + } + + @if (Model.HasEmbeddedIcon && Model.IsIndexed.HasValue && !Model.IsIndexed.Value && (Model.Available || Model.Validating)) + { + @ViewHelpers.AlertWarning( + @ + The package icon will become available after this package is indexed. + + ) + } + + @if (Model.CanDisplayPrivateMetadata && showSymbolsPackageStatus) + { + if (Model.LatestSymbolsPackage.StatusKey == PackageStatus.Validating) + { + @ViewHelpers.AlertWarning( + @ + The symbols for this package have not been indexed yet. They are not available + for download from the NuGet.org symbol server. Symbols will be available for download after both validation and indexing are complete. + Symbols validation and indexing may take up to an hour. Read more. + + @AppendAvailableSymbolsMessage(hasSymbolsPackageAvailable) + + ) + } + else if (Model.LatestSymbolsPackage.StatusKey == PackageStatus.FailedValidation) + { + @ViewHelpers.AlertDanger( + @ + Symbols package publishing failed. The associated symbols package could not be published due to the following reason(s): +
    + @foreach (var issue in Model.SymbolsPackageValidationIssues) + { +
  • @Html.Partial("_ValidationIssue", issue)
  • + } +
+ @if (!Model.SymbolsPackageValidationIssues.Any(i => i.IssueCode == ValidationIssueCode.Unknown)) + { + var issuePluralString = Model.SymbolsPackageValidationIssues.Count() > 1 ? "all the issues" : "the issue"; + Once you've fixed @issuePluralString with your symbols package, you can re-upload it. + } + else + { + Please contact support@nuget.org to help fix your symbols package. + } + + @AppendAvailableSymbolsMessage(hasSymbolsPackageAvailable) +
) + } + } + + @if (!Model.Listed && Model.Available) + { + if (Model.CanDisplayPrivateMetadata) + { + @ViewHelpers.AlertWarning( + @ + This package is unlisted and hidden from package listings. + You can see the package because you are one of its owners. To list the package again, + change its listing setting. + + ) + } + else + { + @ViewHelpers.AlertWarning( + @ + The owner has unlisted this package. + This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore. + + ) + } + } + + @if (!Model.Deleted && !String.IsNullOrEmpty(Model.MinClientVersion)) + { +

Requires NuGet @Model.MinClientVersion or higher.

+ } + + @if (Model.Available) + { +
+ +
+ @{ firstPackageManager = true; } + @foreach (var packageManager in packageManagers) + { + @CommandPanel(packageManager, active: firstPackageManager) + + firstPackageManager = false; + } +
+
+ } + + @if (!Model.Deleted) + { + if (Model.ReadMeHtml != null) + { + +
+ @if (Model.ReadMeImagesRewritten && Model.CanDisplayPrivateMetadata) + { + @ViewHelpers.AlertWarning(@This documentation had some images automatically rewritten to use secure links and may be broken.); + } + + @if (Model.ReadmeImageSourceDisallowed && Model.CanDisplayPrivateMetadata) + { + @ViewHelpers.AlertWarning(@Some images are not displayed as they are not from trusted domains.); + } +
+ @Html.Raw(Model.ReadMeHtml) +
+
+ @Html.Raw(Model.ReadMeHtml) +
+ + +
+ } + + if (!String.IsNullOrWhiteSpace(Model.ReleaseNotes)) + { +

Release Notes

+ +

@Html.PreFormattedText(Model.ReleaseNotes, Config)

+ } + + if (Model.Dependencies.DependencySets == null) + { + if (Model.CanDisplayPrivateMetadata) + { +

Dependencies

+

+ An error occurred processing dependencies. + Your package can still be downloaded and installed, but dependencies cannot be shown. + Please @Html.ActionLink("Contact Support", actionName: "ReportMyPackage", controllerName: "Packages", routeValues: new { id = Model.Id, version = Model.Version }, htmlAttributes: null) if you have any questions. +

+

+ Note: This message is only visible to you and any other package owners. +

+ } + } + else + { +

+ + + Dependencies + +

+ + if (Model.Dependencies.DependencySets.Any()) + { +
    + @foreach (var dependencySet in Model.Dependencies.DependencySets) + { + var dependencySetTitle = dependencySet.Key; +
  • + @if (!Model.Dependencies.OnlyHasAllFrameworks) + { +

    @dependencySetTitle

    + } +
      + @foreach (var dependency in dependencySet.Value) + { +
    • + @if (dependency == null) + { + @:No dependencies. + } + else + { + @dependency.Id + @dependency.VersionSpec + } +
    • + } +
    +
  • + } +
+ } + else + { +

This package has no dependencies.

+ } + } + } + + @if (!Model.IsDotnetToolPackageType && (Model.IsGitHubUsageEnabled || Model.IsPackageDependentsEnabled)) + { +

+ +

+ +
+ @if (Model.IsPackageDependentsEnabled) + { + if (Model.PackageDependents.TotalPackageCount > 0) + { +

+ NuGet packages (@Model.PackageDependents.TotalPackageCount.ToKiloFormat()) +

+

+ Showing the top @(Model.PackageDependents.TopPackages.Count) NuGet packages that depend on @(Model.Id): +

+ + + + + + + + + @foreach (var item in Model.PackageDependents.TopPackages) + { + + + + + } + +
PackageDownloads
+ + @(item.Id) + + @if (item.IsVerified) + { + + } +
+ @(item.Description) +
+
+ +
+ } + else + { +

+ NuGet packages +

+

+ This package is not used by any NuGet packages. +

+ } + } + + @if (Model.IsGitHubUsageEnabled) + { + if (Model.GitHubDependenciesInformation.Repos.Any()) + { +

+ GitHub repositories (@Model.GitHubDependenciesInformation.TotalRepos.ToKiloFormat()) +

+

+ Showing the top @(Model.GitHubDependenciesInformation.Repos.Count) popular GitHub repositories that depend on @(Model.Id): +

+ + + + + + + + + @foreach (var item in Model.GitHubDependenciesInformation.Repos.Select((elem, i) => new { Value = elem, Idx = i })) + { + + + + + } + +
RepositoryStars
+ + @(item.Value.Id) + +
+ @(item.Value.Description) +
+
+ +
+ } + + else + { +

+ GitHub repositories +

+

+ This package is not used by any popular GitHub repositories. +

+ } + } +
+ } + +

+ + + Version History + +

+
+ + + + + + + @if (Model.CanDisplayPrivateMetadata) + { + + } + @if (Model.IsCertificatesUIEnabled) + { + + } + @if (Model.IsPackageDeprecationEnabled || Model.IsPackageVulnerabilitiesEnabled) + { + + } + + + + @{ + var rowCount = 0; + var versionsExpanded = Model + .PackageVersions + .Skip(GalleryConstants.VisibleVersions) + .Any(v => v.IsCurrent(Model)); + } + @foreach (var packageVersion in Model.PackageVersions) + { + if ((packageVersion.Available && packageVersion.Listed) + || (!packageVersion.Deleted && Model.CanDisplayPrivateMetadata)) + { + rowCount++; + @VersionListDivider(rowCount, versionsExpanded) + + + + + @if (packageVersion.CanDisplayPrivateMetadata) + { + var packageStatusSummary = packageVersion.PackageStatusSummary; + + + } + + @if (Model.IsCertificatesUIEnabled) + { + if (string.IsNullOrEmpty(packageVersion.SignatureInformation)) + { + + } + else + { + + } + } + + @if (string.IsNullOrEmpty(packageVersion.PackageWarningIconTitle)) + { + + } + else + { + + } + + } + else if (packageVersion.Deleted && packageVersion.CanDisplayPrivateMetadata) + { + rowCount++; + @VersionListDivider(rowCount, versionsExpanded) + + + + + + + + } + } + +
VersionDownloadsLast updatedStatus
+ + @packageVersion.Version.Abbreviate(30) + + + @packageVersion.DownloadCount.ToNuGetNumberString() + + @packageVersion.LastUpdated.ToNuGetShortDateString() + @if (packageVersion.PushedBy != null) + { + + by @packageVersion.PushedBy.Abbreviate(15) + + } + + @if (packageStatusSummary == PackageStatusSummary.Listed || + packageStatusSummary == PackageStatusSummary.Unlisted) + { + @NuGetGallery.Helpers.EnumHelper.GetDescription(packageStatusSummary) + } + else + { + @NuGetGallery.Helpers.EnumHelper.GetDescription(packageStatusSummary) + } + + + + +
+ @packageVersion.Version + + @packageVersion.DownloadCount + + @packageVersion.LastUpdated.ToNuGetShortDateString() + + Deleted +
+ @if (rowCount > GalleryConstants.VisibleVersions) + { + + + @(versionsExpanded ? "Show less" : "Show more") + + } +
+
+ +
+