Reputation: 1081
I am building a nuget package which uses an install.ps1 script in the tools folder. I want to pass parameters into this install script in the install-package command.
So running in package manger inside visual studio
install-package mypackage -myparam param
param would then be passed into the install.ps1 file inside the tools folder.
Is this possible? Is there a better way to accomplish this?
Upvotes: 1
Views: 757
Reputation: 14810
AFAIK that's not possible. The Install-Package cmdlet exposes a few options which map to properties on the InstallPackageCommand in the NuGet sources. You could maybe log an issue or submit a pull request for this kind of functionality?
Instead of trying to extend the Install-Package cmdlet, why not create your own cmdlets and expose that one after installation (similar to MVC scaffolding package)?
Upvotes: 1