Clear nuget cache at first time dotnet build 53/268853/2 accepted/tizen/unified/20220104.123144 submit/tizen/20220104.050221
authorWonyoung Choi <wy80.choi@samsung.com>
Tue, 4 Jan 2022 02:33:51 +0000 (11:33 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Tue, 4 Jan 2022 04:34:03 +0000 (04:34 +0000)
Change-Id: I81ca11b8a1e7ce9c893653dd0fef5b542346a091

tools/dotnet-wrapper.sh

index 5cf2c4f5fa9da9488240bd2cf855dc74cb4ba9fb..2740a2f2cf1408fcf081098ef15dd4b56ec14c6f 100755 (executable)
@@ -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[@]}"