psbuild
psbuild copied to clipboard
Enable in NuGet pkg mgr console / update install to insert into nuget profile
When psbuild is installed we should add it to the nuget profile as well that way a VS user can easily use this from the package manager console.
AFAIK, these are the only possible approaches to this (but feel free to correct me if I'm wrong :))
- use
init.ps1
and instantly install psbuild into the NuGet profile (no uninstall functionality, package can be removed, psbuild will remain available) - use
install.ps1
and ´uninstall.ps1` (requires the package to remain installed at least once on the system) - use
install.ps1
without a properuninstall.ps1
, same effect as using init.ps1 in the above scenario - don't use any of the above and expose
Enable-PSBuild
andDisable-PSBuild
cmdlets ininit.ps1
init.ps1
is called each time the package is loaded (eg during visual studio solution load, or during package install before install.ps1
)
install.ps1
is called each time the package gets installed
All approaches require checking whether psbuild is already installed or not. Any preference?
Also, the package should be a developmentOnly package.
Thanks for the comments. This is a bit different from what you are thinking of. Here is the user statement.
- As a user I would like to be able to use psbuild for building from the package manage console
In this case the user does not want/need to install the psbuild nuget package. Instead he wants the commands to be made available via the pkg manager console.
Like many other PS hosts the pkg mgr console has its own PS profile. You can see this by printing out the value for $profile from inside the console. The idea here is that if the user invokes the GetPSBuild.psm1 script (see readme.md for directions). Typically this lives in the same folder as the standard PS profile and with the name Nuget_profile.ps1.
The idea is that when the user installs via with the command
(new-object Net.WebClient).DownloadString("https://raw.github.com/ligershark/psbuild/master/src/GetPSBuild.ps1") | iex
We add the module to the PS profile.ps1 and nuget_profile.ps1 that way users can invoke commands w/o having to install the nuget pkg.
Does that make sense?
Oooh, that makes perfect sense!