libgit2 / libgit2/libgit2sharp

System.Net.Http.dll 2.4.0.0 NotFound

オープン
#1,580 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
3.5k
フォーク
925
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue で説明されている空の WebAPI プロジェクト、LibGit2Sharp 0.25.x、および追加された MSTest プロジェクトを使用して、失敗を再現します。まず、System.Net.Http.dll バージョン 4.2.0.0 が BuildExtensions からどのように解決されるかを調べ、それを正常に動作する 0.24.1 または 0.42.1 の挙動と比較します。サンプルテストを実行でき、参照されている Target クラスを FileNotFound エラーなしでデバッグできれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
backend, build-system
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。