0

I am trying to build a read only .net rest api using the following tutorial on Microsoft Docs-(https://learn.microsoft.com/en-us/aspnet/web-api/overview/older-versions/build-restful-apis-with-aspnet-web-api)

According to the tutorial when i add a controller the following error popup.enter image description here

I have tried other solutions on stackoverflow like

  • Clearing ComponentModelCache
  • Also deleting .vs folder in solution But nothing helped
VillageTech
  • 1,968
  • 8
  • 18
Alex Ferguson
  • 107
  • 2
  • 10
  • Does this answer your question? [An error occurred while retrieving package metadata for \*\*\*](https://stackoverflow.com/questions/45103492/an-error-occurred-while-retrieving-package-metadata-for) – SᴇM Dec 12 '19 at 10:27
  • No this does not solve the problem – Alex Ferguson Dec 12 '19 at 10:32
  • As a workaround for now, I suggest u to just copy your already existing "WeatherForecastController" and change the name – Csharpest Dec 12 '19 at 12:39

1 Answers1

0

Try changing your project to .NET Framework instead of .NET Core and make sure you are able to create a solution with .NET Framework. If the issue still persists please provide some additional log details of VisualStudio when creating with .NET Core