Issue with dependencies for .net project

45 views
Skip to first unread message

Ken de Jong

unread,
Sep 16, 2022, 9:40:32 AM9/16/22
to Excel-DNA
Hello! I am trying to convert a project from an older version of the .net framework to a newer one, but i am running into issues. When debugging, the plugin starts, but at some point I get reference errors, where it cannot find "deeper" packages, that are used by a direct dependency in the project.
Example:
"Unexpected Error: Could not load file or assembly 'Microsoft.Extensions.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=value'. The system cannot find the file specified"

These dll's also do not get copied to the output folder. When I do this manually, retreiving it from my local nuget folder, some dependencies resolve, but reference dependencies still get errors.

Anyone know what the problem might be or if i am missing a config setting somewhere?

Govert van Drimmelen

unread,
Sep 28, 2022, 2:55:49 AM9/28/22
to Excel-DNA
Hi Ken,

The way the NuGet dependencies work seem to have changed between the old-style project files and the newer .csproj files with <PackageReference ... /> NuGet references.
Also, it might depend on what framework(s) you are targeting - .NET Framework or .NET 6.

What is the exact environment and target you are seeing this with?
Could you make a small example project that shows the problem/?

I also think it would be instructive to see how the transitive references can be made to work correctly.

-Govert
Reply all
Reply to author
Forward
0 new messages