To remove this error check your code manually if every thing in the code you write is okay…
if your code is okay check the .csproj file…
write the following code if not present..
<ItemGroup> <Folder Include=”wwwroot\”/> </ItemGroup>
after again write migration command:
go to (project manager console) PM> dotnet ef migrations add YourMigrationName
If still not solved look at:https://stackoverflow.com/questions/44785540/ef-core-add-migration-build-failed/47775946
Thank you my problem is not solved.