I have an asp.net core web app. If I click build -> Rebuild, it finishes in just under 15 seconds.
However, if I publish it (via web deploy to azure, FTP to azure, or even just a file system publish to a local folder), it takes a very long time. Over a half hour before I give up and cancel it.
What is different about publishing that could cause this? How can I diagnose this to make it go faster?
I'm not sure if it's relevant, but it spends a long time outputting messages like this:
Added Item(s): ResolvedFileToPublish= C:\filepath\bg6.jpg CopyToPublishDirectory=PreserveNewest RelativePath=wwwroot\images\bg6.jpg TargetPath=wwwroot\images\bg6.jpg
Try the following two ways
1.Try disabling windows defender on the machines where publish is slow to see if it fixes the issue.You could have some exclusions to the real-time protection.
2.Make the following settings in your project: Tools-> Options-> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With