Azure DevOps Build pipeline failing at Publish step after upgraded to dot net 8

Amit Thore 41 Reputation points
2024-03-13T12:31:03.9266667+00:00

I am trying to upgrade my ASP.Net Core 2.2 project to Dot Net 8.

We have ReactJS as a front end and using node 16.16.0 version which were working fine on dot net core 2.2 project.

After project upgrade to dot net 8 it’s working fine on my local machine. But, in Azure DevOps Build pipeline it’s failing at Publish step.

In Old version the build pipeline it was using Microsoft (R) Build Engine version 16.7.3+2f374e28e for .NET

Now with dot net 8(VS2022) it's using MSBuild version 17.9.4+90725d08d for .NET.

ERROR in [at-loader] ./ClientApp/components/Common/button.tsx:30:20 TS2503: Cannot find namespace 'JSX'. ERROR in [at-loader] ./ClientApp/components/AdminTool/GameId.tsx:81:52 TS2339: Property 'className' does not exist on type 'LinkProps | Readonly

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,385 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,175 questions
{count} votes

Accepted answer
  1. Monalla-MSFT 11,641 Reputation points
    2024-03-13T17:20:05.6733333+00:00

    @Amit Thore - Welcome to Microsoft Q&A and thanks for reaching out.

    Devops is not currently supported here on Microsoft QnA.

    The Community Members and Engineers are actively answering questions in dedicated forums here. Please post your question in that forum:

    https://developercommunity.visualstudio.com/spaces/21/index.html

    https://azure.microsoft.com/en-in/support/devops/

    Hope this helps. and please feel free to reach out if you have any further questions.


    If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,286 Reputation points
    2024-03-13T18:00:20.9133333+00:00

    most likely its the node version installed on azure dev ops does not match your local machine. node 16 has been out of support for over a year. you should upgrade your node version. you can downgrade the build server with:

    https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/node-tool-v0?view=azure-pipelines

    0 comments No comments