Unity 5.6.2 API updater build problem

Hello, I have a problem with project building. If I hit play from Unity editor it works fine without any errors in console. If I try to create build and run the project from .exe, there are several problems.
Firstly APIupdater asks to update when I launch Unity or during the build. If I hit ‘Go Ahead’ following error appears in the console ‘?? during/after ??’ player build.

99374-build.png

error:

ArgumentException: The Assembly UnityEditor is referenced by Assembly-CSharp (‘Library/ScriptAssemblies/Assembly-CSharp.dll’). But the dll is not allowed to be included or could not be found.

Even with this error .exe and other files are created, but after launch, this error pops up (folder in this error exists):

Data folder not found:
There should be ‘ProjName_Data’
folder next to the executable

But if I cancel API updater build is successful, the console has no errors and everything works fine.
If it would be possible to use this workaround, for now, it is ok. But I need to build from the command line - the build is successful but again ‘Data folder not found’ error pops up.

Command line arguments used: -batchmode -nographics -quit -buildWindows64Player “pathname” -projectPath “pathname”

I have tried to add -disable-assembly-updater parameter too, but without change.

Project was upgraded from 5.3.5 to 5.6.2. Of course, there were made a lot of changes to make this working at least like that. Really don’t understand why these super errors don’t show the name of the problematic assembly, they are really worthless…

Thanks for any ideas.

**Update: ** Forgot to mention that I also checked all .cs files and there is no reference to UnityEditor except files in ‘Editor’ folder or between #if UNITY_EDITOR directives.
I also checked the Assembly-Csharp.dll in dotPeek and there is no reference to UnityEditor.

Problem solved after manual update of UnityUpgradables founded in Editor log.

Hi,
can you explain what have exactly did since we are having same issue and cannot find anything useful in Editor log?
Thanks,
BR
Marije