✅ Razor pages template gives me an immediate build error
Why is it telling me "The type or namespace name 'EntityFrameworkCore' does not exist in the namespace 'Microsoft.AspNetCore.Identity'" right after I generated a Razor pages project template with single user authentication enabled?
How do I fix this?
22 Replies
thats weird
try adding the package manually
I've tried to remove and add them again, but I'm getting the same thing
you have the package added?
can i see the csproj?
to be clear, youre just creating the project and changing nothing right?
That's right
visual studio?
I created it and immediately tried to build it but it gave me build errors
Yes
can you clean and try to build from the cli?
make sure obj and bin are deleted
Where's obj and bin, I'm completely new to dotnet
in the output folder
oops sorry its in the same folder as the csproj
it is the build output folder
forgot for a sec
anyway
just delete those, then
dotnet clean
and dotnet build
Thanks, I did now, but after building it's telling me
ah
you need to add nuget.org as a source
How do I do that, and how come?
what does
dotnet nuget list source
output?yeah for some reason nuget.org isnt there
how did you download .net btw?
dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget.org
to add itI believe it was through the installer from the browser, I don't remember now, it was quite some time ago
It looks like it's building correctly now
every once in a while someone would come here with the same issue where nuget.org not added as a source
and im yet to figure out how that happens
it should be the default
Don't give up
Thank you though, it built now
$close
If you have no further questions, please use /close to mark the forum thread as answered