gpt4 book ai didi

c# - 无法从程序集中加载类型 'System.Security.Cryptography.SHA512'

转载 作者:太空宇宙 更新时间:2023-11-03 12:23:31 25 4
gpt4 key购买 nike

我正在为我正在进行的项目写作。因此,我为解决方案创建了一个单元测试项目。

在尝试一些简单的测试时,我收到了错误消息:

Message: Test method (method name) threw exception: 
System.TypeLoadException: Could not load type 'System.Security.Cryptography.SHA512' from assembly 'mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.

我已尝试找到问题的解决方案,但还没有找到我可以开始工作的方法。

有什么解决方案吗?

提前致谢!

最佳答案

确保单元测试项目和解决方案中其他项目的 .NET 版本相同。您还可以在为解决方案创建第一个项目时尝试创建单元测试项目。

关于c# - 无法从程序集中加载类型 'System.Security.Cryptography.SHA512',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46180480/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com