vs 2019,VB,类库,获得错误“无法加载文件或汇编&System.Runtime,版本= 4.2.2.0,Culture = Neutral&quort在recasm期间

发布于 2025-01-24 12:40:05 字数 1252 浏览 0 评论 0原文

这是我第一次尝试在.NET中构建.dll,以与VB5程序一起使用...我是Newbee

Windows 10,vs 2019,VB,构建类库目标框架为.NET CORE 3.1。 RESTSHARP 106.15.0在纽顿群集会中,13.0.1 获取错误

“ c:\ user \ user \ desktop \ psmdata \ aaaother> regasm.exe iqprolnk.dll /tlb:iqprolnk.tlb Microsoft .NET框架组件注册实用程序版本4.8.4084.0 对于Microsoft .NET框架版本4.8.4084.0 regasm:错误ra0000:无法加载文件或汇编'system.Runtime,版本= 4.2.2.0,culture =中性,publicKeyToken = b03f5f7f11d50a3a'或其依赖项之一。 指定的文件。

该系统找不到 尝试通过Nuget添加系统。

我已经 (无济于事):

<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>

到“ c:\ users&lt; user&gt; \ appdata \ local \ local \ microsoft \ visualStudio \ 16.0_cd2f1afe \ devenv.exe.config”

一些建议的app.config输入以匹配packages.config newversion”,但我找不到任何一个配置文件中的任何一个。但这是针对2017年的VS。

我已经在iqprolnk子目录中搜索了对系统的任何引用

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

。 .2.2.0。

我希望我没有冗长,但确实提供了足够的信息。

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文