2

The application which I'm working now was developed in VS 2015. I'm trying to run the same in VS 2019, the build succeeded but fails when trying to publish via FTP / to the local folder as well.

A diagnostic log has been written to the following location .tmp file.

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.WebTools.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.b__3()
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.Publish.Framework.ViewModel.ProfileSelectorViewModel.d__213.MoveNext()

(Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.

System.Exception: Build failed. Check the Output window for more details.

The following are the details in the Output window.

1>------ Build started: Project: EmpDetails.BAL, Configuration: Release Any CPU ------
1>  EmpDetails.BAL -> C:\Test\Projects\source\repos\Project\EmpDetails.BAL\bin\Release\EmpDetails.BAL.dll
2>------ Build started: Project: EmployeeDetails, Configuration: Release Any CPU ------
2>  EmployeeDetails -> C:\Test\Projects\source\repos\Project\EmployeeDetails\bin\EmployeeDetails.dll
3>------ Publish started: Project: EmployeeDetails, Configuration: Release Any CPU ------
3>Connecting to C:\Test\Projects\ProjName\Published Website...
3>
========== Build: 2 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

I googled the same and tried the following

  1. run Visual studio in administrator mode.
  2. Give read/write privileges to the destination folder.
  3. Shorter the URL path
  4. Set "Build + Intellisense" in Error list.

Nothing works.

But when I created the sample application in VS 2019 and I'm able to publish it.

Just a thought, do I have to change/update anything in Web.config file.

I'm struggling to fix this issue for past two days. How to fix it?

TylerH
  • 20,816
  • 57
  • 73
  • 92
Krish
  • 157
  • 3
  • 14
  • 4
    it says `Build failed. Check the Output window for more details.` -- did you do that? Take the text from the `Output` window and copy and paste it in your question. – Andy Aug 08 '20 at 17:52
  • @Andy , As you suggested, I have updated the question with the details of Output window. – Krish Aug 09 '20 at 12:03
  • Here is a [workaround](https://stackoverflow.com/a/48583412/8335151). Maybe you can refer to it. – 大陸北方網友 Aug 10 '20 at 02:12

1 Answers1

1

May be helpful for someone. I had this same issue when i publish my application also. And the weird thing is it solved when i added this to my package reference in .csproj file

    <PackageReference Include="EFCore.BulkExtensions" Version="5.2.8" />

After adding this package reference, when i rebuild and publish, it is working.

RABI
  • 622
  • 15