Creating dynamic ASP.NET MVC EF Core application with Npgsql EF Core provider.
I tried to implement runtime scaffolding as described in
https://medium.com/@zaikinsr/roslyn-ef-core-runtime-dbcontext-constructing-285a9d67bc87
In project.config file
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
is changed to
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.2"/>
After that yellow warning icons appear in Visual Studio Solution Explore Dependecies tree:
Build and package manager windows do not contain any warnings. How to find warning message related to this icon? How to fix this?
Which is proper way to use scaffold in runtime?
When I tried your steps on my side with Asp Net Core 3.1 MVC
project, I did not face the same situation with the yellow icon.
Please try the following steps:
clean nuget caches first or just delete all files under C:\Users\Administrator\.nuget\packages
.
Then , close VS, , delete .vs
hidden folder under the solution folder, bin
and obj
folder of your project.
After that, restart your project to test again.
add dotnet restore
under Project Properties --> Build Events --> Pre-build event command line , then build your project to test again.
create a new Asp Net Core project to test again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.