dotnet publish is slow
See original GitHub issueSteps to reproduce
Create a small console app and add some NuGet packages. Run dotnet publish
to publish app
Expected behavior
The publish step should perform roughly similar to a robocopy operation on newer files
Actual behavior
Dotnet publish is considerably slower
Environment data
dotnet --info
output:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:18 (3 by maintainers)
Top Results From Across the Web
aspnet core build slow only when publishing
Publish can take a long time if your App generates temp files and you don't remove these files regularly. Try to check 'Remove...
Read more >DotNet core slow restore : r/docker
DotNet core slow restore. Hello,. recently I'm facing a increase on the build time (+5 minutes from initial ~1 minute) when doing ....
Read more >Speed of dotnet run vs the speed of dotnet for published ...
On my machine, dotnet run is 2.7s, but dotnet tst.dll is 0.04s. .NET Core is fast. Dotnet publish --self-contained. I could then publish...
Read more >Dotnet task build much slower than VS build task
Can you help figuring out why is it so slow using dotnet task with sdk project while it was very fast (almost like...
Read more >Speeding up some very slow .NET builds - Yaakov's Blog
Very strangely, the .csproj builds at the start of the build were taking the expected amount of time, but the ones at the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A lot of people now use Docker, where the publish is only meant to package the app.
The following takes really long time:
I am also experiencing this. I use docker to build, then publish a console application. The publish call takes ~10 seconds on my dev windows machine, but it takes >30 MINUTES on a micro VM. During that time the machine is practically idle. It gets stuck in between two projects, as if one particular project is the culprit (which is not the same one as publish was called on). I totally expect terrible performance on a micro VM, but this is not just performance, it’s something gone terribly wrong…