2

My goal is to debug within Visual Studio 2012 Nuget powershell scripts and modules that are installed using Nuget powershell console. Ideally I would like to intercept running these .ps1 scripts under folder: \packages\MvcMembership \tools init.ps1 << Run only once on Solution level \net40 install.ps1 << Run for each Project during installation uninstall.ps1

More info: http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package

When installing a Nuget package: Install-Package MvcMembership for example I believe the first thing is to download a .zip Nuget package (e.x. MvcMembership.nupkg) and extract it into \packages\ folder and then execute init.ps1 conditionally (if MvcMembership is already installed it is not run) and then run install.ps1 for a currently selected project.

So how to intercept running init.ps1 and install.ps1, load it into PowerGui Visual Studio editor and break on first line (or Powershell scripting IDE)? Would I need to add something to these .ps1 files like: Set-PSBreakpoint(which would require me to extract .nupkg edit .ps1 script files and re-zip them again

Thanks Rad

Rad
  • 933
  • 1
  • 15
  • 32

0 Answers0