libgit2 / libgit2/libgit2sharp

System.Net.Http.dll 2.4.0.0 NotFound

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

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

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

Mô tả

Reproduction steps
  1. Create a new blank WebAPI project. Note under references the System.Net.Http reference version is 4.0.0.0
  2. install any version of LibGet2Sharp (any version after 0.24.1) and note that the new System.Net.Http dll is now version 4.2.0.0
  3. add a new ms test project, and attempt to write a test against anything that requires use of a RequestMessageResult. E.G: the following for example:
            [TestMethod]
            public async Task ResponseShouldRenderCorrectly()
            {
                var moq = new Mock<IGitHubRepository>();
                var target = new Target(moq.Object);
                var dto = new DTO
                {
                    SomeField = "Nate Was Here"
                };
                var actualResponse = target.StatusCode(System.Net.HttpStatusCode.OK, dto);

                Assert.IsNotNull(actualResponse);
                Assert.IsInstanceOfType(actualResponse, typeof(ResponseMessageResult));

                var strResponse = actualResponse as ResponseMessageResult;
                Assert.AreEqual(System.Net.HttpStatusCode.OK, strResponse.Response.StatusCode);
                var actual = await strResponse?.Response?.Content.ReadAsStringAsync();
                var expected = "{\"SomeField\":\"Nate Was Here\"}";
                Assert.AreEqual(expected, actual);

            }
Expected behavior

I should be able to run the test code above to work, and i should be able to debug into the Target class used in the test.

Actual behavior

I receive a FileNotFound when looking for the System.Net.Http.dll with version 4.2.0.0 which it looks for in the BuildExtensions. That file is not reachable in my class library with my test, which is referencing the webapi project i created.

Version of LibGit2Sharp (release number or SHA1)

Version 0.42.1 works, but 0.25.0 and 0.25.2 are both causing this type of un-testable code.

Operating system(s) tested; .NET runtime tested

Windows 10, .net 4.6.1 run time.

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.

Hướng nghiên cứu

Tái hiện lỗi bằng dự án WebAPI trống, LibGit2Sharp 0.25.x và dự án MSTest được thêm vào như mô tả trong issue. Trước tiên, hãy kiểm tra cách System.Net.Http.dll phiên bản 4.2.0.0 được phân giải từ BuildExtensions và so sánh với hành vi hoạt động của 0.24.1 hoặc 0.42.1; hoàn tất khi có thể chạy bài kiểm thử mẫu và debug lớp Target được tham chiếu mà không gặp lỗi FileNotFound.

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

Đánh giá

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

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.