我正在用c#开发.NETStandard类库,然后使用.NET Framework单元测试项目来测试它。问题的代码行是;
using System.IO;
/*
* Returns true if @strFile points to a file on the system,
* Otherwise Returns False
*
*/
private Boolean checkFileExists(string strFile)
{
return File.Exists(strFile);
}
抛出异常: System.IO.FileNotFoundException:无法加载文件或程序集'System.IO.FileSystem,Version = 4.0.1.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'或其依赖项之一。系统找不到指定的文件。
如何确保类库项目可以找到此库?
由于
答案 0 :(得分:0)
单击下面的链接以获取步骤的图像
In Visual Studio, Select Tools/NuGet Package Manager/Package Manager Console
enter this at nuget Command Line
这将安装Microsoft的最新System.IO.FileSystem包。