在 C# 中使用 Deedle 需要哪些 using 语句? "Could not load type 'Deedle.Frame'" 异常
What using statements are needed to use Deedle in C#? "Could not load type 'Deedle.Frame'" exception
第二次编辑:我找到了一个 MS 日志查看器,但它没有启发我。这是它显示的内容:
*** Assembly Binder Log Entry (10/15/2020 @ 4:09:38 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\IntelliTrace.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = IntelliTrace.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\IntelliTrace.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/Microsoft.Web.Administration.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/Microsoft.Web.Administration/Microsoft.Web.Administration.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/deps/Microsoft.Web.Administration.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/deps/Microsoft.Web.Administration/Microsoft.Web.Administration.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/Microsoft.Web.Administration.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/Microsoft.Web.Administration/Microsoft.Web.Administration.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/deps/Microsoft.Web.Administration.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/deps/Microsoft.Web.Administration/Microsoft.Web.Administration.EXE.
LOG: All probing URLs attempted and failed.
编辑:我更改了命名空间,但错误消息没有改变。
我有一个非常短的 C# 程序。我是第一次尝试使用 Deedle。不幸的是,我在网上找到的所有示例都只显示可执行代码,而不是顶部需要的任何 using 语句。 None 我搜索时找到的页面解决了这个问题。这是错误消息。
System.TypeLoadException
HResult=0x80131522
Message=Could not load type 'Deedle.Frame' from assembly 'Deedle, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>
这是我的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Deedle;
namespace DeedleCaller
{
class Program
{
static void Main(string[] args)
{
var msftRaw = Frame.ReadCsv(@"C:\Users\afargnoli\Documents\ASRD\Devel\SRFN Data Analytics\link_success_rates\kennett_intervals_jan.csv");
msftRaw.Print();
Console.WriteLine("\nPause");
string unused = Console.ReadLine();
}
}
}
...Message=Could not load type 'Deedle.Frame' from assembly 'Deedle...
这告诉你,你没有 Deedle 的 Nuget 中可能存在的程序集:https://www.nuget.org/packages/Deedle
另外,正如 Thomas 所说,如果您更改命名空间会更好。即“DoodleProject”。
通过使用新命名空间创建一个新项目来完成最后一件事,然后下载 nugget,它应该可以正常工作。
第二次编辑:我找到了一个 MS 日志查看器,但它没有启发我。这是它显示的内容:
*** Assembly Binder Log Entry (10/15/2020 @ 4:09:38 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\IntelliTrace.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = IntelliTrace.exe
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio17\Enterprise\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\IntelliTrace.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/Microsoft.Web.Administration.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/Microsoft.Web.Administration/Microsoft.Web.Administration.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/deps/Microsoft.Web.Administration.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/deps/Microsoft.Web.Administration/Microsoft.Web.Administration.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/Microsoft.Web.Administration.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/Microsoft.Web.Administration/Microsoft.Web.Administration.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/deps/Microsoft.Web.Administration.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/IntelliTrace/deps/Microsoft.Web.Administration/Microsoft.Web.Administration.EXE.
LOG: All probing URLs attempted and failed.
编辑:我更改了命名空间,但错误消息没有改变。
我有一个非常短的 C# 程序。我是第一次尝试使用 Deedle。不幸的是,我在网上找到的所有示例都只显示可执行代码,而不是顶部需要的任何 using 语句。 None 我搜索时找到的页面解决了这个问题。这是错误消息。
System.TypeLoadException HResult=0x80131522 Message=Could not load type 'Deedle.Frame' from assembly 'Deedle, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Source=<Cannot evaluate the exception source> StackTrace: <Cannot evaluate the exception stack trace>
这是我的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Deedle;
namespace DeedleCaller
{
class Program
{
static void Main(string[] args)
{
var msftRaw = Frame.ReadCsv(@"C:\Users\afargnoli\Documents\ASRD\Devel\SRFN Data Analytics\link_success_rates\kennett_intervals_jan.csv");
msftRaw.Print();
Console.WriteLine("\nPause");
string unused = Console.ReadLine();
}
}
}
...Message=Could not load type 'Deedle.Frame' from assembly 'Deedle...
这告诉你,你没有 Deedle 的 Nuget 中可能存在的程序集:https://www.nuget.org/packages/Deedle
另外,正如 Thomas 所说,如果您更改命名空间会更好。即“DoodleProject”。
通过使用新命名空间创建一个新项目来完成最后一件事,然后下载 nugget,它应该可以正常工作。