2013-07-04 4 views
0

MSBuild.Community.Tasks.Unzip을 사용하여 압축 파일 (* .zip)의 압축을 풀려고했습니다. 0KB 크기의 콘텐츠 파일에서 MSBuild.Community.Tasks.Unzip이 실패합니다.

하지만, 내 압축 파일이 다음 오류와 함께 실패하는 이유에 의해 0킬로바이트 크기로 일부 파일을 포함하기 때문에 :

error MSB4018: The "Unzip" task failed unexpectedly. 
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. 
Parameter name: length 
    at ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.ReadClearTextBuffer(Byte[] outBuffer, Int32 offset, Int32 length) 
    at ICSharpCode.SharpZipLib.Zip.ZipInputStream.BodyRead(Byte[] b, Int32 off, Int32 len) 
    at ICSharpCode.SharpZipLib.Zip.ZipInputStream.InitialRead(Byte[] destination, Int32 offset, Int32 count) 
    at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractFileEntry(ZipEntry entry, String targetName) 
    at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip(String zipFileName, String targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, String fileFilter, String directoryFilter) 
    at MSBuild.Community.Tasks.Unzip.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) 

내 출력 폴더에이 파일이 필요하지 않습니다. 그렇게하면 가능한 경우 추출에서 제외 될 수도 있습니다.

이 문제를 해결하기위한 모든 아이디어는 높이 평가됩니까?

MSBuild.Community.Tasks.Unzip을 사용하여 추출하는 동안 이러한 파일을 제외 할 수있는 방법이 있습니까?

답변

0

이 문제는 이전 버전 (1.2.0.306)의 MSBuild.Community.Tasks에서 발생했습니다. 이 작업은 Unzip 작업 수행을 위해 ICSharpCode.SharpZipLib.dll 버전 0.84를 참조합니다. 이 문제는 ICSharpCode.SharpZipLib.dll 버전 0.84에 알려진 bug이며 버전 0.86에서는 이미 수정되었습니다.

이제 MSBuild.Community.Tasks를 버전 1.4.0.42로 업그레이드 했으므로 제대로 작동합니다. 그래서 내 문제가 해결됩니다.

관련 문제