Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.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# 与2012年相比';System.OutOfMemoryException';被抛出_C#_Visual Studio 2012_Out Of Memory - Fatal编程技术网

C# 与2012年相比';System.OutOfMemoryException';被抛出

C# 与2012年相比';System.OutOfMemoryException';被抛出,c#,visual-studio-2012,out-of-memory,C#,Visual Studio 2012,Out Of Memory,我在处理归档文件时遇到此错误 System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.IO.MemoryStream.set_Capacity(Int32 value) at System.IO.MemoryStream.EnsureCapacity(Int32 value) at System.IO.MemoryStream.Write(Byte[] b

我在处理归档文件时遇到此错误

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at System.IO.Stream.CopyTo(Stream destination)
at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen)
at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
这是我的密码

ZipArchive archive = ZipFile.OpenRead(packageFile); 
var jbossZip = archive.GetEntry(jbossFileName);

请注意,我的存档文件大小为170mb。有人知道这个问题的解决方案吗?

也展示一下你的工作……你是如何“处理”的?显示一些您使用的代码读取
https://www.nuget.org/packages/DotNetZip/
还是别的什么?展示一些code@JPHellemons他使用了
System.IO.Compression.ZipArchive