-
-
Save SugoiDev/3790be804e356c5440b092477218f156 to your computer and use it in GitHub Desktop.
Latest version of Roslyn for unity.incrementalcompiler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rem update-unity-compiler.cmd | |
@rem start in */[email protected] folder | |
@echo off | |
@rem NOTE: FIND.EXE can clash with git/msys/cygwin's find | |
for %%a in (%ComSpec%) do set __system=%%~dpa | |
%__system%FIND.EXE /i "com.unity.incrementalcompiler" package.json 1> NUL | |
if %errorlevel% neq 0 goto :not_found | |
nuget install Microsoft.Net.Compilers -verbosity quiet | |
if %errorlevel% neq 0 goto :nuget_error | |
for /F %%D in ('dir /b Microsoft.Net.Compilers*') do set __roslyn_dir=%%D | |
if not defined __roslyn_dir goto :unknown_error | |
xcopy %__roslyn_dir%\tools\*.dll .bin\ /u /f /r /y | |
if %errorlevel% neq 0 goto :xcopy_error | |
xcopy %__roslyn_dir%\tools\csc.exe.config .bin\ /u /f /r /y | |
if %errorlevel% neq 0 goto :xcopy_error | |
echo Success: | |
echo %__roslyn_dir% installed | |
goto :cleanup | |
:not_found | |
echo ERROR: com.unity.incrementalcompiler package is not here. | |
goto :eof | |
:nuget_error | |
echo ERROR: NuGet error (do you have it installed?). | |
goto :cleanup | |
:xcopy_error | |
echo ERROR: Error copying files, try to close all Unity instances. | |
goto :cleanup | |
:unknown_error | |
echo ERROR: unknown | |
goto :cleanup | |
:cleanup | |
if defined __roslyn_dir rmdir %__roslyn_dir% /s /q | |
set __system= | |
set __roslyn_dir= | |
:eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Forked to make it also copy the csc.exe.config file, as this seems to be necessary for Incremental Compiler 0.0.42.preview.13+