ASP.net mvc project build failed when upgraded Aspose from 19 to 25 version

Dear Sir,

We have recently purchased aspose total license. earlier we were using aspose 19 version libraries in ASP.net mvc project. We upgraded project with latest binaries i.e 25.0.4
However after upgrade our build is failing giving sgen error .
If we rollback to previous version it works. How to fix the build issue with latest version of aspose libraries.

Please help us.

Thanks
Krushna

@krushna.barhate.

I think this might be a common problem when upgrading from older Aspose libraries (like v19) to the latest (v25.x) in .NET projects, especially ASP.NET MVC ones. Generally, sgen.exe is the XML Serializer Generator Tool in .NET. It’s used during build time to pre-generate serialization assemblies to speed up runtime XML serialization. Newer .NET versions (especially .NET Standard/.NET 6+/Core builds) often drop XML serialization support because they target platforms (like .NET Standard) where sgen doesn’t apply. Also, they no longer provide public parameterless constructors on all types. So when your .csproj or .vbproj still tries to run sgen on these upgraded (new) DLLs, the build breaks.

I think you may try to disable XML serialization generation (sgen) for the project or at least for Aspose assemblies. Then, clean your solution, delete all bin and obj folders and then restart Visual Studio to rebuild and run.

In case, you still find the issue, kindly provide a sample project to reproduce the issue on our end, we will check it soon.