I figured it out.
You can get the field mapping using the following code (where list
is the SPList
that represents your task list):
list.RootFolder.Properties["WSSSyncFieldMap"];
If a project file has been synced with the list previously, then the above will return an XML fragment (not a full document) that describes the field mappings. If no such sync has been done, then the property will not exist!
If you open Project and view the mappings, you will see some are not allowed to be changed. These mappings are always assumed by SharePoint and they will not appear in the XML fragment.