0
votes

When i call an endpoint on my web api project, i get this error -

Could not load file or assembly 'System.Linq.Dynamic, Version=1.0.5840.25917, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

i cannot seem to sign this assembly- System.Linq.Dynamic.dll with a strong name using Visual Studio 2017 (see attached image).

if i use the command line it seems to work, however using visual studio 2015, it doesn't seem to sign the dll with a strong name.

enter image description here

enter image description here

2
i am using a version from nuget (see attached)Kojof
I pulled down this package just now. I got version 1.0.6132.35681. It is strongly-signed.user47589
This assembly has a Microsoft copyright, it however does not come from Microsoft. That ought to make you a bit nervous. This github issue suggests that the submitter is not really aware how to do this correctly. Consider helping him.Hans Passant
Thanks for taking the time out to help with this. What about if i created a Post Build event in Visual Studio to sign the assembly?Kojof
Give up this package and switch to another, github.com/StefH/System.Linq.Dynamic.Core which is much more actively maintained and has all necessary setup.Lex Li

2 Answers

4
votes

You can read System.Linq.Dynamic.Core to see how many forks of System.Linq.Dynamic are there.

The openness allows you to choose another NuGet package which ships a strong named assembly for the project, and that solves the issue.

Hope one of the forks would grow and one day becomes the "upstream" :)

0
votes

I had a similar (same) error (different cause):

Could not load file or assembly 'xx' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

It turned out that the Project ('xx') in my solution, that I referenced from another project was not set to build in Debug mode. When I selected Properties (F4) of the project ('xx') in Visual Studio, it turned out that the value for "Always Start When Debugging" was set to False.

I set it to True, and the error was resolved.