Powershell variables clarification

Aug 22, 2013 at 11:56 AM
In my nuspec file I am trying to source the library file content based on build configuration. Now I know the path is relative to the base path which is set to NuGetPrePackage folder. I tried the NuGet way using $configuration$ but I think this will not work because Nugetter does nuget pack .nuspec instead of .csproj. I tried to referece the $(Configuration) build param in a powershell script but I am baffled how the ps1 is being invoked. I am unable to log the PS1 variables either using Diagnostics.Trace or Write-Host or Add-Content. None of them either creates a log file or writes to DebugView when the PS1 is executed within Nugetter.

1) In the sample PS1 script in Nugetter source code there is no param(..) declaration. So how are the variables being passed into my custom PS1 script?
2) Is there a way to get the $(Configuration) msbuild param into a powershell script so that I can copy over the DLLs from either Debug or Release parent folders relative to NuGetPrePackage folder?
If not the only way I see is to always create both Debug and Release nuget packages all times by using the multi package XML file approach for the Multi-package List File Path.

Any pointers?