-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Hang in <Exec "dotnet build" #25543
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
I found a workaround by changing <Exec Command="dotnet build" /> to: <Exec Command="powershell -Command "(Measure-Command { dotnet build | Out-Default}).ToString()"" /> Bit of a hack and I'm sure there are other ways to do this workaround but I didn't really want to investigate more. One thing I noticed on my system is that builds would be fast (less than 2 seconds) right as soon as I booted but after maybe 20 seconds builds would suddenly increase by a lot (more than 48 seconds). I'm guessing there's an app that interferes with dotnet somehow but I couldn't figure out which one. |
I took a look at the sample repro - we really really do not suggest running MSBuild and <Project>
<PropertyGroup>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Company>Cedaron Medical, Inc.</Company>
<Product>Cento Forms product family</Product>
</PropertyGroup>
</Project> That should remove a lot of complexity from your build, as well as making it way faster. |
@baronfel : That recommendation only works for the toy example not the real codebase. But what you are looking at there is a workaround for a problem that doesn't really exist anymore. At the time I filed this, project dependencies that were build tools didn't work at all; but they work now with a very long declaration. |
@jhudsoncedaron in that case an binlog would be helpful to triage what exactly is going wrong. If you are able to capture one, please submit it through VS Developer Community as a private attachment (since binlogs can contain PII) and drop a link to the Developer Community item here for follow-up. |
This entire pathway was debugged on a MS support case nearly two years ago now. The problem is due to the inner dotnet build being the first one that invokes the compiler, so that process becomes the vbcs build server and Exec gets hung up waiting for the build server to shut down. But while this case was running the other bug causing ReferenceOutputAssembly to not be honored got fixed so the solution went the other way and this Github issue got left to rot. As you found, the underlying bug is still there but pretty much doesn't matter anymore. Until somebody finds a use case that isn't a workaround for broken project references (unlikely) this can remain closed. |
Instead of running Was this something that you tried in the previous support case? Do you have any links to that I can reference on my end? |
The tracking number is SR #2203220060001485 Related issues: Besides the AssemblyInfo.cs generator we have three full on compilers in the build tree that compile domain specific languages. |
Describe the bug
Hang in <Exec "dotnet build" ; the Exec line waits for the build server to quit due to idle timeout rather than for the build server to finish
I don't fully understand the bug but it appears to happen when dotnet test needs to start a dotnet build job. I can't run the build job inline due to a different bug. The build server needs to not be running or the bug won't reproduce.
To Reproduce
Extract attached zip file and run repro.bat ; ensure that nothing else is using .NET at the time or the repro might not work or even cause problems. You may need to close all open visual studio instances.
If your machine is more powerful than mine, you may need to add more empty console projects as dependencies to BuildToolsCollection.
net6bisect.zip
Exceptions (if any)
None. It's a hang.
Further technical details
The text was updated successfully, but these errors were encountered: