def _get_matching_project_platform(platform, prj):
    """
    Returns best matching platform in the project or None if none found.
    """
    # As with the configurations above, assume that all solution platforms are
    # supported by the project if we failed to find which ones it really has.
    if platform in prj.platforms or not prj.platforms:
        return platform
    elif "Any CPU" in prj.platforms:
        return "Any CPU"
    else:
        return None