Skip to content

Instantly share code, notes, and snippets.

@udawtr
Created December 24, 2013 02:02
Show Gist options
  • Save udawtr/8107803 to your computer and use it in GitHub Desktop.
Save udawtr/8107803 to your computer and use it in GitHub Desktop.
ソリューションフォルダ以下のすべてのプロジェクトのNuGetパッケージを再インストールします。 Clean install NuGet packages of all projects of a solution folder.
@setlocal
@echo off
REM *************** 設定 ***************
set PACKAGE_DIR=packages
REM *************** Resolve the path of NuGet.exe ***************
set NUGET_PATH1="C:\Program Files (x86)\NuGet\NuGet.exe"
set NUGET_PATH2="C:\Program Files\NuGet\NuGet.exe"
if not defined NUGET (
if exist %NUGET_PATH1% set NUGET=%NUGET_PATH1%
if exist %NUGET_PATH2% set NUGET=%NUGET_PATH2%
if not defined NUGET (echo NuGet.exe is not found. To install NuGet, visit http://nuget.codeplex.com/)
)
REM *************** NuGetパッケージ更新 ***************
echo ダウンロード済みパッケージを消します。 (場所:%PACKAGE_DIR%)
rmdir /S /Q %PACKAGE_DIR%
echo パッケージをインストールします...
for /d %%f in (*) do (
if exist %%f\packages.config (
echo *********%%f\packages.config*********
%NUGET% install %%f\packages.config -o %PACKAGE_DIR%
)
)
echo パッケージをインストールを完了しました。
@endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment