I'm trying EF Core and I'm using the example in this link https://docs.microsoft.com/en-us/ef/core/get-started/uwp/getting-started
With SQLite, everything works ok, when I try to do the same with
Microsoft.FrameWorkCore.SqlServer, I run the
Add-Migration and it finishes ok, then I set the UWP app as start up project and after I get the following error:
System.PlatformNotSupportedException: 'LocalDB is not supported on this platform.
Where the UWP app is trying to create the DB, path and folder?
My sqllocaldb information is the following
C:\>sqllocaldb Microsoft (R) SQL Server Express LocalDB Command Line Tool Version 13.0.1601.5 Copyright (c) Microsoft Corporation. All rights reserved. Usage: SqlLocalDB operation [parameters...] C:\>sqllocaldb i MSSQLLocalDB Name: MSSQLLocalDB Version: 13.1.4001.0 Shared name: Owner: Auto-create: Yes State: Stopped Last start time: Instance pipe name: C:\>sqllocaldb i ProjectsV13 Name: ProjectsV13 Version: 13.1.4001.0 Shared name: Owner: Auto-create: No State: Stopped Last start time: Instance pipe name:
The UWP SqlClient does not support named pipes, use the free SQL Server Express and enable tcp connections from it.
Solution: Besides enabling the TCP protocol you have to set the 'Enterprise Authentication' capability in the Package.appxmanifest. Otherwise 'Trusted_Connection=True' doesn't work. From: https://github.com/dotnet/corefx/issues/22890#issuecomment-333305084