[英]ZipFile Class not recognised by visual studio
I am trying to use ZipFile.OpenRead() but the thing is no matter how much i try it is not working in the program, whatever nugetpackage or code i use.我正在尝试使用 ZipFile.OpenRead() 但问题是无论我尝试多少它在程序中都不起作用,无论我使用什么 nugetpackage 或代码。
I tried System.IO.Compression.ZipFile.OpenRead() this did not work, instead I was asked to use ZipArchive by visual studio.我尝试了 System.IO.Compression.ZipFile.OpenRead() 这没有用,而是 visual studio 要求我使用 ZipArchive。
I imported both System.IO.Compression.ZipFile and System.IO.Compression nuget packages but still there is no change, what more can i do?我导入了 System.IO.Compression.ZipFile 和 System.IO.Compression nuget 包,但仍然没有变化,我还能做什么?
You need to add a reference to System.IO.Compression.FileSystem
in your project to get System.IO.Compression.ZipFile
.您需要在项目中添加对
System.IO.Compression.FileSystem
的引用以获取System.IO.Compression.ZipFile
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.