Occasionally, NuGet leaves a ConHost.exe process running that causes MSBuild lines to wrap.


This is a really odd one, but basically, if I use NuGet (either the interactive NuGet window, or indirectly through the MSBuild task) sometimes the conhost.exe process that gets spawned will stick around, and cause all future builds to word wrap the MSBuild output at 80 characters.

Update: apparently NuGet checking to see if NuGet has an update will also cause the issue.

file attachments

Closed Oct 21, 2013 at 7:05 PM by feiling


Haacked wrote Nov 22, 2011 at 9:32 PM

What operating system are you using?

Haacked wrote Nov 22, 2011 at 9:33 PM

Alex, can you try to repro this?

aldion wrote Nov 22, 2011 at 9:36 PM

Reminds me of #1214. I'll have a look.

moswald wrote Nov 23, 2011 at 12:10 AM

Win7, x64
VS Ultimate

I can repro it on my machines, but it does not happen on any of my coworkers'. I definitely have the most extensions installed, and I may be the only one with NuGet installed (we use the "download packages on build" option, rather than checking in binaries). --Which reminds me, this only started happening to me when we switched to downloading on build. I know msbuild doesn't really clean up itself properly when custom tasks are involved, as I have a somewhat similar bug filed with xUnit.

Yes, reading #1214, that is exactly what is happening. The lines wrap at 80 characters because that is the default console wrap. When I saved a new default through running cmd, the lines started wrapping at the new width.

Please let me know if you have any other questions; I'd love to solve this. Right now I have to install NuGet, install a new package, then uninstall NuGet.

JeffHandley wrote May 15, 2012 at 8:59 PM

Closing - no additional reports of this.

** Closed by JeffHandley 05/15/2012 1:59PM

JeffHandley wrote Nov 2, 2012 at 12:04 AM

New report from Brad Wilson indicating that this is happening to his whole team.

BradWilson wrote Nov 2, 2012 at 12:06 AM

It happens both to our product, as well as xUnit.net (you'll need to introduce a warning or error in the latter to see it, of course, since the code is warning free).

BradWilson wrote Nov 2, 2012 at 12:07 AM

I can also verify that killing conhost.exe gets me the correct output.

BradWilson wrote Nov 2, 2012 at 12:15 AM

Screenshot attached.

moswald wrote Nov 2, 2012 at 1:17 AM

I can also verify that this occasionally happens to me. On my work PC, I have to install NuGet when I need it, use it, then uninstall. My work laptop doesn't have the issue (that I remember). This PC at home also does not exhibit the problem.

dotnetjunky wrote Mar 12, 2013 at 4:03 PM

Does anyone in this thread still encounter this issue with the latest nuget.exe build?

feiling wrote Oct 21, 2013 at 7:05 PM

Couldn't repro after many tries. Close the issue for now. Please reopen if you still encounter this problem using NuGet >= 2.7

aignatenko wrote Nov 11, 2013 at 8:30 AM

Seeing this right now. Nuget 2.7.40911.225 (as reported by extension manager). VS 2010.
There are two conhost.exe processes in the process list. After killing them, the output windows stops text wrapping.
Can't find a stable repro case, unfortunately.