runtime: An assembly specified in the application dependencies manifest was not found
From @livarcocc on March 21, 2018 7:10
From @wh1t3cAt1k on March 20, 2018 18:38
Steps to reproduce
- Unpack the following project in VS Code: CoreRestaurants.zip
cd
into the directorydotnet build
dotnet ef dbcontext list
Expected behavior
I see the dbcontexts list or a meaningful error.
Actual behavior
I see an obscure error
Error:
An assembly specified in the application dependencies manifest (CoreRestaurants.deps.json) was not found:
package: 'CoreRestaurants', version: '1.0.0'
path: 'CoreRestaurants.dll'
Workaround
It took me 2 days to figure out that the problem might be in access rights, and running the above stuff with sudo
fixes the issue.
In hindsight it is surprising how I didn’t guess it from the outset, but hey, everything is obvious in hindsight.
My point is that the error could be more descriptive so that people spend less time figuring out what went wrong. Perhaps there should be additional explicit checks made by the tool.
Note: the same issue with dotnet ef migrations list
.
Environment data
I into the ~/Projects/CoreRestaurants
folder.
I run Mac OS 10.13.2 (17C88).
dotnet --info
output:
.NET Command Line Tools (2.1.101)
Product Information:
Version: 2.1.101
Commit SHA-1 hash: 6c22303bf0
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.101/
Microsoft .NET Core Shared Framework Host
Version : 2.0.6
Build : 74b1c703813c8910df5b96f304b0f2b78cdf194d
Copied from original issue: dotnet/cli#8851
Copied from original issue: aspnet/EntityFrameworkCore#11367
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 28 (17 by maintainers)
It’s happening to me on a window machine. I have a C# project which is for an Azure Function. Tried to run
Scaffold-DbContext "Server=localhost;Database=Sales;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -Tables Orders,OrderItems,OrderItemOptions
I get as result
Using C# EF CORE 2,1 Azure Function Visual Studio 2017
After two days of agony I finally figured out the riddle of the sphynx. How to get azure functions to work with entity framework? Gadzooks Microsoft it shouldn’t be this difficult! I ran into the same error as above. Here is an approach I finally tried and it worked:
Using Visual Studio 2019 community. Create new solution with asp core class library project.
DO NOT START solution with azure function project! Install Microsoft.EntityFramework.Tools, Design, SqlServer.
Version .NET Core 3.1 with worked for me. Make sure library project is also set to 3.1. Create Models folder and run scaffolding. I used -force -verbose just in case. Voila this time the dependencies manifest missing message did not show! Now add your azure functions project. Make sure functions project is also set to 3.1. Set a dependency from functions project to library project. Builds and runs fine! Also refreshes the entities models if rerun!