0

I'm creating a Netcore 2.2 API and I need to use an assembly of a provider to connect its systems. When I run my tests, the result is:

System.IO.FileNotFoundException : Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

The problem is when I create an instance of a class of the references assembly.

How could create a net core or netstandard project that works with that assembly? It works with a Net 4.8 framework project.

Mukyuu
  • 6,436
  • 8
  • 40
  • 59
dcanamares
  • 13
  • 3
  • `System.Web.Extensions` is part of full .NET framework. What would you like to use from this assembly? – Martin Staufcik Dec 12 '19 at 08:30
  • I don't know. I referenced an assembly and this one has a dependency with System.Web.Extensions. I can't access to the code of the assembly, so looking for a workaround or something that let me to create an net core API to use that assembly. – dcanamares Dec 12 '19 at 08:34
  • @dcanamares what assembly did you reference? That's not a .NET Standard assembly and the version number is *very old*. – Panagiotis Kanavos Dec 12 '19 at 14:24

1 Answers1

-1

Finally I got a solution. I found the assembly in the GAC (C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35), copied to local folder in the project and added the reference to this file and It works.

dcanamares
  • 13
  • 3
  • 1
    .NET Standard 2.0 assemblies are *not* stored in the GAC. Only .NET Old assemblies are stored there. The version number shows it's an *old* version too. 3.5 refers to the .NET version issued with Windows Vista. It would have issues running on a .NET 4.0 runtime. On .NET Core, you're on your own – Panagiotis Kanavos Dec 12 '19 at 14:22
  • In any case, .NET Framework assemblies can be found in the SDK folder. [This is explained in this duplicate question](https://stackoverflow.com/questions/4520569/where-can-i-find-the-assembly-system-web-extensions-dll) – Panagiotis Kanavos Dec 12 '19 at 14:25