【发布时间】:2021-01-08 17:46:51
【问题描述】:
我有一个使用CSVHelper (v19.0.0) 的类库。我在 VS2019(版本 16.5.5;.NET 4.8.03752)中通过 Nuget 安装了CSVHelper,并且可以确认包在“应该”的位置(基于检查我的项目/依赖项/包/CSVHelper/properties,其中显示C:\Users\[my_name]\.nuget\packages\csvhelper\19.0.0)。 [编辑:我检查了我的 [解决方案名称].csproj 文件,发现其中包含 PackageReference Include="CsvHelper" Version="19.0.0"]
但是,当我尝试调用我的类库中的方法之一时,我收到如下所示的错误消息。
我在谷歌上搜索过这个问题,其他人在使用早期版本的 CSVHelper(例如https://github.com/JoshClose/CsvHelper/issues/944)时遇到了同样的问题,但他们的解决方案对我不起作用。我尝试过:1)清理和重建解决方案; 2) 删除 CSVHelper 然后通过 Nuget 重新安装;和 3) 从我的 C 驱动器上的 .nuget 文件夹中删除所有旧版本的 CSVHelper。问题继续出现。非常感谢您的帮助。
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'CsvHelper, Version=19.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823' or one of its dependencies. The system cannot find the file specified.
【问题讨论】:
标签: c# visual-studio csvhelper