From 255210c5521cb06443bdd7e40e6c67ba6c27f30a Mon Sep 17 00:00:00 2001 From: Wonyoung Choi Date: Tue, 4 Jan 2022 11:33:51 +0900 Subject: [PATCH] Clear nuget cache at first time dotnet build Change-Id: I81ca11b8a1e7ce9c893653dd0fef5b542346a091 --- tools/dotnet-wrapper.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/dotnet-wrapper.sh b/tools/dotnet-wrapper.sh index 5cf2c4f5..2740a2f2 100755 --- a/tools/dotnet-wrapper.sh +++ b/tools/dotnet-wrapper.sh @@ -27,6 +27,12 @@ fi if [ "$CMD" == "msbuild" -o "$CMD" == "build" -o "$CMD" == "restore" ] ; then ARGS+=(/nodeReuse:false /p:UseSharedCompilation=false) + + # clear nuget packages folder + if [ ! -f ".nuget_cache_cleared" ]; then + rm -rf $HOME/.nuget/packages/* + touch .nuget_cache_cleared 2>/dev/null || true + fi fi echo $DOTNET_CLI_PATH $CMD "${ARGS[@]}" -- 2.34.1