This commit is contained in:
Bryan Thornbury 2016-06-15 10:23:16 -07:00
parent d717b84ec8
commit f0380cfd9c
5 changed files with 6 additions and 12 deletions

View file

@ -41,19 +41,13 @@ namespace NuGet
/// </summary>
internal const string SchemaVersionV6 = "http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd";
/// <summary>
/// Added serviceble element under metadata.
/// </summary>
internal const string SchemaVersionV8 = "http://schemas.microsoft.com/packaging/2016/06/nuspec.xsd";
private static readonly string[] VersionToSchemaMappings = new[] {
SchemaVersionV1,
SchemaVersionV2,
SchemaVersionV3,
SchemaVersionV4,
SchemaVersionV5,
SchemaVersionV6,
SchemaVersionV8
SchemaVersionV6
};
public static int GetVersionFromNamespace(string @namespace)

View file

@ -15,9 +15,6 @@ namespace NuGet
public const int TargetFrameworkSupportForDependencyContentsAndToolsVersion = 4;
public const int TargetFrameworkSupportForReferencesVersion = 5;
public const int XdtTransformationVersion = 6;
// Note that this version should change from 7 to 8 when the PackageType
// schema is merged into here
public const int ServiceableVersion = 7;
public static int GetManifestVersion(ManifestMetadata metadata)
{
@ -26,6 +23,8 @@ namespace NuGet
private static int GetMaxVersionFromMetadata(ManifestMetadata metadata)
{
// Important: always add newer version checks at the top
bool referencesHasTargetFramework =
metadata.PackageAssemblyReferences != null &&
metadata.PackageAssemblyReferences.Any(r => r.TargetFramework != null);