Skip to content

Runtime for migration bundle creation in Net7 #30466

Open
@DavidCMulder

Description

When I create a migration bundle and do not specify a runtime, it looks like the subsequent build step does not specify a runtime. The creation of the bundle (from the verbose logging: dotnet publish --runtime win-x64) however does specify a runtime. This part then fails with 'error NETSDK1112: The runtime pack for Microsoft.NETCore.App.Runtime.win-x64 was not downloaded.'.

I can work around this by running a build specifying the runtime, and then a 'dotnet ef migrations bundle --no-build' succeeds.

So for example on my windows dev machine this fails:

dotnet ef migrations bundle -r linux-x64 -v

error: 'error NETSDK1112: The runtime pack for Microsoft.NETCore.App.Runtime.linux-x64 was not downloaded. Try running a NuGet restore with the RuntimeIdentifier 'linux-x64''

and this succeeds:

dotnet build -r linux-x64
dotnet ef migrations bundle -r linux-x64 --no-build

I think that when creating a bundle, the build and publishing of the bundle should specify the same runtime.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions