I am having trouble with ps script in init.ps1 of nuget package. I am trying to create a solution folder upon install of the package AND then copy dlls/pdbs to this folder (and delete the source dll/pdbs installed by the package in the project).
I am able to create the solution folder, but am having trouble copying the files from the \content\temp directory to the solution folder.
In fact, i really want a real folder on the filesystem and a solution folder to match, so the copy should copy the files to the real file system folder and then be added to the solution folder.
The copy portion is not working and I am not getting any output errors. Bit lost.
param($installPath, $toolsPath, $package, $project)
# Get the open solution.
$solution = Get-Interface $dte.Solution ([EnvDTE80.Solution2])
# Create the parent solution folder.
$parentProject = $solution.AddSolutionFolder("MyDlls")
# Create a child solution folder.
$parentSolutionFolder = Get-Interface $parentProject.Object ([EnvDTE80.SolutionFolder])
$fileName = (Join-Path $installPath "\temp\mydll")
$projectFile = $parentSolutionFolder.AddFromFile($fileName)
Write-Host ""
Write-Host $sourcePath
Write-Host $parentSolutionFolder