I'm currently working on an ASP.NET Core 1.0 project. I want to stay on the dnxcore50 and the dnx451 at the same time. Which brings me to the following issue now:
How can I unzip a zip archive from the filesystem to a directory?
"System.IO.FileSystem.Primitives": "4.0.0-beta-22816",
"System.IO.FileSystem": "4.0.0-beta-22816"
"frameworks": {
"dnx451": {
"frameworkAssemblies": {
"System.IO": ""
}
},
"dnxcore50": {
"dependencies": {
"System.IO": "4.0.10-beta-*"
}
}
}
With that configuration in the project.json I'm now able to get a GZipStream but I have no idea how to store that stream to a directory. Unfortunately the ZipFile object in System.IO.Compression.ZipFile.ExtractToDirectory() method doesn't exsists in the core framework :/.
UPDATE:
I now included it that way and removed it from the overall dependencies:
"frameworks": {
"dnx451": {
"dependencies": {
"System.IO.Compression.ZipFile": "4.0.1-beta-23516"
}
},
"dnxcore50": {
"dependencies": {
"System.IO.Compression.ZipFile": "4.0.1-beta-23516"
}
}
When I run the application using core it works as expected, but running it with the .net framework 4.6 I crashes with the following exeception during runtime:
n unhandled exception occurred while processing the request.
An unhandled exception occurred while processing the request.
FileNotFoundException: Could not load file or assembly 'System.IO.Compression.ZipFile, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.