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:

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.









Comments

  1. Great Post,really it was very helpful for us.
    Thanks a lot for sharing!
    I found this blog to be very useful!!
    JAVA training in Bangalore

    ReplyDelete

Post a Comment

Popular posts from this blog

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

Asp.Net Ending Response options, Response.End() vs CompleteRequest()

Console Application.DoEvents() SOLVED!! example