Assets file project.assets.json not found when running a build on Azure Devops

My problem turned out to be a solution that didn't include all the necessary projects.

I have a master solution file that includes all my projects, and a number of smaller solution files with only some of the projects. The master solution built fine in Azure DevOps, but the partial solution failed.

I realized that the missing project.assets.json file belonged to a project that needed to be included in this failing solution.


Some of the projects use the PackageReference format but the .sfproj project uses the packages.config file.

I still don't understand why the build started failing, but I was able to find a workaround. Given that PackageReference is not yet supported in Service Fabric projects, my workaround was to use both restore tasks as follows:

Build tasks