in nuget-common/src/jetbrains/buildServer/nuget/common/version/VersionUtility.java [220:259]
public static FrameworkName parseFrameworkName(@NotNull String frameworkNameString) {
final String[] frameworkStringParts = frameworkNameString.split(PROFILE_PART_SEPARATOR);
if (frameworkStringParts.length > 2) return null;
final String frameworkNameAndVersion = frameworkStringParts.length > 0 ? frameworkStringParts[0].trim() : null;
if(StringUtil.isEmpty(frameworkNameAndVersion)) return null;
String profilePart = frameworkStringParts.length > 1 ? frameworkStringParts[1].trim() : "";
String identifierPart;
String versionPart = null;
final Matcher matcher = VERSION_MATCHING_PATTERN.matcher(frameworkNameAndVersion);
if (matcher.find()) {
identifierPart = frameworkNameAndVersion.substring(0, matcher.start()).trim();
versionPart = frameworkNameAndVersion.substring(matcher.start()).trim();
}
else {
identifierPart = frameworkNameAndVersion.trim();
}
if (!StringUtil.isEmpty(identifierPart)){
if (!KNOWN_IDENTIFIERS.containsKey(identifierPart)) return null;
identifierPart = KNOWN_IDENTIFIERS.get(identifierPart);
}
if (!StringUtil.isEmpty(profilePart)){
if (KNOWN_PROFILES.containsKey(profilePart))
profilePart = KNOWN_PROFILES.get(profilePart);
}
Version version = getVersion(versionPart);
if (version == null) return null;
if (StringUtil.isEmpty(identifierPart)){
identifierPart = NET_FRAMEWORK_IDENTIFIER;
}
return new FrameworkName(identifierPart, version, profilePart);
}