This is an old revision of the document!
General notes:
AssetDatabase.StopEditing()
fails1) when called here with assertion:
Assertion failed on expression: 'gRefreshReentrancyCount > 0
Most likely we are already in the middle of an asset import freeze, during the build. [research needed]