2015-10-28 23:33:36 +00:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
REM Get absolute path
|
|
|
|
pushd %1
|
|
|
|
set BIN_DIR=%CD%
|
|
|
|
popd
|
|
|
|
|
|
|
|
REM Replace with a robust method for finding the right crossgen.exe
|
2015-11-04 19:11:38 +00:00
|
|
|
set CROSSGEN_UTIL=%UserProfile%\.dnx\packages\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-beta-23504\tools\crossgen.exe
|
2015-10-28 23:33:36 +00:00
|
|
|
|
2015-10-29 18:37:39 +00:00
|
|
|
REM Crossgen currently requires itself to be next to mscorlib
|
|
|
|
copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul
|
|
|
|
|
2015-10-28 23:33:36 +00:00
|
|
|
pushd %BIN_DIR%
|
|
|
|
|
2015-10-29 18:37:39 +00:00
|
|
|
REM It must also be called mscorlib, not mscorlib.ni
|
|
|
|
if exist mscorlib.ni.dll (
|
|
|
|
copy /Y mscorlib.ni.dll mscorlib.dll > nul
|
|
|
|
)
|
|
|
|
|
2015-11-01 04:33:17 +00:00
|
|
|
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% System.Collections.Immutable.dll >nul 2>nul
|
2015-10-29 05:42:14 +00:00
|
|
|
if not %errorlevel% EQU 0 goto fail
|
2015-10-28 23:33:36 +00:00
|
|
|
|
2015-11-01 04:33:17 +00:00
|
|
|
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% System.Reflection.Metadata.dll >nul 2>nul
|
2015-10-29 05:42:14 +00:00
|
|
|
if not %errorlevel% EQU 0 goto fail
|
2015-10-28 23:33:36 +00:00
|
|
|
|
2015-11-01 04:33:17 +00:00
|
|
|
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.dll >nul 2>nul
|
2015-10-29 05:42:14 +00:00
|
|
|
if not %errorlevel% EQU 0 goto fail
|
2015-10-28 23:33:36 +00:00
|
|
|
|
2015-11-01 04:33:17 +00:00
|
|
|
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.CSharp.dll >nul 2>nul
|
2015-10-29 05:42:14 +00:00
|
|
|
if not %errorlevel% EQU 0 goto fail
|
2015-10-28 23:33:36 +00:00
|
|
|
|
2015-11-01 04:33:17 +00:00
|
|
|
crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.VisualBasic.dll >nul 2>nul
|
2015-10-29 05:42:14 +00:00
|
|
|
if not %errorlevel% EQU 0 goto fail
|
2015-10-28 23:33:36 +00:00
|
|
|
|
2015-11-12 00:33:06 +00:00
|
|
|
crossgen /MissingDependenciesOK /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% csc.exe >nul 2>nul
|
2015-10-29 05:42:14 +00:00
|
|
|
if not %errorlevel% EQU 0 goto fail
|
2015-10-28 23:33:36 +00:00
|
|
|
|
2015-11-12 00:33:06 +00:00
|
|
|
crossgen /MissingDependenciesOK /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% vbc.exe >nul 2>nul
|
2015-10-29 05:42:14 +00:00
|
|
|
if not %errorlevel% EQU 0 goto fail
|
2015-10-28 23:33:36 +00:00
|
|
|
|
|
|
|
popd
|
|
|
|
goto end
|
|
|
|
|
|
|
|
:fail
|
|
|
|
popd
|
|
|
|
echo Crossgen failed...
|
|
|
|
exit /B 1
|
|
|
|
|
|
|
|
:end
|