Skip to content

Instantly share code, notes, and snippets.

View CaitieM20's full-sized avatar

Caitie McCaffrey CaitieM20

View GitHub Profile
@CaitieM20
CaitieM20 / Install.ps1
Created July 3, 2013 04:47
Powershell script to be used with Nuget packages. On install it programatically discovers all T4 Text Template Files in the Nuget Package and modifies their addition to the Project to exclude the Generator and LastGenOutput tags.
param($installPath, $toolsPath, $package, $project)
#Get all of the T4 files in the package extension .tt
$files = $package.GetFiles() | Where-Object {$_.EffectivePath -match "tt$"}
foreach ($file in $files)
{
$fileName = $file.EffectivePath
$ProjectItem = $project.ProjectItems | Where-Object {$_.Name -eq $fileName}