When I edit my.pubxml file in the one click publish screen. My Entity-Framework Migrations section shows this error and I can't find any solutions that work for me. Has anyone had this issue or know how to resolve it?
I ran dotnet tool install -g dotnet-ef --ignore-failed-sources
and got the message Tool 'dotnet-ef' is already installed.
I'm not sure if I'm following correct Stack Overflow etiquette here, but: in my case, it turned out that this error was a red herring. The problem was in my appsettings.json file; where a connection string had been created for my local database (which I don't use).
If you expand the "Databases" section in the Publish settings, and see a similar reference to an unused local database, then stripping out the connection string should hopefully lead to the entire "Entity Framework Migrations" section disappearing (and the error, with it).
(Of course, if you actually use EF migrations, then this solution may not work for you...)
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.