It's my 1st time trying to build a .DLL in .Net, for use with a VB5 program...I'm a newbee

Windows 10, VS 2019, VB, building a Class Library Target framework is .NET Core 3.1. RestSharp 106.15.0 in Assemblies, Newtonsoft.Json 13.0.1 getting error

"C:\Users\User\Desktop\PSMdata\aaaOther>regasm.exe IQProLnk.dll /tlb:IQProLnk.tlb Microsoft .NET Framework Assembly Registration Utility version 4.8.4084.0 for Microsoft .NET Framework version 4.8.4084.0 RegAsm : error RA0000 : Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."

I've looked at everything I could find doing a Google search. I've tried adding a System.Runtime through NuGet, but all I could find is 4.3.1.... it still wants 4.2.2.0

As suggested by someone who did a C# program and had the same problem, I've added (to no avail):

<dependentAssembly>
  <assemblyIdentity name="System.Runtime" publicKeyToken= "b03f5f7f11d50a3a" culture="neutral"/>
  <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>

to "C:\Users<user>\AppData\Local\Microsoft\VisualStudio\16.0_cd2f1afe\devenv.exe.config"

Some one suggested "modify the app.config entry to match packages.config for the newVersion", but I cannot find either one of those config files. But this was for VS 2017 anyhow.

I've searched all the files in the IQProLnk subdirectories for any reference to System.Runtime and all I found was this in the IQProLnk.vbproj file after I added System.Runtime in NuGet

  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
    <PackageReference Include="System.Runtime" Version="4.3.1" />
  </ItemGroup>

Otherwise I don't know what it is that wants v4.2.2.0.

I hope I haven't been to verbose but did give enough information.

Thanks

0

There are 0 best solutions below