9 | The find best match operation is what NuGet uses to select one version of a package from many available versions based on a version specification (version range). 10 | Enter a version range and one or more versions. 11 |
12 | 13 | 25 | 26 |@output.BestMatch.Version.GetPrettyString()
(@output.VersionRange?.NormalizedString
(@output.VersionRange?.NormalizedString
(The following versions were considered, displayed in the order of precedence:
53 | } 54 | else 55 | { 56 |The following versions were considered, displayed in the order that they were provided:
57 | } 58 | 59 |@input.Version.GetPrettyString()
72 | (The following version(s) could not be parsed:
79 |The following version(s) could not be parsed:
101 |
9 | Enter the project and package frameworks below. Both short form (e.g. net45
) and long form (e.g. .NETFramework,Version=v4.5
) are supported.
10 |
@output.Project?.ShortFolderName
(@output.Package?.ShortFolderName
(@output.Project?.ShortFolderName
(@output.Package?.ShortFolderName
(9 | If multiple sets of assets are available in a package (under different frameworks), NuGet must choose between 10 | these frameworks. Enter a project framework to see the order of precedence of possible package frameworks. Note 11 | that this list is not exhaustive. 12 |
13 | 14 | 41 | 42 |@output.Framework?.DotNetFrameworkName
(
55 | The @output.Framework?.DotNetFrameworkName
(
Order | 63 |.NET Framework Name | 64 |Short Folder Name | 65 |
---|---|---|
@(i + 1) | 72 |@output.Precedence[i].DotNetFrameworkName |
73 | @output.Precedence[i].ShortFolderName |
74 |
9 | The get nearest framework operation is what NuGet uses to select one framework from many available framework assets in a package based on the project's framework. Enter one project framework and one or more package frameworks. 10 |
11 | 12 | 25 | 26 |@output.Nearest.Framework.ShortFolderName
(@output.Project?.ShortFolderName
34 | (@output.Project?.ShortFolderName
41 | (The package frameworks that were considered were:
47 |@input.Framework.ShortFolderName
60 | (The following package framework(s) could not be parsed:
67 |The following package framework(s) could not be parsed:
89 |9 | The following packages are used by version @Model.CurrentVersion of NuGet and by this tool. 10 |
11 | 12 |19 | NuGet Gallery 20 | | 21 | NuGet Package Explorer (nuget.info) 22 | | 23 | FuGet 24 | | 25 | NuGet Trends 26 |
27 | foreach (var assembly in package.Assemblies) 28 | { 29 |@assembly.CustomAttributes45 | } 46 | } 47 | } 48 |
9 | Enter a NuGet framework to see how it parses. Both short form (e.g. net45
) and long form (e.g. .NETFramework,Version=v4.5
) are supported.
10 |
26 | The input value is @output.Input?.Framework. 27 |
28 | @try 29 | { 30 |The short folder name is @(output.Framework?.ShortFolderName)
.
35 | 36 | While determining the short folder name, an exception was thrown. 37 |
38 | } 39 |The .NET framework name is @output.Framework?.DotNetFrameworkName
.
The framework identifier is @output.Framework?.Identifier
.
The framework version is @output.Framework?.Version
.
The result of ToString()
is @output.Framework?.ToStringResult
.
The framework profile is @output.Framework.Profile
.
There is no framework profile.
51 | } 52 |The platform identifier is @output.Framework.Platform
.
The platform version is @output.Framework.PlatformVersion
.
There is no framework platform.
63 | } 64 | } 65 | else 66 | { 67 | @:Platform information is only available in NuGet 5.8.0-preview.1 or later.
68 | } 69 |9 | Enter a NuGet package version to see how it parses. 10 |
11 | 12 | 20 | 21 |26 | The input value is @output.Input?.Version. 27 |
28 | 29 |
30 | @if (output.Version?.NormalizedStringAvailable == true)
31 | {
32 | @:The normalized version is @output.Version.NormalizedString
.
33 | }
34 | else
35 | {
36 | @:The normalized version is only available in NuGet 2.14.0 or later.
37 | }
38 |
40 | The result of ToString()
is @output.Version?.ToStringResult
.
41 |
43 | @if (output.Version?.FullStringAvailable == true)
44 | {
45 | @:The full version is @output.Version.FullString
.
46 | }
47 | else
48 | {
49 | @:The full version is only available in NuGet 3.5.0-beta-final or later.
50 | }
51 |
53 | @if (output.Version?.IsSemVer2Available == true) 54 | { 55 | if (output.Version.Revision != 0) 56 | { 57 | @:The version has a revision (fourth integer in the version) so it is not strictly SemVer. However, 58 | @:NuGet considers the version to be a 59 | if (output.Version.IsSemVer2) 60 | { 61 | @:SemVer 2.0.0 version string. 62 | } 63 | else 64 | { 65 | @:SemVer 1.0.0 version string. 66 | } 67 | } 68 | else 69 | { 70 | @:The version is considered a 71 | if (output.Version.IsSemVer2) 72 | { 73 | @:SemVer 2.0.0 version string. 74 | } 75 | else 76 | { 77 | @:SemVer 1.0.0 version string. 78 | } 79 | } 80 | } 81 | else 82 | { 83 | @:SemVer version detection is only available in NuGet 3.4.3 or later. 84 | } 85 |
86 | @if (output.Version?.IsPrerelease == true) 87 | { 88 |The version is prerelease.
89 | } 90 | else 91 | { 92 |The version is not prerelease.
93 | } 94 |9 | Enter a NuGet package version range (version specification) to see how it parses. 10 |
11 | 12 | 20 | 21 |26 | The input value is @output.Input?.VersionRange. 27 |
28 |29 | @if (output.VersionRange?.IsFloatingAvailable == true) 30 | { 31 | @:The version range is @(output.VersionRange.IsFloating ? "floating" : "not floating"). 32 | } 33 | else 34 | { 35 | @:Floating versions are only available in NuGet 3.x. 36 | } 37 |
38 |
39 | The normalized version range is @output.VersionRange?.NormalizedString
.
40 |
42 | The pretty printed version range is @output.VersionRange?.PrettyPrint
.
43 |
46 | @if (output.VersionRange?.LegacyStringAvailable == true)
47 | {
48 | @:The legacy string is @output.VersionRange.LegacyString
.
49 | }
50 | else
51 | {
52 | @:The legacy string is only available in NuGet 3.x.
53 | }
54 |
56 | @if (output.VersionRange?.LegacyShortStringAvailable == true)
57 | {
58 | @:The legacy short string is @output.VersionRange.LegacyShortString
.
59 | }
60 | else
61 | {
62 | @:The legacy short string is only available in NuGet 3.4.3 or later.
63 | }
64 |
66 | @if (output.VersionRange?.OriginalStringAvailable == true)
67 | {
68 | @:The original string is @output.VersionRange.OriginalString
.
69 | }
70 | else
71 | {
72 | @:The original string is only available in NuGet 3.x.
73 | }
74 |
76 | @if (output.VersionRange?.HasLowerBound == true)
77 | {
78 | @output.VersionRange.MinVersion.GetPrettyString()
81 | (
90 | @if (output.VersionRange?.HasUpperBound == true)
91 | {
92 | @output.VersionRange.MaxVersion.GetPrettyString()
95 | (
8 | Current NuGet version: @Model.CurrentVersion 9 |
10 |11 | NuGet loves parsing strings. These tools provide insight into how these strings are parsed. 12 |
13 | -------------------------------------------------------------------------------- /src/Knapcode.NuGetTools.Website/Views/Home/SortVersions.cshtml: -------------------------------------------------------------------------------- 1 | @model SelectedVersionOutput9 | Enter multiple NuGet package versions to sort them. 10 |
11 | 12 | 19 | 20 |The following versions are in ascending, SemVer order.
25 |@version.GetPrettyString()
(The following versions could not be parsed.
39 |@version
44 | No valid versions were provided.The following versions could not be parsed.
54 |@version
59 | 9 | Enter two NuGet package versions to compare them. 10 |
11 | 12 | 26 | 27 |@output.VersionA?.GetPrettyString()
(@output.VersionB?.GetPrettyString()
(9 | Enter a NuGet version range (version specification) and a NuGet package version to see if the version satisfies the version range. 10 |
11 | 12 | 25 | 26 |@output.Version?.ToStringResult
(@output.VersionRange?.NormalizedString
(@output.Version?.ToStringResult
(@output.VersionRange?.NormalizedString
(10 | Swapping to Development environment will display more detailed information about the error that occurred. 11 |
12 |13 | Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. 14 |
15 | -------------------------------------------------------------------------------- /src/Knapcode.NuGetTools.Website/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | @using Knapcode.NuGetTools.Logic.Models; 2 | @model SelectedVersionOutput 3 | 4 | 5 | 6 | 7 | 8 |