DaZombieKiller/UnityRoslynUpdater

Support Unity 2020 and earlier

Opened this issue · 0 comments

Updating Roslyn:

  1. Delete everything in Editor/Data/Tools/Roslyn/ except CoreRun.exe
  2. Copy dotnet/shared/Microsoft.NETCore.App/<latest>/* into Editor/Data/Tools/Roslyn/
  3. Copy dotnet/sdk/<latest>/Roslyn/bincore/* into Editor/Data/Tools/Roslyn/

Patches (Editor/Data/Managed/UnityEditor.dll):

The resulting PDB files from a compilation also need to be converted to MDB. This can be performed using the pdb2mdb utility bundled with Mono (and therefore also bundled with Unity). It should be invoked through MonoBleedingEdge/bin/mono.exe and not directly, otherwise it will fail to locate Mono.Cecil.dll in the bundled GAC and not generate an MDB.

The following batch script demonstrates what should occur following a compilation:

cd Library\ScriptAssemblies
set MONO_ROOT=%UNITY_INSTALL_DIR%\Editor\Data\MonoBleedingEdge
for %%f in (*.pdb) do "%MONO_ROOT%\bin\mono.exe" "%MONO_ROOT%\lib\mono\4.5\pdb2mdb.exe" "%%~nf.dll"