cleanup packages folder

This commit is contained in:
Brendan Forster
2015-12-20 14:08:56 +10:30
parent 51e56a86d7
commit 64f9079a13
12 changed files with 0 additions and 93 deletions

View File

@@ -1,17 +0,0 @@
#DocPlagiarizer
##What is it?
A build task for MSBuild that will copy xml documentation comments from interfaces to implementations.
##How do I install it?
Install using NuGet
Install-Package DocPlagiarizer
This will add the build task to your project, create a build target that calls the task and set that target to run before `Build`.
##How do I use it?
Build your project and let your editor reload any changed files.

View File

@@ -1,43 +0,0 @@
param (
$InstallPath,
$ToolsPath,
$Package,
$Project
)
$TaskFile = "DocPlagiarizer.dll"
$TaskPath = $ToolsPath | Join-Path -ChildPath $TaskFile
Add-Type -AssemblyName "Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
$buildProject = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($Project.FullName) |
Select-Object -First 1
$ProjectUri = New-Object -TypeName Uri -ArgumentList "file://$($Project.FullName)"
$TaskUri = New-Object -TypeName Uri -ArgumentList "file://$TaskPath"
$RelativePath = $ProjectUri.MakeRelativeUri($TaskUri) -replace '/','\'
$existingTasks = $buildProject.Xml.UsingTasks |
Where-Object { $_.AssemblyFile -like "*\$TaskFile" }
if ($existingTasks) {
$existingTasks |
ForEach-Object {
$buildProject.Xml.RemoveChild($_) | Out-Null
}
}
$buildProject.Xml.AddUsingTask("DocPlagiarizerTask", $RelativePath, $null) | Out-Null
$existingTagets = $buildProject.Xml.Targets |
Where-Object { $_.Name -like "DocPlagiarizerTarget" }
if ($existingTagets) {
$existingTagets |
ForEach-Object {
$buildProject.Xml.RemoveChild($_) | Out-Null
}
}
$target = $buildProject.Xml.AddTarget("DocPlagiarizerTarget")
$target.BeforeTargets = "Build"
$target.AddTask("DocPlagiarizerTask")
$Project.Save()

View File

@@ -1,33 +0,0 @@
param (
$InstallPath,
$ToolsPath,
$Package,
$Project
)
$TaskFile = "DocPlagiarizer.dll"
Add-Type -AssemblyName "Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
$buildProject = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($Project.FullName) |
Select-Object -First 1
$existingTasks = $buildProject.Xml.UsingTasks |
Where-Object { $_.AssemblyFile -like "*\$TaskFile" }
if ($existingTasks) {
$existingTasks |
ForEach-Object {
$buildProject.Xml.RemoveChild($_) | Out-Null
}
}
$existingTagets = $buildProject.Xml.Targets |
Where-Object { $_.Name -like "DocPlagiarizerTarget" }
if ($existingTagets) {
$existingTagets |
ForEach-Object {
$buildProject.Xml.RemoveChild($_) | Out-Null
}
}
$Project.Save()