Deployment issue

Peter_1985 2,526 Reputation points
2022-11-11T06:32:00.9+00:00

Hi,
What is the reason below, when deploying the project?

System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.<---

Microsoft.WebTools.Shared.Exceptions.WebToolsException: Build failed. Check the Output window for more details.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,398 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,273 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,125 questions
{count} votes

Accepted answer
  1. XuDong Peng-MSFT 10,101 Reputation points Microsoft Vendor
    2022-11-14T06:12:21.013+00:00

    Hi @Peter_1985 ,

    What is the reason below, when deploying the project?

    It looks like you are trying to publish your project somewhere. As mentioned, it would be helpful if you could provide more relevant details. For example, are you using visual studio to publish your webapp? What version is it? What project is your webapp? WebForms, .net mvc or .net core or something else?

    I tested publishing WebForms project to Folders in Visual studio 2022, and it works fine. I suggest that you carefully read the error message given by the ** Output Window **, solve these problems one by one.

    In addition, based on the .NET framework version, you could upgrade Microsoft.Net.Compilers.Toolset if it not the latest version. Something like this:
    259930-image.png

    Best regards,
    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Ken Tucker 5,846 Reputation points
    2022-11-13T11:09:36.19+00:00

    There is not enough info here to help you figure out the issue. Does the website build in Visual Studio

    2 people found this answer helpful.

  2. Nazeeh Harfoush 0 Reputation points
    2024-01-29T20:01:47.45+00:00

    i had same problem and i solve it by check the "trim unused code" checkbox in (profile settings → File Publish Options). Best regards.

    0 comments No comments