Ejemplo n.º 1
0
        static string GetPclProfileFullName(TargetFrameworkMoniker tfm)
        {
            if (tfm.Identifier != TargetFrameworkMoniker.ID_PORTABLE)
            {
                return(null);
            }

            //nuget only accepts pcls with a profile number
            if (tfm.Profile == null || !tfm.Profile.StartsWith("Profile", StringComparison.Ordinal))
            {
                return(null);
            }

            return(tfm.ToString());
        }
Ejemplo n.º 2
0
 public ReferenceAssemblyFramework(TargetFrameworkMoniker targetFramework)
 {
     Include = targetFramework.ToString();
 }
        /// <summary>
        /// Target framework versions returned from ResolvePackageDependenciesDesignTime use four part version numbers
        /// so we cannot use TargetFrameworkMoniker as the dictionary key since this will not always match the
        /// project's target framework. Instead generate a NuGetFramework and use that as the key since it will
        /// normalize the version numbers.
        /// </summary>
        static string GetMappingKey(TargetFrameworkMoniker framework)
        {
            NuGetFramework nugetFramework = NuGetFramework.ParseFrameworkName(framework.ToString(), DefaultFrameworkNameProvider.Instance);

            return(nugetFramework.ToString());
        }
		public ReferenceAssemblyFramework (TargetFrameworkMoniker targetFramework)
		{
			Include = targetFramework.ToString ();
		}
		static string GetPclProfileFullName (TargetFrameworkMoniker tfm)
		{
			if (tfm.Identifier != TargetFrameworkMoniker.ID_PORTABLE) {
				return null;
			}

			//nuget only accepts pcls with a profile number
			if (tfm.Profile == null || !tfm.Profile.StartsWith ("Profile", StringComparison.Ordinal))
			{
				return null;
			}

			return tfm.ToString ();
		}