Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable in NuGet pkg mgr console / update install to insert into nuget profile #16

Open
sayedihashimi opened this issue Feb 4, 2014 · 3 comments
Milestone

Comments

@sayedihashimi
Copy link
Member

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.

@xavierdecoster
Copy link

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 proper uninstall.ps1, same effect as using init.ps1 in the above scenario
  • don't use any of the above and expose Enable-PSBuild and Disable-PSBuild cmdlets in init.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.

@sayedihashimi
Copy link
Member Author

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?

@xavierdecoster
Copy link

Oooh, that makes perfect sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants