I have a preexisting ASP.NET Core 3.0 application which is successfully deployed to an Azure App Service (using the AspNetCoreModuleV2 module). After upgrading the app to (today's release of) ASP.NET Core 3.1, the application builds and runs correctly on my local version of IIS Express. When I attempt to publish to the Azure App Service using (today's release of) Visual Studio 16.4, however, I receive the following error:
Assets file 'C:\Project\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v3.0'. Ensure that restore has run and that you have included 'netcoreapp3.0' in the TargetFrameworks for your project.
Notes
- My
csprojfile's<TargetFramework>is correctly set tonetcoreapp3.1. - All
<PackageReference>'s toMicrosoft.AspNetCore,Microsoft.EntityFrameworkCore, andMicrosoft.Extensionshave been updated to3.1.0 - I have cleaned my solution, and even nuked my
objfolder to ensure there aren't any lingering references. - This error is being generated from the
3.1.100version ofMicrosoft.PackageDependencyResolution.targets.
I get that something is still hanging onto the .NET Core 3.0 dependencies. But it's unclear why that's only causing problems during deployment. Is Azure App Service not yet ready for .NET Core 3.1? Or is this an issue with the dependency resolution targets?