libgit2 / libgit2/libgit2sharp
System.Net.Http.dll 2.4.0.0 NotFound
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 3.5k
- Fork
- 925
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il problema utilizzando il progetto WebAPI vuoto, LibGit2Sharp 0.25.x e il progetto MSTest aggiunto descritto nell’issue. Inizia esaminando come viene risolto System.Net.Http.dll versione 4.2.0.0 da BuildExtensions e confrontalo con il comportamento funzionante di 0.24.1 o 0.42.1; il lavoro è completato quando il test di esempio può essere eseguito e la classe Target referenziata può essere sottoposta a debug senza un errore FileNotFound.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- backend, build-system
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100