libgit2 / libgit2/libgit2sharp
System.Net.Http.dll 2.4.0.0 NotFound
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- C#
- Estrelas
- 3.5k
- Forks
- 925
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Reproduction steps
- Create a new blank WebAPI project. Note under references the System.Net.Http reference version is 4.0.0.0
- 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
- 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.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Reproduza a falha usando o projeto WebAPI em branco, LibGit2Sharp 0.25.x e o projeto MSTest adicionado descrito na issue. Comece examinando como System.Net.Http.dll versão 4.2.0.0 é resolvido a partir de BuildExtensions e compare isso com o comportamento funcional de 0.24.1 ou 0.42.1; o trabalho estará concluído quando o teste de exemplo puder ser executado e a classe Target referenciada puder ser depurada sem um erro FileNotFound.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp
- Domínio
- backend, build-system
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100