Error publishing (to Azure) dotnetcore app after upgrading from dotnetcore 2.0 to 2.1
Background:
We just upgraded from dotnetcore 2.0 to 2.1. Most stations had the build successfully except 1, but that was because he had some dependencies projects of his own, we changed them all to 2.1 and he also had referenced one of them both in Assembly and in Projects, we removes the assembly as suggested in stackoverflow.
Then while trying to publish we got this exception in most stations:
Most answers hiding in github mentioned deleting the bin and obj, and than help a couple of stations.
We then also Clean and Rebuild, but that also helped just a couple more.
Eventually by mistake I played and changed the Publish Configuration Settings, Save, Publish, and back to old configuration and it worked. I guess that it cleaned it own publish conf cash.
We just upgraded from dotnetcore 2.0 to 2.1. Most stations had the build successfully except 1, but that was because he had some dependencies projects of his own, we changed them all to 2.1 and he also had referenced one of them both in Assembly and in Projects, we removes the assembly as suggested in stackoverflow.
Then while trying to publish we got this exception in most stations:
Assets file '(project)\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.0'. Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project
.Most answers hiding in github mentioned deleting the bin and obj, and than help a couple of stations.
We then also Clean and Rebuild, but that also helped just a couple more.
Eventually by mistake I played and changed the Publish Configuration Settings, Save, Publish, and back to old configuration and it worked. I guess that it cleaned it own publish conf cash.
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting.our sclinbio.com 🙂
ReplyDelete