Error:
An assembly specified in the application dependencies manifest (DependencyConsoleApplication.deps.json) was not found:
package: ‘Newtonsoft.Json’, version: ‘12.0.1’
path: ‘lib/netstandard2.0/Newtonsoft.Json.dll’
Thats the exact same scenario that you ha din the other thread, where you add to add the package reference explicitly (and reported that it didn’t rebuild), no?
Well yes adding the reference will fix it but its a bit annoying if I have to do that all the time.
For example Im doing a console app that connects to a postgres db server. Ive added dapper and npsql and Im now getting
john-moshakiss-macbook-pro:debug JohnMoshakis$ dotnet PostgresConsoleApplication.exe
Error:
An assembly specified in the application dependencies manifest (PostgresConsoleApplication.deps.json) was not found:
package: ‘System.Security.Principal.Windows’, version: ‘4.5.1’
path: ‘runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.dll’
So you’re saying that without any (relevant) changes made to the project it its references, this error comes back after a few builds, even though adding the reference originally fixed it? That doesn’t make a lot of sense. does the .deps.json change between when it works and when it starts failing again?
PostgresConsoleApplicationWorking is the starting point. I added Boat.pas to the project and tried to debug. The debugger hung so I restarted and tried to debug again.
I cant dotnet run PostgresConsoleApplication without this error
Error:
An assembly specified in the application dependencies manifest (PostgresConsoleApplication.deps.json) was not found:
package: ‘System.Security.Principal.Windows’, version: ‘4.5.1’
path: ‘runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.dll’
I cant see any differences apart from the extra file.
The working one should run with an exception because you dont have the file with my database connections.
Ah, oops. that makes sense, it seems the NuGet cache folder path did not get initialized when the reference resolving was skipped, and as such, it wasn’t written into the additionalProbingPaths. Fixed!
The problem was, the issue would only reproduce for packages the didn’t also happen to be in dotnet’s own cache in /usr/local/share/dotnet/sdk/NuGetFallbackFolder.