Not sure how to fix this, but I received this error when tryig to publish one of my azure functions.
FYI - I have the project set to .Net 4.6.2, as well as the other projects that have dependencies. The project builds but just doesn't publish
Should I restore all NuGet packages or is there something else I can try!?
Here is the error -
C:\Program Files\dotnet\sdk\2.1.202\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'C:\Users\chuckdawit\Source\Workspaces\YogaBandy2017\YogaBandy2017\Yogabandy2017.StripeWebhook\obj\project.assets.json' doesn't have a target for '.NETFramework,Version=v4.6.1'. Ensure that restore has run and that you have included 'net461' in the TargetFrameworks for your project. [C:\Users\chuckdawit\Source\Workspaces\YogaBandy2017\YogaBandy2017\Yogabandy2017.StripeWebhook\Yogabandy2017.StripeWebhook.csproj]
I would recommend trying the following steps:
There is a discussion about similar issue at length here.