summaryrefslogtreecommitdiff
path: root/src/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps1
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-11-24 13:49:30 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-11-24 13:49:30 -0500
commita3f21685049cabf2d824c8060dc0b1de47e9449e (patch)
treead9add30e9da2a50e0ea0245f1546b7378f0d282 /src/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps1
parent6521df7b131924835eb797251c1e956fae0d6e13 (diff)
parent277bf082675b98b95bf6184fe3c7a45b969c7ac2 (diff)
downloadSMAPI-a3f21685049cabf2d824c8060dc0b1de47e9449e.tar.gz
SMAPI-a3f21685049cabf2d824c8060dc0b1de47e9449e.tar.bz2
SMAPI-a3f21685049cabf2d824c8060dc0b1de47e9449e.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps1')
-rw-r--r--src/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps165
1 files changed, 0 insertions, 65 deletions
diff --git a/src/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps1 b/src/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps1
deleted file mode 100644
index 4bed3337..00000000
--- a/src/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps1
+++ /dev/null
@@ -1,65 +0,0 @@
-param($installPath, $toolsPath, $package, $project)
-
-if($project.Object.SupportsPackageDependencyResolution)
-{
- if($project.Object.SupportsPackageDependencyResolution())
- {
- # Do not uninstall analyzers via uninstall.ps1, instead let the project system handle it.
- return
- }
-}
-
-$analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers") * -Resolve
-
-foreach($analyzersPath in $analyzersPaths)
-{
- # Uninstall the language agnostic analyzers.
- if (Test-Path $analyzersPath)
- {
- foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude *.resources.dll)
- {
- if($project.Object.AnalyzerReferences)
- {
- $project.Object.AnalyzerReferences.Remove($analyzerFilePath.FullName)
- }
- }
- }
-}
-
-# $project.Type gives the language name like (C# or VB.NET)
-$languageFolder = ""
-if($project.Type -eq "C#")
-{
- $languageFolder = "cs"
-}
-if($project.Type -eq "VB.NET")
-{
- $languageFolder = "vb"
-}
-if($languageFolder -eq "")
-{
- return
-}
-
-foreach($analyzersPath in $analyzersPaths)
-{
- # Uninstall language specific analyzers.
- $languageAnalyzersPath = join-path $analyzersPath $languageFolder
- if (Test-Path $languageAnalyzersPath)
- {
- foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude *.resources.dll)
- {
- if($project.Object.AnalyzerReferences)
- {
- try
- {
- $project.Object.AnalyzerReferences.Remove($analyzerFilePath.FullName)
- }
- catch
- {
-
- }
- }
- }
- }
-}