Last active
August 29, 2015 14:07
-
-
Save omidkrad/4b6933fac239221fc012 to your computer and use it in GitHub Desktop.
Script to remove nuget.targets import from all .csproj files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Migrating MSBuild-Integrated solutions to use Automatic Package Restore | |
# http://docs.nuget.org/docs/workflows/migrating-to-automatic-package-restore | |
# See also: http://weblogs.asp.net/jongalloway/scripting-net-project-migration-to-automatic-nuget-package-restore | |
# and: https://github.com/owen2/AutomaticPackageRestoreMigrationScript | |
findstr /s /m /i NuGet.targets *.*proj | % {$file = get-item $_; $txt = Get-Content $file | Select-String "nuget`.targets" -NotMatch; $txt | Set-Content $file -Encoding UTF8 } | |
findstr /s /m /i RestorePackages *.*proj | % {$file = get-item $_; $txt = Get-Content $file | Select-String "RestorePackages" -NotMatch; $txt | Set-Content $file -Encoding UTF8 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment