summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul Kumar <rahku@microsoft.com>2016-01-29 13:29:03 -0800
committerRahul Kumar <rahku@microsoft.com>2016-01-29 13:33:01 -0800
commitff43d0423627be982913c9d10c47897517ff13be (patch)
treedbe39cc4641dea654b2bc5224e35b34a96766483
parentd4eccd4f55238388faf91e8f221235fa8a30105f (diff)
downloadcoreclr-ff43d0423627be982913c9d10c47897517ff13be.tar.gz
coreclr-ff43d0423627be982913c9d10c47897517ff13be.tar.bz2
coreclr-ff43d0423627be982913c9d10c47897517ff13be.zip
update version of buildtools
-rw-r--r--CMakeLists.txt2
-rw-r--r--build.cmd7
-rw-r--r--dir.props41
-rw-r--r--dir.targets128
-rw-r--r--init-tools.cmd76
-rw-r--r--src/.nuget/packages.Unix.config6
-rw-r--r--src/.nuget/packages.Windows_NT.config6
-rw-r--r--src/dlls/mscoree/coreclr/CMakeLists.txt1
-rw-r--r--src/scripts/buildtools/restorebuildtools.bat11
-rw-r--r--src/scripts/buildtools/restorebuildtools.proj8
10 files changed, 114 insertions, 172 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98d3b760d5..dfbd1e5041 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -794,7 +794,7 @@ if(WIN32)
add_compile_options(/Zl) # omit default library name in .OBJ
endif(WIN32)
-# TODO change version
+# Microsoft.Dotnet.BuildTools.Coreclr version
set(BuildToolsVersion "1.0.4-prerelease")
set(BuildToolsDir "${CLR_DIR}/packages/Microsoft.DotNet.BuildTools.CoreCLR.${BuildToolsVersion}")
diff --git a/build.cmd b/build.cmd
index 3751c18b8f..f0e884b943 100644
--- a/build.cmd
+++ b/build.cmd
@@ -256,6 +256,13 @@ if not defined __BuildSequential (
REM =========================================================================================
REM ===
+REM === Restore Build Tools
+REM ===
+REM =========================================================================================
+call %~dp0init-tools.cmd
+
+REM =========================================================================================
+REM ===
REM === Start the build steps
REM ===
REM =========================================================================================
diff --git a/dir.props b/dir.props
index fbbb49ae22..765d13c9f7 100644
--- a/dir.props
+++ b/dir.props
@@ -10,16 +10,16 @@
<!-- Build Tools Versions -->
<PropertyGroup>
- <BuildToolsVersion>1.0.25-prerelease-00121</BuildToolsVersion>
- <BuildToolsCoreCLRVersion>1.0.3-prerelease</BuildToolsCoreCLRVersion>
- <DnxVersion Condition="'$(OsEnvironment)'!='Unix'">1.0.0-rc2-16128</DnxVersion>
- <DnxVersion Condition="'$(OsEnvironment)'=='Unix'">1.0.0-rc2-16128</DnxVersion>
- <DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'!='Unix'">dnx-coreclr-win-x86.$(DnxVersion)</DnxPackageName>
- <DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'=='Unix'">dnx-mono.$(DnxVersion)</DnxPackageName>
<RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
<RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
- <BuildToolsCoreCLRPackageName>Microsoft.DotNet.BuildTools.CoreCLR</BuildToolsCoreCLRPackageName>
- <BuildToolsCoreCLRLocation>$(ToolsDir)$(BuildToolsCoreCLRPackageName).$(BuildToolsCoreCLRVersion)</BuildToolsCoreCLRLocation>
+ </PropertyGroup>
+
+ <!--
+ Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
+ as well as runnning the build on mono. Until we can get these sorted out we will continue using the .NET 4.5 version of the tasks.
+ -->
+ <PropertyGroup>
+ <BuildToolsTargets45>true</BuildToolsTargets45>
</PropertyGroup>
<!-- Common properties -->
@@ -61,14 +61,19 @@
<PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
<PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget</PackagesBinDir>
- <ToolsDir Condition="'$(ToolsDir)'==''">$(PackagesDir)Microsoft.DotNet.BuildTools.$(BuildToolsVersion)/lib/</ToolsDir>
+ <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
+ <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/bin/</DotnetCliPath>
<BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
- <!-- Directory for the CoreCLR tools (BCLRewriter, etc.) -->
- <CoreCLRToolsDir>$(PackagesDir)Microsoft.DotNet.BuildTools.CoreCLR.$(BuildToolsCoreCLRVersion)/</CoreCLRToolsDir>
<TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
<TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
+ <BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net45/</BuildToolsTaskDir>
+
</PropertyGroup>
+
+ <!-- Import Build tools common props file where repo-independent properties are found -->
+ <Import Project="$(ToolsDir)Build.Common.props" />
+
<!-- Common nuget properties -->
<PropertyGroup>
@@ -87,23 +92,15 @@
</PropertyGroup>
<PropertyGroup>
- <DnxPackageDir Condition="'$(DnxPackageDir)'==''">$(PackagesDir)/$(DnxPackageName)/</DnxPackageDir>
- <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'!='Unix'">$(DnxPackageDir)\bin\dnu.cmd</DnuToolPath>
- <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'=='Unix'">$(DnxPackageDir)/bin/dnu</DnuToolPath>
+ <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
+ <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
- <DnuRestoreCommand>"$(DnuToolPath)"</DnuRestoreCommand>
+ <DnuRestoreCommand>"$(DotnetToolCommand)"</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
<DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
</PropertyGroup>
- <!-- Common build tool properties -->
- <!-- <PropertyGroup>
- <BuildToolsCoreCLRPackageName>Microsoft.DotNet.BuildTools.CoreCLR</BuildToolsCoreCLRPackageName>
- <BuildToolsCoreCLRVersion>1.0.2-prerelease</BuildToolsCoreCLRVersion>
- <BuildToolsCoreCLRLocation>$(ToolsDir)$(BuildToolsCoreCLRPackageName).$(BuildToolsCoreCLRVersion)</BuildToolsCoreCLRLocation>
- </PropertyGroup> -->
-
<!-- Setup Nuget properties -->
<ItemGroup>
<NuSpecSrcs Include="$(SourceDir)\.nuget\Microsoft.DotNet.CoreCLR.nuspec" />
diff --git a/dir.targets b/dir.targets
index fd2dcd335d..ea799fbbe6 100644
--- a/dir.targets
+++ b/dir.targets
@@ -1,123 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" InitialTargets="_RestoreBuildToolsWrapper" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-
- <!-- Inline task to bootstrap the build to enable downloading nuget.exe -->
- <UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
- <ParameterGroup>
- <Address ParameterType="System.String" Required="true" />
- <FileName ParameterType="System.String" Required="true" />
- </ParameterGroup>
- <Task>
- <Reference Include="System" />
- <Reference Include="System.IO" />
- <Code Type="Fragment" Language="cs">
- <![CDATA[
- var directory = System.IO.Path.GetDirectoryName(FileName);
- Directory.CreateDirectory(directory);
-
- var tempFile = Path.Combine(directory, Path.GetRandomFileName());
- var client = new System.Net.WebClient();
- client.Proxy = System.Net.WebRequest.DefaultWebProxy;
- if (client.Proxy != null) client.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
- var tryCount = 1;
- var maxTries = 3;
-
- while (tryCount <= maxTries)
- {
- try
- {
- Log.LogMessage("Attempting to download {0}...", Address);
- client.DownloadFile(Address, tempFile);
- break;
- }
- catch (System.Net.WebException e)
- {
- tryCount++;
- if (tryCount > maxTries)
- {
- throw;
- }
- else
- {
- Log.LogMessage(MessageImportance.High, "Download failed, retrying: {0}", e.Message);
- }
- }
- }
-
- try
- {
- if (!File.Exists(FileName))
- File.Move(tempFile, FileName);
- }
- finally
- {
- if (File.Exists(tempFile))
- File.Delete(tempFile);
- }
- ]]>
- </Code>
- </Task>
- </UsingTask>
-
- <!--
- Needed to avoid the IntialTargets from having an Output which ends up getting
- added to the output references when you have a project to project reference.
- -->
- <Target Name="_RestoreBuildToolsWrapper" DependsOnTargets="_RestoreBuildTools" />
-
- <Target Name="_RestoreBuildTools"
- Inputs="$(MSBuildThisFileDirectory)dir.props;$(SourceDir).nuget/packages.$(OsEnvironment).config"
- Outputs="$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll;$(NugetToolPath);$(DnuToolPath)">
- <Message Importance="High" Text="Restoring build tools..." />
-
- <Copy Condition="Exists('$(NuGetCachedPath)')" SourceFiles="$(NuGetCachedPath)" DestinationFiles="$(NuGetToolPath)" SkipUnchangedFiles="true" />
-
- <!-- Download latest nuget.exe -->
- <DownloadFile FileName="$(NuGetToolPath)"
- Address="https://www.nuget.org/nuget.exe"
- Condition="!Exists('$(NuGetToolPath)') and '$(OsEnvironment)'=='Windows_NT'" />
-
- <Exec Command="curl -sSL --create-dirs -o $(NuGetToolPath) https://api.nuget.org/downloads/nuget.exe"
- Condition="!Exists('$(NuGetToolPath)') and '$(OsEnvironment)'=='Unix'" />
-
- <PropertyGroup>
- <_RestoreBuildToolsCommand>$(NugetRestoreCommand) "$(SourceDir).nuget/packages.$(OsEnvironment).config"</_RestoreBuildToolsCommand>
- </PropertyGroup>
-
- <!-- Restore build tools -->
- <Exec Command="$(_RestoreBuildToolsCommand)" StandardOutputImportance="Low" />
-
- <!-- currently DNU doesn't support -ConfigFile: https://github.com/aspnet/dnx/issues/1693
- Our DnuRestoreCommand doesn't force a config file and we rely on the
- directory probing for it to find nuget.config. This works for restore from source,
- but not restore from PackagesDir as happens for test project restore since PackagesDir
- will not be under src. To workaround, copy our nuget.config to packages. -->
- <Copy Condition="Exists('$(NuGetConfigFile)')" SourceFiles="$(NuGetConfigFile)" DestinationFolder="$(PackagesDir)" SkipUnchangedFiles="true" />
- <!-- Add this back if above comment becomes a problem -->
- <!-- <Copy Condition="Exists('$(NuGetConfigFile)')" SourceFiles="$(NuGetConfigFile)" DestinationFolder="$(IntermediateOutputRootPath)" SkipUnchangedFiles="true" /> -->
-
- <!-- Add DNU and Roslyn tool execute rights -->
- <Exec Condition="'$(OsEnvironment)'=='Unix'"
- Command="chmod a+x &quot;$(DnxPackageDir)/bin/dnu&quot;" />
- <Exec Condition="'$(OsEnvironment)'=='Unix'"
- Command="chmod a+x &quot;$(DnxPackageDir)/bin/dnx&quot;" />
- <Exec Condition="'$(OsEnvironment)'=='Unix'"
- Command="find '$(RoslynPackageDir)tools' -name &quot;*.exe&quot; -exec chmod &quot;+x&quot; '{}' ';'" />
-
- <Error Condition="'$(ErrorIfBuildToolsRestoredFromIndividualProject)'=='true'"
- Text="The build tools package was just restored and so we cannot continue the build of an individual project because targets from the build tools package were not able to be imported. Please retry the build the individual project again." />
-
- <!--
- There are cases where the inputs could be newer than the outputs but the
- download or restore may not need to update. In such cases we need to touch
- these files otherwise we continually run this target over and over for
- every project until these files are cleaned (if the are ever cleaned).
- -->
- <Touch Files="$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll;$(NugetToolPath);$(DnuToolPath)" />
+<Project ToolsVersion="12.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <Target Name="CheckForBuildTools">
+ <Error Condition="!Exists('$(ToolsDir)')"
+ Text="The tools directory [$(ToolsDir)] does not exist. Please run init-tools.cmd in your enlistment to ensure the tools are installed before attempting to build an individual project." />
</Target>
- <!-- Provide default empty targets for BuildAndTest and Test which can be hooked onto or overridden as necessary -->
+ <!-- Provide default targets which can be hooked onto or overridden as necessary -->
<Target Name="BuildAndTest" DependsOnTargets="Build;Test" />
-
+ <Target Name="RebuildAndTest" DependsOnTargets="Rebuild;Test" />
<Target Name="Test" />
+
+ <Import Project="$(ToolsDir)/Build.Common.targets" Condition="'$(UseLiveBuildTools)' != 'true'" />
+
</Project>
+
diff --git a/init-tools.cmd b/init-tools.cmd
new file mode 100644
index 0000000000..ce1a34ef61
--- /dev/null
+++ b/init-tools.cmd
@@ -0,0 +1,76 @@
+@echo off
+setlocal
+
+REM Workaround https://github.com/dotnet/coreclr/issues/2153
+set ComPlus_ReadyToRun=0
+
+set INIT_TOOLS_LOG=%~dp0init-tools.log
+set PACKAGES_DIR=%~dp0packages\
+set TOOLRUNTIME_DIR=%~dp0Tools
+set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
+set DOTNET_CMD=%DOTNET_PATH%bin\dotnet.exe
+if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://www.myget.org/F/dotnet-buildtools/
+set /P BUILDTOOLS_VERSION=< %~dp0BuildToolsVersion.txt
+set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
+set PROJECT_JSON_PATH=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
+set PROJECT_JSON_FILE=%PROJECT_JSON_PATH%\project.json
+set PROJECT_JSON_CONTENTS={ "dependencies": { "Microsoft.DotNet.BuildTools": "%BUILDTOOLS_VERSION%" , "Microsoft.DotNet.BuildTools.Coreclr": "1.0.4-prerelease"}, "frameworks": { "dnxcore50": { } } }
+set BUILD_TOOLS_SEMAPHORE=%PROJECT_JSON_PATH%\init-tools.completed
+
+:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
+if [%1]==[force] (
+ if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
+ if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools"
+)
+
+:: If sempahore exists do nothing
+if exist "%BUILD_TOOLS_SEMAPHORE%" (
+ echo Tools are already initialized.
+ goto :EOF
+)
+
+:: Download Nuget.exe
+if NOT exist "%PACKAGES_DIR%NuGet.exe" (
+ if NOT exist "%PACKAGES_DIR%" mkdir "%PACKAGES_DIR%"
+ powershell -NoProfile -ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadFile('https://www.nuget.org/nuget.exe', '%PACKAGES_DIR%NuGet.exe')
+)
+
+if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
+echo %PROJECT_JSON_CONTENTS% > %PROJECT_JSON_FILE%
+echo Running %0 > %INIT_TOOLS_LOG%
+
+if exist "%DOTNET_CMD%" goto :afterdotnetrestore
+
+echo Installing dotnet cli...
+if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
+set /p DOTNET_VERSION=< %~dp0DotnetCLIVersion.txt
+set DOTNET_ZIP_NAME=dotnet-win-x64.%DOTNET_VERSION%.zip
+set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
+set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
+echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> %INIT_TOOLS_LOG%
+powershell -NoProfile -ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> %INIT_TOOLS_LOG%
+if NOT exist "%DOTNET_LOCAL_PATH%" (
+ echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details.
+ goto :EOF
+)
+
+:afterdotnetrestore
+
+if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
+echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
+echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
+call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
+if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
+ echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details.
+ goto :EOF
+)
+
+:afterbuildtoolsrestore
+
+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%" >> %INIT_TOOLS_LOG%
+
+:: Create sempahore file
+echo Done initializing tools.
+echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%" \ No newline at end of file
diff --git a/src/.nuget/packages.Unix.config b/src/.nuget/packages.Unix.config
deleted file mode 100644
index 34039f8283..0000000000
--- a/src/.nuget/packages.Unix.config
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Microsoft.DotNet.BuildTools" version="1.0.25-prerelease-00121" />
- <package id="dnx-mono" version="1.0.0-rc2-16128" />
- <package id="Microsoft.Net.ToolsetCompilers" version="1.0.0-rc3-20150510-01" />
-</packages>
diff --git a/src/.nuget/packages.Windows_NT.config b/src/.nuget/packages.Windows_NT.config
deleted file mode 100644
index d2c4cf51ee..0000000000
--- a/src/.nuget/packages.Windows_NT.config
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Microsoft.DotNet.BuildTools" version="1.0.25-prerelease-00121" />
- <package id="Microsoft.DotNet.BuildTools.CoreCLR" version="1.0.4-prerelease" />
- <package id="dnx-coreclr-win-x86" version="1.0.0-rc2-16128" />
-</packages>
diff --git a/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/dlls/mscoree/coreclr/CMakeLists.txt
index 36bc12911e..1d428193f5 100644
--- a/src/dlls/mscoree/coreclr/CMakeLists.txt
+++ b/src/dlls/mscoree/coreclr/CMakeLists.txt
@@ -144,7 +144,6 @@ if(WIN32)
add_custom_command(TARGET coreclr
POST_BUILD
- COMMAND ${CLR_DIR}/src/scripts/buildtools/restorebuildtools.bat
COMMAND ${CMAKE_CXX_COMPILER} /P /EP /TP ${PREPROCESS_DEFINITIONS} ${INC_DIR} /Fi${CMAKE_CURRENT_BINARY_DIR}/daccess.i ${CLR_DIR}/src/debug/daccess/daccess.cpp
COMMAND ${BuildToolsDir}/dactablegen.exe /dac:${CMAKE_CURRENT_BINARY_DIR}/daccess.i /pdb:${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/coreclr.pdb /dll:$<TARGET_FILE:coreclr> /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin
COMMAND ${BuildToolsDir}/InjectResource.exe /bin:${CMAKE_CURRENT_BINARY_DIR}/wks.bin /dll:$<TARGET_FILE:coreclr>
diff --git a/src/scripts/buildtools/restorebuildtools.bat b/src/scripts/buildtools/restorebuildtools.bat
deleted file mode 100644
index a07e81759f..0000000000
--- a/src/scripts/buildtools/restorebuildtools.bat
+++ /dev/null
@@ -1,11 +0,0 @@
-REM =========================================================================================
-REM ===
-REM === Restore build tools required for native build
-REM ===
-REM =========================================================================================
-echo Restore coreclr build tools nuget package
-setlocal
-:: Set the environment for the managed build
-call "%__VSToolsRoot%\VsDevCmd.bat"
-%_msbuildexe% "%~dp0restorebuildtools.proj" /p:OutputPath="%__IntermediatesDir%" /nodeReuse:false
-endlocal \ No newline at end of file
diff --git a/src/scripts/buildtools/restorebuildtools.proj b/src/scripts/buildtools/restorebuildtools.proj
deleted file mode 100644
index cc6c6d2ba9..0000000000
--- a/src/scripts/buildtools/restorebuildtools.proj
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\..\..\dir.props" />
-
- <Import Project="..\..\..\dir.targets" />
-
- <Import Project="..\..\..\dir.traversal.targets" />
-</Project> \ No newline at end of file