diff --git a/global.json b/global.json
index ecfdff806f6f..8ef11e2107fa 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"tools": {
- "dotnet": "3.0.100-preview6-012264"
+ "dotnet": "3.0.100"
},
"native-tools": {
"cmake": "3.11.1",
diff --git a/init-tools.cmd b/init-tools.cmd
index 0905e913b96c..b483d72571ca 100644
--- a/init-tools.cmd
+++ b/init-tools.cmd
@@ -105,9 +105,6 @@ if NOT exist "%BUILD_TOOLS_PATH%\init-tools.cmd" (
:afterbuildtoolsrestore
-:: Ask init-tools to also restore ILAsm
-set /p ILASMCOMPILER_VERSION=< "%~dp0ILAsmVersion.txt"
-
echo Initializing BuildTools...
echo Running: "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
call "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" "%PACKAGES_DIR%" >> "%INIT_TOOLS_LOG%"
@@ -117,6 +114,12 @@ if not [%INIT_TOOLS_ERRORLEVEL%]==[0] (
goto :error
)
+REM ILasm/ILDasm used to be restored by buildtools. The reference there was a netocreapp2.0, which was prior to our support of linux-musl. We initialize it locally as a 3.0 with the new SDK.
+set /p ILASM_VERSION=< "%~dp0ILAsmVersion.txt"
+if [%NATIVE_TOOLS_RID%] == [] set NATIVE_TOOLS_RID=win-x64
+echo Running: call "%DOTNET_CMD%" build "%~dp0tests\ilasm-restore\ilasm.depproj" --no-cache --packages "%PACKAGES_DIR%" -r "%NATIVE_TOOLS_RID%" /p:ILAsmPackageVersion="%ILASM_VERSION%" /p:ExpectedILAsmPath="%TOOLRUNTIME_DIR%\ilasm" >> "%INIT_TOOLS_LOG%"
+call "%DOTNET_CMD%" build "%~dp0tests\ilasm-restore\ilasm.depproj" --no-cache --packages "%PACKAGES_DIR%" -r "%NATIVE_TOOLS_RID%" /p:ILAsmPackageVersion="%ILASM_VERSION%" /p:ExpectedILAsmPath="%TOOLRUNTIME_DIR%\ilasm"
+
:: Create semaphore file
echo Done initializing tools.
if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%"
diff --git a/init-tools.sh b/init-tools.sh
index 42bbc0972ff8..5ac2b44d7d87 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -153,15 +153,8 @@ if [ -z "${__ILASM_RID-}" ]; then
fi
echo "Using RID $__ILASM_RID for BuildTools native tools"
-
-export ILASMCOMPILER_VERSION=$__ILASM_VERSION
export NATIVE_TOOLS_RID=$__ILASM_RID
-if [ -n "${DotNetBootstrapCliTarPath-}" ]; then
- # Assume ilasm is not in nuget yet when bootstrapping...
- unset ILASMCOMPILER_VERSION
-fi
-
# Build tools only supported on x64
if [ "${__PKG_ARCH}" != "x64" ] && [ "${__PKG_ARCH}" != "arm" ]; then
echo "Skipped installing build tools."
@@ -178,6 +171,14 @@ else
exit 1
fi
+
+ if [ ! -n "${DotNetBootstrapCliTarPath-}" ]; then
+ # Assume ilasm is not in nuget yet when bootstrapping...
+ # ILasm/ILDasm used to be restored by buildtools. The reference there was a netocreapp2.0, which was prior to our support of linux-musl. We initialize it locally as a 3.0 with the new SDK.
+ echo "Running: eval $__DOTNET_CMD build ${__scriptpath}/tests/ilasm-restore/ilasm.depproj --no-cache --packages $__PACKAGES_DIR -r $NATIVE_TOOLS_RID -p:ILAsmPackageVersion=$__ILASM_VERSION -p:ExpectedILAsmPath=$__TOOLRUNTIME_DIR/ilasm" >> "$__init_tools_log"
+ eval "$__DOTNET_CMD" build "${__scriptpath}/tests/ilasm-restore/ilasm.depproj" --no-cache --packages "$__PACKAGES_DIR" -r "$NATIVE_TOOLS_RID" -p:ILAsmPackageVersion="$__ILASM_VERSION" -p:ExpectedILAsmPath="$__TOOLRUNTIME_DIR/ilasm"
+ fi
+
echo "Making all .sh files executable under Tools."
# Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424
ls "$__scriptpath/Tools/"*.sh | xargs chmod +x
diff --git a/tests/ilasm-restore/Directory.Build.props b/tests/ilasm-restore/Directory.Build.props
new file mode 100644
index 000000000000..35fc3cdf4ac0
--- /dev/null
+++ b/tests/ilasm-restore/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
\ No newline at end of file
diff --git a/tests/ilasm-restore/Directory.Build.targets b/tests/ilasm-restore/Directory.Build.targets
new file mode 100644
index 000000000000..35fc3cdf4ac0
--- /dev/null
+++ b/tests/ilasm-restore/Directory.Build.targets
@@ -0,0 +1,6 @@
+
+
+
\ No newline at end of file
diff --git a/tests/ilasm-restore/ilasm.depproj b/tests/ilasm-restore/ilasm.depproj
new file mode 100644
index 000000000000..d57773c22c90
--- /dev/null
+++ b/tests/ilasm-restore/ilasm.depproj
@@ -0,0 +1,30 @@
+
+
+
+
+ false
+ true
+
+
+
+
+
+
+
+
+
+
+ .NETCoreApp,Version=v3.0
+ netcoreapp3.0
+ true
+
+
+
+
+
+
+
+
+
+
+