0

I just started on asp net core on VS 2017 and i'm following the microsoft tutorial and no matter what it won't let me add scaffolded item, it doesn't even let me add controllers or views neither and shows the same error.

I'm using VS 2017 15.9.8, I tried rebuilding the project, I tried clearing nuget cache and nothing.

I tried to download the package code generator version 2.2.2 from command line and can't even find it. This error happens after it says it's installing code generator.desin from nuget.

enter image description here

EDIT here is the project properties

enter image description here

EDIT 2

the error is all about this, it won't install this no matter what nor can find it from command line

enter image description here

Jackal
  • 3,359
  • 4
  • 33
  • 78
  • Is this the tutorial : https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start?view=aspnetcore-2.2&tabs=visual-studio , if so ill give it a try. Try restarting Visual Studio maybe, as basic as it sounds. – Daniaal Mar 10 '19 at 18:29
  • did this plenty of times and yes that is the tutorial, got this error when had to create scaffold item part – Jackal Mar 10 '19 at 18:32
  • I just tried it and it worked no issue at all. Try create a new project and see if it still does it. Another reason could be is you have not got the 2.2 sdk installed. – Daniaal Mar 10 '19 at 18:37
  • I have it installed, i even reinstalled visual studio and made a new project – Jackal Mar 10 '19 at 19:04
  • What version of dotnet is your project? You can see this by right clicking your project "RazorPageMovie" then you will see "Target Framework". I am adamant to get to the bottom of this. – Daniaal Mar 10 '19 at 19:21
  • see updated main post, i'm using 2.2 – Jackal Mar 10 '19 at 19:23

1 Answers1

0

OK i found how to solve this problem... It could not install the package cause nuget managet package source only had microsoft studio offline packages and no other option... I have no idea why did it not have the online source since this was a fresh install from VS 2017 community from official website... Refer to this link for finding the solution Here

enter image description here

Jackal
  • 3,359
  • 4
  • 33
  • 78