phmonte / Buildalyzer

A utility to perform design-time builds of .NET projects without having to think too hard about it.
MIT License
606 stars 95 forks source link

after upgrade to 3.0.0/1 MsBuildPipeLogger is hanging for certain apps #143

Open ltcmelo opened 4 years ago

ltcmelo commented 4 years ago

I made a description of the issue, together with a PR in (your other) project.

duncanawoods commented 4 years ago

What OS are you using?

Can you share a problematic solution?

ltcmelo commented 4 years ago

I'm running both macos and linux (ubuntu), with .NET Core. I've come across a few projects in which the problem is reproducible, one of them is the music store sample (you might need to git reset the repo to the 3.1 tag).

Note that the buildalyzer does build the project successfully (through I call IProjectAnalyzer.Build, with/without specific targets), as I describe; the issue is the hanging.

ltcmelo commented 3 years ago

Another open source app example: https://github.com/HooliCorp/Goatly.NET

daveaglick commented 2 years ago

There's been a lot of work around the pipe logger recently so I'm 🤞 this is resolved. I'm going to close the issue, but let me know if you're still seeing the problem on Buildalyzer 4.1.2 or later.

ltcmelo commented 1 year ago

I'm 🤞 this is resolved

It isn't :-)
To be thorough, it did work up to net5, but with net6 the incompatibilities around MsBuild emerged back.

daveaglick commented 1 year ago

I'll take another look at this one - with the update to .NET 6 for Buildalyzer pending in #220 maybe that will help (though I'm doubtful - if the problem is that the .NET 6 MSBuild is doing something unexpected for these projects updating the Buildalyzer target won't resolve that).

xavierpinho commented 1 year ago

I can consistently reproduce this hanging:

Here's the dotnet --info: dotnetinfo.txt.

After some debugging, here's what I noticed:

xavierpinho commented 1 year ago

Moreover, just noticed that the hanging is gone once we pass a TargetFramework property to MSBuild. See, e.g. https://github.com/xavierpinho/BuildalyzerDemo/blob/master/BuildalyzerDemo/Program.cs#L15. Rings any bell, perhaps?

wasabii commented 1 year ago

Same issue. .NET 7 and 6. Was using 4.1.6. Upgrading to latest version to see if it still happens, but I assume so since this bug is still open.

I only experience the issue on Linux and OS X.

wasabii commented 1 year ago

Yup. Broken in 5.0.1.

daveaglick commented 9 months ago

I just released several fixes, including a bunch of reference updates. If anyone here is still using Buildalyzer, and still having this problem, I'd be curious if it's resolved in 6.0.3?

wasabii commented 8 months ago

It does not appear to have resolved it for me.