简体   繁体   中英

An assembly specified in the application dependencies manifest (Microsoft.NETCore.App.deps.json) was not found

Two months ago i had done an.Net 5 web Api that worked fine, today I'm updating my entities and when i add a new migration appeared an error: An assembly specified in the application dependencies manifest (Microsoft.NETCore.App.deps.json) was not found: package: 'runtime.win-x64.Microsoft.NETCore.App', version: '5.0.9-servicing.21359.8' path: 'runtimes/win-x64/lib.net5.0/System.Security.Principal.Windows.dll'

I have been searching but i have not found anything, I supposed to add some package or do I miss something? I'm using .net 5, Entity framework core, Visual studio 2019

错误

Visiting https://www.nuget.org/packages/Microsoft.NETCore.App.Runtime.win-x64/ does not show version 5.0.9-servicing.21359.8 as available. Most likely because it is a pre-release version that has been removed since the official release of 5.0.9 .

Cleaning your working directory and updating to version 5.0.9 should fix this.

For me to slove this problem: Uninstall and Install the package from NuGet Also you can upgrade the package it's working for me

Even after one year, the issue still persists. For me, the version showing error was version: '6.0.11' , although my .NET Core version was 6. There has been only one workaround I found to fix this.
Update the .NET Core version(to latest if possible(recommended)),
and change Target version of Solution in Settings.

I resolved it by updating the runtime, I downloaded it on this page https://do.net.microsoft.com/en-us/download/do.net this worked for me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM