Runtime for migration bundle creation in Net7
See original GitHub issueWhen 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.
Issue Analytics
- State:
- Created 8 months ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
I wasn’t able to repro it either. I think we’re missing a piece of the puzzle.
True, but trying to figure out which version of the SDK they’re using is a lot more work than just leaving it in. 😉
Here’s a repro project that takes
dotnet ef
out of the picture. The bundle project (that we calldotnet publish
on) looks like this: