I recently upgraded from Visual Studio 2017 Community Edition from 15.6.2 to 15.6.3, and since then I have not been able to successfully deploy my .NET Core 2.0 web application to my Azure App Services using an existing publish profile.
Error messages: "C: \ Program Files \ dotnet \ sdk \ 2.1.102 \ Sdks \ Microsoft.NET.Sdk \ build \ Microsoft.PackageDependencyResolution.targets (167.5): Error: asset file '\ project.assets. json 'has no purpose for' .NET NET Corepp, Version = v2.0 '. Make sure the restore is complete and that you have included "netcoreapp2.0" in TargetFrameworks for your project.
I tried:
- Re-downloaded the new package profiles, and then restored and published.
- Delete the project.assets.json file from the \ obj \ folder, restore the publication.
- Change the target structure in the project properties from .NET Core 2.0 to another environment and vice versa, restore and publish.
None of the above led to a successful deployment, and I continued to receive the same error message.
I also examined the project.assets.json file, and the goal is ".NETCoreApp, Version = v2.0."
I started the recovery of "dotnet", "dotnet build" and "dotnet deploy", all of which succeeded.
Has anyone had this problem and solved it successfully?
source share