0

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?

Patrick95
  • 110
  • 12
  • Why 4.6.1 and not 4.8? I don't beleive 4.6.1 is even supported anymore. – Dai Dec 12 '22 at 22:21
  • _"Is there a valid replacement or work around?"_ - assuming you aren't actually using `System.Web.Mobile.dll` at all then just ensure it isn't referenced in any of your `web.config` files _and_ none of your `.csproj` files. – Dai Dec 12 '22 at 22:22
  • @Dai I set to 4.6.1 because that is what all our other applications are running on. I plan to later upgrade all to a supported version but figured to quickly get this pipeline built out, I would go with the most familiar one. I ended up removing all references to it as after I dug further, it never appeared to be used. – Patrick95 Dec 15 '22 at 18:07

1 Answers1

1

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.

Ging Yuan-MSFT
  • 689
  • 2
  • 6