SharpZipLib icon indicating copy to clipboard operation
SharpZipLib copied to clipboard

Could not load file or assembly 'System.Threading.Tasks.Extensions' or one of its dependencies

Open leefsmp opened this issue 2 years ago • 0 comments

Describe the bug

Greeting Folks,

I am trying a basic sample inspired from the doc, but getting the following exception. What am I doing wrong?

"Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified."

private static void CreateArchive(string projectFolder)
{
    var tarPath = Path.Combine(projectFolder, "result.tar.gz");

    using (var outStream = File.Create(tarPath))
    using (var gzoStream = new GZipOutputStream(outStream))
    using (var tarArchive = TarArchive.CreateOutputTarArchive(gzoStream))
    {
        tarArchive.RootPath = projectFolder.Replace('\\', '/');

        foreach (var file in outputFiles)
        {
            var entry = TarEntry.CreateEntryFromFile(file);
            entry.Name = Path.GetFileName(file);
            tarArchive.WriteEntry(entry, true);
        }

        tarArchive.Close();
    }
}
Screenshot 2023-11-17 at 09 41 45

I installed the following Nuget packages, I'm not seeing a version 4.2.0.0 available ...

Screenshot 2023-11-17 at 09 50 11

Reproduction Code

No response

Steps to reproduce

build and run attached code

Expected behavior

valid tar.gz archive produced

Operating System

Windows

Framework Version

No response

Tags

Tar

Additional context

No response

leefsmp avatar Nov 17 '23 08:11 leefsmp