Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Visual Studio 2017类库项目:无法加载文件或程序集System.IO.FileSystem_C#_Visual Studio_Class Library - Fatal编程技术网

C# Visual Studio 2017类库项目:无法加载文件或程序集System.IO.FileSystem

C# Visual Studio 2017类库项目:无法加载文件或程序集System.IO.FileSystem,c#,visual-studio,class-library,C#,Visual Studio,Class Library,我正在用c#开发一个.NETStandard类库,然后使用一个.NETFramework单元测试项目来测试它。问题代码行是 using System.IO; /* * Returns true if @strFile points to a file on the system, * Otherwise Returns False * */ private Boolean checkFileExists(string strFi

我正在用c#开发一个.NETStandard类库,然后使用一个.NETFramework单元测试项目来测试它。问题代码行是

    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”或其依赖项之一。系统找不到指定的文件

如何确保类库项目可以找到此库


谢谢

点击下面的链接查看步骤图像


这将安装Microsoft提供的最新System.IO.FileSystem软件包。

.net或.net core?项目的具体类型是什么?很抱歉,我只是Visual Studio的新手,所以我会尽可能地回答。净。我有2个项目;一个是我在其中实现类的.NET标准类库,另一个是单元测试项目(.NET Framework)。我的目标是使用此单元测试项目来帮助实现类库,然后导出类库的.dll,以便能够将其与VBA-Excel一起使用。能否将.NETStandard类库包的引用添加到.NET Framework单元测试项目应用程序中?需要获取丢失的System.IO.FileSystem程序集。我想我的问题是使用单元测试项目而不是单元测试应用程序?