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

Package Manager Console freezes Visual Studio 2015 with custom profile #1016

Closed
david-grogan opened this issue Jul 26, 2015 · 8 comments
Closed
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue
Milestone

Comments

@david-grogan
Copy link

I have customised NuGet_profile.ps1 to add some extra info to my command line, but since upgrading to VS 2015 it freezes the entire IDE every time I open the Package Manager Console. The console window displays 'Initializing PowerShell host...', and the console itself will have displayed anything output from my script up until it first freezes.

I've trimmed my script down to the simplest script possible to cause the freeze, which is this:

function global:prompt {
Write-Host $pwd
return "> "
}

The Write-Host seems to be causing the problem. There's no problem calling Write-Host generally, just from inside the prompt function.

I have a similar profile script for my Azure PowerShell, and that still works fine.

Thanks,
David

@emgarten emgarten added this to the 3.2.0-Beta milestone Jul 27, 2015
@emgarten
Copy link
Member

We'll take a look at fixing this for a future release.

@yooakim
Copy link

yooakim commented Aug 21, 2015

I also experience that the entire IDE freezes when I try to open the Package Manager Console. I've started a brand new project and when I open the package Manager Console the IDE freezes and all I see is Initializing PowerShell host...

Only way to come out of this is to kill VS using TaskManager

@thargy
Copy link

thargy commented Aug 24, 2015

+1 for this

4 similar comments
@liammoat
Copy link

+1 for this

@mgolus
Copy link

mgolus commented Aug 25, 2015

+1 for this

@ghaefele
Copy link

+1 for this

@mmoore99
Copy link

+1 for this

@yishaigalatzer
Copy link

This is a duplicate of #917

Here is a workaround @zbrad posted on #917

I finally tracked down a workaround that is working for me, by testing the value of $profile in my profile.ps1, eg:
if (!$profile.Contains("NuGet_profile")) {

normal start

. $PSScriptRoot\prompt.ps1
}

@yishaigalatzer yishaigalatzer added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue
Projects
None yet
Development

No branches or pull requests

9 participants