Errore NuGet NU5023

The assets file produced by restore does not exist. Try restoring the project again. The expected location of the assets file is F:\project\obj\project.assets.json.

Problema

Il progetto passato a msbuild -t:pack non contiene un file assets nella directory obj.

Soluzione

Eseguire msbuild -t:restore l'operazione sul progetto in pacchetto prima di eseguire l'operazione pack.