首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法加载文件或程序集“System.Numerics.Vectors”

无法加载文件或程序集“System.Numerics.Vectors”
EN

Stack Overflow用户
提问于 2022-08-18 04:51:07
回答 1查看 101关注 0票数 1

我已经用visual 2022构建了一个c#解决方案。它是:https://github.com/guided-hacking/GH-Entity-List-Finder。它构建得很好,但是当我运行builds时,它会给出下面的错误。我试图重新安装我的dotnet运行时,但没有成功。这是因为我的sdk还是视觉工作室?或者这是我代码中的一个问题?

代码语言:javascript
运行
复制
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Squalr.Engine.OS.Vectors.get_VectorSize()
   at Squalr.Engine.Scanning.Snapshots.ReadGroup..ctor(UInt64 baseAddress, Int32 regionSize, DataType dataType, Int32 alignment)
   at Squalr.Engine.Scanning.Snapshots.SnapshotManager.CreateSnapshotFromSettings(DataType dataType)
   at Squalr.Engine.Scanning.Snapshots.SnapshotManager.GetSnapshot(SnapshotRetrievalMode snapshotCreationMode, DataType dataType)
   at Squalr.Source.Prefilters.Prefilter.GetPrefilteredSnapshot(DataType dataType)
   at Squalr.Engine.Scanning.Snapshots.SnapshotManager.GetActiveSnapshotCreateIfNone(DataType dataType)
   at Squalr.Engine.Scanning.Snapshots.SnapshotManager.GetSnapshot(SnapshotRetrievalMode snapshotCreationMode, DataType dataType)
   at EntityListFinder.EntityListFinder.StartScan(Int32 index, Int64 searchAddress, Boolean validatingProcess) in C:\Users\Ali-Akber\Source\Repos\GH-Entity-List-Finder\EntityListFinder.cs:line 86
   at EntityListFinder.EntityListFinder.SearchButton() in C:\Users\Ali-Akber\Source\Repos\GH-Entity-List-Finder\EntityListFinder.cs:line 74
   at EntityListFinder.MainForm.SearchButton_Click(Object sender, EventArgs e) in C:\Users\Ali-Akber\Source\Repos\GH-Entity-List-Finder\MainForm.cs:line 168
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
GH Entity List Finder
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Ali-Akber/Source/Repos/GH-Entity-List-Finder/builds/x64/Debug/GH%20Entity%20List%20Finder.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4395.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4341.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.ServiceProcess
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceProcess/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
----------------------------------------
Squalr.Engine
    Assembly Version: 2.3.1.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Ali-Akber/Source/Repos/GH-Entity-List-Finder/builds/x64/Debug/GH%20Entity%20List%20Finder.exe
----------------------------------------
netstandard
    Assembly Version: 2.0.0.0
    Win32 Version: 4.8.4161.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/netstandard/v4.0_2.0.0.0__cc7b13ffcd2ddd51/netstandard.dll
----------------------------------------
System.Drawing.Common
    Assembly Version: 4.0.0.1
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Ali-Akber/Source/Repos/GH-Entity-List-Finder/builds/x64/Debug/GH%20Entity%20List%20Finder.exe
----------------------------------------
Squalr.Engine.Scanning
    Assembly Version: 2.3.1.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Ali-Akber/Source/Repos/GH-Entity-List-Finder/builds/x64/Debug/GH%20Entity%20List%20Finder.exe
----------------------------------------
System.Configuration.ConfigurationManager
    Assembly Version: 4.0.2.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Ali-Akber/Source/Repos/GH-Entity-List-Finder/builds/x64/Debug/GH%20Entity%20List%20Finder.exe
----------------------------------------
Squalr.Engine.Memory
    Assembly Version: 2.3.1.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Ali-Akber/Source/Repos/GH-Entity-List-Finder/builds/x64/Debug/GH%20Entity%20List%20Finder.exe
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
EN

回答 1

Stack Overflow用户

发布于 2022-08-18 14:54:13

长话短说,您使用依赖项是错误的。您直接引用程序集而不考虑它们的依赖关系(在本例中是System.Numerics.Vectors)。因为只有这个库使用它,所以您的代码当然会编译,并且会在运行时中断。

您应该从这个库中生成一个NuGet包,该库引用它运行所需的所有内容,然后简单地引用该包以获得所需的一切。

与你的问题无关,但你也扫描错误的进程(检查返回,而不是尝试使用它们和获取异常),通常你做的每件事都冻结你的应用程序使用的任务和多个线程。

我在https://github.com/guided-hacking/GH-Entity-List-Finder/pull/3中为你修正了前两个问题,但是你真的应该重新考虑你的设计。在一个程序中,除了代理它对一个你不拥有的库的调用之外,还有很多问题是一个严重的危险信号。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73397591

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档