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

Amit Thore 41 Reputation points

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

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

Accepted answer
  1. Bruce ( 54,621 Reputation points

    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:

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Monalla-MSFT 11,316 Reputation points

    @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:

    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