Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#854 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu với sample CreateArchive và các gói NuGet được liệt kê, sau đó kiểm tra framework của project và việc phân giải dependency cho System.Threading.Tasks.Extensions. Tái hiện quá trình build và chạy trên Windows được mô tả trong issue; hoàn tất khi sample chạy và tạo ra một archive tar.gz hợp lệ mà không có assembly-load exception.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug tar
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

Ngôn ngữ chính
C#
Star
3.9k
Fork
1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của icsharpcode/SharpZipLib

Tất cả issue của icsharpcode/SharpZipLib

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.