zip 파일을 압축 해제하는 .NET 4.5가 없기 때문에 this과 같은 Shell32
을 사용하고 있습니다. 나는이 같은 DLL을 참조 할 때 :Shell32.dll을 참조 하시겠습니까?
fatal error CS0009: Metadata file 'c:\Windows\System32\shell32.dll' could not be opened -- 'An attempt was made to load
a program with an incorrect format. '
업데이트 : 비주얼 스튜디오없이, 단지 csc.exe
csc.exe /r:"C:\Windows\System32\shell32.dll" ...
을 나는이 오류가 발생합니다.
'Process.Start'를 사용하여 응용 프로그램과 함께 번들로 제공되는 일종의'unzip.exe'를 실행할 수도 있습니다. Windows zipper가 불완전하므로 더 많은 이국적인 패키지 문제가 발생할 수 있습니다. – PTwr
아, .NET 2.0 이후로 [GZipStream] (https://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream (v = vs.110) .aspx)을 사용할 수 있지만 내가 기억하는 바에는 몇 가지 버그가있다. – PTwr
@PTwr 그게 내가 지금까지 해왔 던 것이다.'Process.Start (@ "cmd.ex/C powershell.exe -nologo -noprofile -command" "& {Add-Type -A 'System.IO.Compression.FileSystem '; [IO.Compression.ZipFile] :: ExtractToDirectory ('foo.zip ','bar ');} "" ");'. 작동하지만 다른 해결책이 있는지 알고 싶습니다. 또한'GZipStream'가 작동 할 수도 있습니다. –