gpt4 book ai didi

c# - 程序集未找到 NEWBIE 问题

转载 作者:行者123 更新时间:2023-11-30 13:51:54 25 4
gpt4 key购买 nike

刚开始使用 C#(使用 VS2008)- 我是一名经验丰富的 Java、C++、VC++、VB 程序员。

我从 codescales.com 下载了一个程序集(我猜);这是一个 dll。

在我的(新)C# 项目中,我通过浏览添加了这个 dll 作为引用。我让 intellisense 为它工作,并编写了一个简单的示例来测试它,但每次我点击 VS“调试”时,我都会得到以下异常。我是否需要“注册”或对下载的 DLL 执行某些操作才能在我的项目中正确使用它? (VS 似乎会在构建时自动将其复制到输出目录。)

提前致谢,阿杰

System.IO.FileNotFoundException was unhandled Message="Could not load file or assembly 'CodeScales.Http, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
Source="ocrTest1"
FileName="CodeScales.Http, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" FusionLog="=== Pre-bind state information ===\r\nLOG: User = CAPTURESDK-VM\XXXXX\r\nLOG: DisplayName = CodeScales.Http, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Documents and Settings/XXXXX/My Documents/Visual Studio 2008/Projects/ocrTest1/ocrTest1/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : ocrTest1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.\r\nLOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).\r\nLOG: Attempting download of new URL file:///C:/Documents and Settings/XXXXX/My Documents/Visual Studio 2008/Projects/ocrTest1/ocrTest1/bin/Debug/CodeScales.Http.DLL.\r\nLOG: Attempting download of new URL file:///C:/Documents and Settings/XXXXX/My Documents/Visual Studio 2008/Projects/ocrTest1/ocrTest1/bin/Debug/CodeScales.Http/CodeScales.Http.DLL.\r\nLOG: Attempting download of new URL file:///C:/Documents and Settings/XXXXX/My Documents/Visual Studio 2008/Projects/ocrTest1/ocrTest1/bin/Debug/CodeScales.Http.EXE.\r\nLOG: Attempting download of new URL file:///C:/Documents and Settings/XXXXX/My Documents/Visual Studio 2008/Projects/ocrTest1/ocrTest1/bin/Debug/CodeScales.Http/CodeScales.Http.EXE.\r\n"

最佳答案

名称不匹配,不确定这是怎么发生的。删除程序集引用。将您从 CodeScales.Http.V0.14.dll 下载的 DLL 重命名为 CodeScales.Http.dll。然后将引用添加回去。

关于c# - 程序集未找到 NEWBIE 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3729241/

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