Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Using Entity Framework Core with WINUI 3 to create model files fails

$
0
0

After having problems using the Entity Framework tools nuget package (EntityFrameworkCore.Tools) in my WINUI 3 solution to generate the model files using the Package Manager Console, I figured I'd try using a new, blank solution to generate the files.

That had the same problem, making me wonder if the approach works with WINUI 3.

The approach I took was:

  1. Created a new project/solution: Blank App, Packaged (WINUI 3 in Desktop)

  2. Added packages EntityFrameworkCore.SqlServer and EntityFrameworkCore.Tools

  3. Opened the Package Manager Console and set the directory to the project

  4. Used the following in the console (credentials and names made generic):

    Scaffold-DbContext "Server=tcp:Server.database.windows.net, 1433;Initial Catalog=ProjectName;User ID=UserID;Password=Password;Persist Security Info=False;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"          Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

The project will not build. I get an error shown below. Being a new project, I figure there must be something wrong with the process, even though I've referenced multiple documents and video instructions. Admittedly, some of these were for UWP or Xamarin since the WINUI instructions seem to be scant.

So my question boils down to this: is my process wrong, or is there a different approach for WINUI 3 projects?

Error APPX1101
Payload contains two or more files with the same destination path 'DbManagerTempModel.deps.json'.
Source files:
C:\Users\ebagby\Desktop\Temp\DbManagerTempModel\DbManagerTempModel\obj\x86\Debug\net6.0-windows10.0.19041.0\win10-x86\DbManagerTempModel.deps.json
C:\Users\ebagby\Desktop\Temp\DbManagerTempModel\DbManagerTempModel\bin\x86\Debug\net6.0-windows10.0.19041.0\win10-x86\DbManagerTempModel.deps.json

DbManagerTempModel
C:\Users\ebagby.nuget\packages\microsoft.windowsappsdk\1.2.220902.1-preview1\buildTransitive\Microsoft.Build.Msix.Packaging.targets 1480


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>