Reputation: 20995
I'm running visual studio 2017, I'm trying to FTP deploy a .net-core 2.0 project to my server. My project builds fine normally but when I attempt to publish I get an error:
System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details. --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass40_0.b__2() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()
This issue only occurs when I publish. A bunch of error popup in the output window for third party dlls Microsoft.AspNetCore.StaticFiles
and System.IdentityModel.Tokens.Jwt
Any idea on how I can get publish working?
Upvotes: 3
Views: 8866
Reputation: 165
Right click on project -> Select "Publish" in the Menu then create "+New" to create publish profile.
Upvotes: 1
Reputation: 2831
For VS2019 and IIS 10, Recycling the application pool the application uses that you're deploying worked for me.
Upvotes: 0
Reputation: 4829
Take a look at FolderProfile.pubxml file located in YourProject\Properties\PublishProfiles and make sure term is configured with correct version.
Upvotes: 2
Reputation: 2374
For what it's work, I had the exact same error:
System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.<PublishAsync>b__2()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__127.MoveNext()
---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---
And the remote server was out of disk space. The publish console didn't show anything after the publish, but if I scroll up I start to see this:
2>Unable to add 'Scripts/jquery-3.4.1.js' to the Web site. Unable to add file 'Scripts\jquery-3.4.1.js'. There is not enough space on the disk.
Moral of the story this error seems to point towards something external to the project itself. Hopefully that helps someone.
Upvotes: 3