我正在尝试创建一个脚本,该脚本将使用C#在Visual Studio上打开CSV文件,但是当我引用File类时,将弹出错误:
The type or namespace name 'File' does not exist in the namespace 'System.IO'
我确定自己using System
也一样,using System.IO
并且要添加System.dll
和的引用,System.IO.dll
但是当我尝试添加它们时,我得到了错误:
A reference to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.dll' could not be added. This component is already automatically referenced by the build system.
System.IO.dll的相同错误。
我正在使用.NETFramework v4.6和Visual Studio 2015。
此组件已由构建系统自动引用
该消息特定于不支持File类的项目模板类型。Windows应用商店,电话或通用。定位目标时,您必须跳过更多的循环,运行时代理对文件系统进行了操作,以确保您在允许查找的地方四处浏览。并且必须始终使用异步代码来完成它,因为它可能很慢。
该Windows.Storage.StorageFile类是大致相同的。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句