Azure build pipeline: Error ASPPARSE: Could not load file or assembly 'System.web.mobile' or one of its dependencies

338 Views Asked by At

This is an old application and I have been tasked with building an azure pipeline. We are using VS 2019 and upgraded the application to .net framework 4.6.1.

Build pipeline is failing with this error: Error ASPPARSE: Could not load file or assembly 'System.web.mobile' or one of its dependencies. The system cannot find the file specified.

Application builds and runs fine locally. Once I try to build an azure build pipeline I get error above.

From searching online it seems system.web.mobile is no longer used in 4.6.1. Is there a valid replacement or work around?

1

There are 1 best solutions below

0
Ging Yuan-MSFT On BEST ANSWER

The problem was that the "System.Web.Mobile.dll" on your local machine, make sure restore this assembly in your pipeline.

If you don't use this assembly, as @Dai mentioned, you can remove it in your web.config files and .csproj files.