dotnet / dotnet/efcore

Add-Migration Fails when targeting a network drive

Open
#30,200 3 comments 0 reactions 0 assignees View on GitHub
area-tools customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

Working through the RazorPages Tutorial (https://learn.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start?view=aspnetcore-7.0&tabs=visual-studio).

On page 2, after scaffolding, we need to create the database and intialise it with these two commands.

Add-Migration InitialCreate
Update-Database

Fails saying it cannot find deps.json file even though file is there.

This fails on a Desktop with a redirected user profile. Works OK on a laptop without folder redirection.

I suspect the issue is that the path to the deps.json file is a URL and not to a drive letter.

Workaround was to install EF SDK 7.0 and run these equivilant commands

dotnet ef migrations add InitialCreate
dotnet ef database update

EF Core version: 7.0
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Target framework: (e.g. .NET 7.0)
Operating system: Windows 10
IDE: (e.g. Visual Studio 2022 17.4.4)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.