parameters: (proj_path, spec)
return_statement: return guid
docstring: Get the guid for the project.
  
    Arguments:
      proj_path: Path of the vcproj or vcxproj file to generate.
      spec: The target dictionary containing the properties of the target.
    Returns:
      the guid.
    Raises:
      ValueError: if the specified GUID is invalid.
docstring_summary: Get the guid for the project.
docstring_tokens: Get the guid for the project .
function: def _GetGuidOfProject(proj_path, spec):
    """Get the guid for the project.
  
    Arguments:
      proj_path: Path of the vcproj or vcxproj file to generate.
      spec: The target dictionary containing the properties of the target.
    Returns:
      the guid.
    Raises:
      ValueError: if the specified GUID is invalid.
    """
    # Pluck out the default configuration.
    default_config = _GetDefaultConfiguration(spec)
    # Decide the guid of the project.
    guid = default_config.get('msvs_guid')
    if guid:
      if VALID_MSVS_GUID_CHARS.match(guid) is None:
        raise ValueError('Invalid MSVS guid: "%s".  Must match regex: "%s".' %
                         (guid, VALID_MSVS_GUID_CHARS.pattern))
      guid = '{%s}' % guid
    guid = guid or MSVSNew.MakeGuid(proj_path)
    return guid
function_tokens: def _GetGuidOfProject ( proj_path , spec ) : # Pluck out the default configuration. default_config = _GetDefaultConfiguration ( spec ) # Decide the guid of the project. guid = default_config . get ( 'msvs_guid' ) if guid : if VALID_MSVS_GUID_CHARS . match ( guid ) is None : raise ValueError ( 'Invalid MSVS guid: "%s".  Must match regex: "%s".' % ( guid , VALID_MSVS_GUID_CHARS . pattern ) ) guid = '{%s}' % guid guid = guid or MSVSNew . MakeGuid ( proj_path ) return guid