Skip to content

"dotnet-ef migrations bundle" command broken on Linux with .NET 10 #36142

@ptffr

Description

@ptffr

Bug description

Starting from version 10.0.0-preview.1.25081.1 of dotnet-ef the bundle generation is broken on Linux.

Seems like it has a hard time finding the .deps.json file due to the backslash before Debug/

Build started...
Build succeeded.
The specified deps.json [/home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/bin\Debug/net10.0/EfCoreBundleBug.Api.deps.json] does not exist

To reproduce this in the provided repo just run dotnet ef migrations bundle -s EfCoreBundleBug.Api/ -p EfCoreBundleBug.Infra/

Also this issue seems to only happen when you have separate Startup and DbContext project.

Your code

https://github.com/ptffr/EfCoreBundleBug

Stack traces


Verbose output

Using project '/home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Infra/EfCoreBundleBug.Infra.csproj'.
Using startup project '/home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/EfCoreBundleBug.Api.csproj'.
dotnet msbuild /getProperty:ProjectName /getProperty:AssemblyName /getProperty:Language /getProperty:OutputPath /getProperty:PlatformTarget /getProperty:ProjectAssetsFile /getProperty:ProjectDir /getProperty:RootNamespace /getProperty:RuntimeFrameworkVersion /getProperty:TargetFileName /getProperty:TargetFrameworkMoniker /getProperty:Nullable /getProperty:TargetFramework /getProperty:TargetPlatformIdentifier /getProperty:Platform /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Infra/EfCoreBundleBug.Infra.csproj
dotnet msbuild /getProperty:ProjectName /getProperty:AssemblyName /getProperty:Language /getProperty:OutputPath /getProperty:PlatformTarget /getProperty:ProjectAssetsFile /getProperty:ProjectDir /getProperty:RootNamespace /getProperty:RuntimeFrameworkVersion /getProperty:TargetFileName /getProperty:TargetFrameworkMoniker /getProperty:Nullable /getProperty:TargetFramework /getProperty:TargetPlatformIdentifier /getProperty:Platform /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/EfCoreBundleBug.Api.csproj
Build started...
dotnet build /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/EfCoreBundleBug.Api.csproj /verbosity:quiet /nologo /p:PublishAot=false
/home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/EfCoreBundleBug.Api.csproj : warning NU1901: Package 'Microsoft.Build.Tasks.Core' 17.7.2 has a known low severity vulnerability, https://github.com/advisories/GHSA-h4j7-5rxr-p4wc
/home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/EfCoreBundleBug.Api.csproj : warning NU1901: Package 'Microsoft.Build.Tasks.Core' 17.7.2 has a known low severity vulnerability, https://github.com/advisories/GHSA-h4j7-5rxr-p4wc

Build succeeded.

/home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/EfCoreBundleBug.Api.csproj : warning NU1901: Package 'Microsoft.Build.Tasks.Core' 17.7.2 has a known low severity vulnerability, https://github.com/advisories/GHSA-h4j7-5rxr-p4wc
/home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/EfCoreBundleBug.Api.csproj : warning NU1901: Package 'Microsoft.Build.Tasks.Core' 17.7.2 has a known low severity vulnerability, https://github.com/advisories/GHSA-h4j7-5rxr-p4wc
    2 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.11

Build succeeded.
dotnet exec --depsfile /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/bin\Debug/net10.0/EfCoreBundleBug.Api.deps.json --additionalprobingpath /home/jello/.nuget/packages /home/jello/.nuget/packages/dotnet-ef/10.0.0-preview.4.25258.110/tools/net10.0/any/tools/net10.0/any/ef.dll migrations bundle --assembly /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/bin\Debug/net10.0/EfCoreBundleBug.Infra.dll --project /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Infra/EfCoreBundleBug.Infra.csproj --startup-assembly /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/bin\Debug/net10.0/EfCoreBundleBug.Api.dll --startup-project /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/EfCoreBundleBug.Api.csproj --project-dir /home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Infra/ --root-namespace EfCoreBundleBug.Infra --language C# --framework net10.0 --nullable --working-dir /home/jello/dev/EfCoreBundleBug --verbose
The specified deps.json [/home/jello/dev/EfCoreBundleBug/EfCoreBundleBug.Api/bin\Debug/net10.0/EfCoreBundleBug.Api.deps.json] does not exist

EF Core version

10.0.0-preview.4.25258.110

Database provider

Microsoft.EntityFrameworkCore.SqlServer

Target framework

.NET 10.0

Operating system

Ubuntu 23.04

IDE

No response

Metadata

Metadata

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions