After upgrading an project from .NET 6.0 to .NET 8.0, you may encounter the following error when trying to publish the project to IIS:
Читать далее‘.\obj\project.assets.json’ doesn’t have a target for ‘net6.0’. Ensure that restore has run and that you have included ‘net6.0’ in the TargetFrameworks for your project.