Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric St. John <ericstj@microsoft.com>2016-09-16 01:30:53 +0300
committerEric St. John <ericstj@microsoft.com>2016-09-16 01:37:01 +0300
commit013ad32b3e871bd86745e380088c55d877748356 (patch)
tree8c941df65702635c64aeec04489f6a7a5a86394d
parentbcb4a69c47069249e373ae6db3e219a265875758 (diff)
Update CLI's NuGet.Frameworks.dll
We need the latest compatibility mappings for NuGet but the CLI hasn't yet picked up a new NuGet drop. Workaround this by manually patching the NuGet.Frameworks.dll in CLI.
-rw-r--r--init-tools.cmd19
-rwxr-xr-xinit-tools.sh8
2 files changed, 22 insertions, 5 deletions
diff --git a/init-tools.cmd b/init-tools.cmd
index 37c4fe9c58..7d5be5ee16 100644
--- a/init-tools.cmd
+++ b/init-tools.cmd
@@ -32,11 +32,11 @@ if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
echo %PROJECT_JSON_CONTENTS% > "%PROJECT_JSON_FILE%"
echo Running %0 > "%INIT_TOOLS_LOG%"
+set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
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-dev-win-x64.%DOTNET_VERSION%.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
@@ -60,15 +60,24 @@ if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
:afterbuildtoolsrestore
-echo Initializing BuildTools ...
+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%"
set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL%
if not [%INIT_TOOLS_ERRORLEVEL%]==[0] (
- echo ERROR: An error occured when trying to initialize the tools. Please check '%INIT_TOOLS_LOG%' for more details. 1>&2
- exit /b %INIT_TOOLS_ERRORLEVEL%
+ echo ERROR: An error occured when trying to initialize the tools. Please check '%INIT_TOOLS_LOG%' for more details. 1>&2
+ exit /b %INIT_TOOLS_ERRORLEVEL%
+)
+
+echo Updating CLI NuGet Frameworks map...
+robocopy "%TOOLRUNTIME_DIR%" "%TOOLRUNTIME_DIR%\dotnetcli\sdk\%DOTNET_VERSION%" NuGet.Frameworks.dll /XO >> "%INIT_TOOLS_LOG%"
+set UPDATE_CLI_ERRORLEVEL=%ERRORLEVEL%
+if %UPDATE_CLI_ERRORLEVEL% GTR 1 (
+ echo ERROR: Failed to update Nuget for CLI {Error level %UPDATE_CLI_ERRORLEVEL%}. Please check '%INIT_TOOLS_LOG%' for more details. 1>&2
+ exit /b %UPDATE_CLI_ERRORLEVEL%
)
:: 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
+echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"
+exit /b 0 \ No newline at end of file
diff --git a/init-tools.sh b/init-tools.sh
index a3db950ef4..ab8f9df2f2 100755
--- a/init-tools.sh
+++ b/init-tools.sh
@@ -123,6 +123,14 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."1>&2
exit 1
fi
+
+ echo "Updating CLI NuGet Frameworks map..."
+ cp -u $__TOOLRUNTIME_DIR/NuGet.Frameworks.dll $__TOOLRUNTIME_DIR/dotnetcli/sdk/$__DOTNET_TOOLS_VERSION >> $__init_tools_log
+ if [ "$?" != "0" ]; then
+ echo "ERROR: An error occured when updating Nuget for CLI . Please check '$__init_tools_log' for more details."1>&2
+ exit 1
+ fi
+
touch $__INIT_TOOLS_DONE_MARKER
echo "Done initializing tools."
else