forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.ps1
More file actions
17 lines (13 loc) · 731 Bytes
/
Copy pathuninstall.ps1
File metadata and controls
17 lines (13 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
param($installPath, $toolsPath, $package, $project)
<#
$targetsFileName = 'ServiceStack.Razor.BuildTask.targets';
# Need to load MSBuild assembly if it's not loaded yet.
Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
# Grab the loaded MSBuild project for the project
$msbuild = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1
# Remove imports to .targets
$msbuild.Xml.Imports | Where-Object {$_.Project.ToLowerInvariant().EndsWith($targetsFileName.ToLowerInvariant()) } | Foreach {
$_.Parent.RemoveChild( $_ )
[string]::Format( "Removed import of '{0}'" , $_.Project )
}
#>