Published .net core program encountered problems

Today released a small .net core program, tried several times always being given:
Asset file "obj \ project.assets.json" no ".NETCoreApp, Version = v2.0" goal. Make sure that you run the restore, and "netcoreapp2.0" is included in TargetFrameworks project.

I wondered what did not change, Mei Zhe, only search the web search, people still run into this problem a lot.
Many ways to say what to delete, and then recompile the like. For example, there is that deleting obj / bin, there is said to delete FolderProfile.pubxmlthis file.

I did not realize it was a publishing error, that is the compilation fails, then according to their own judgment, that since it is the wrong version, which is not my bag does not match it? Because my computer just the .net core sdk 2.1 installation.
Then spent some time trying to upgrade AspNetCore.All in nuget this package, the upgrade from 2.0.9 to 2.1.6.
In the process, they encountered a problem that can not be upgraded, because depends CodeGeneration packages need to be upgraded.

After the upgrade is completed, the successful compilation, released but still get the error. Forward can not be resolved, then still try to remove bin / obj and so on.
Delete several times later discovered, or failed to publish, then I realized it was a post questions, not compiled.

So back to the beginning to see a solution, delete FolderProfile.pubxmlthe file and re-released.
Become.

Thought the reason, there may be later upgraded native sdk, some files before using 2.0 sdk is released, it is not compatible with the new.
But specific reasons, in fact, read some posts are also discussing how to do to solve the problem, not discussed is why there is such a problem. . .

Guess you like

Origin www.cnblogs.com/mosakashaka/p/12608173.html