Odd Reflection Issue Loading DotNext.Threading Types Using Reflection
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia con la riproduzione in Program.cs destinata a net11.0 Preview 7 e chiama GetTypes() sull'assembly DotNext.Threading, quindi confronta lo stesso codice destinato a .NET 10. Esamina i tipi segnalati ImmediateTask e DelayedTaskStateMachine e determina se il problema si trova in DotNext.Threading o nella versione preliminare di .NET; il lavoro è completato quando la chiamata reflection carica tutti i tipi dell'assembly senza TypeLoadException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
To recreate:
- Create a console app with the following settings (note: this should be run with .NET 11 Preview 7)
<LangVersion>preview</LangVersion><TargetFramework>net11.0</TargetFramework>
- Reference the DotNext.Threading NuGet package, version 6.6.5
- Add this to Program.cs:
_ = typeof(DotNext.Threading.AsyncAutoResetEvent).Assembly.GetTypes();
I would expect this to return the types in the assembly. What I get is a TypeLoadException:
System.TypeLoadException: Method 'get_Task' in type 'DotNext.Threading.Tasks.<TaskSchedulerExtensions_T>FEC23FF8E24C5C893F2B0DCE3A3DBD6B033A895D525ABEAE11C935B5879FC7CF4__ImmediateTask`2' from assembly 'DotNext.Threading, Version=6.6.1.0, Culture=neutral, PublicKeyToken=c8827b44e18fe572' does not have an implementation.
System.TypeLoadException: Method 'get_Task' in type 'DotNext.Threading.Tasks.<TaskSchedulerExtensions_T>FEC23FF8E24C5C893F2B0DCE3A3DBD6B033A895D525ABEAE11C935B5879FC7CF4__DelayedTaskStateMachine`2' from assembly 'DotNext.Threading, Version=6.6.1.0, Culture=neutral, PublicKeyToken=c8827b44e18fe572' does not have an implementation.
I'm not sure this is a DotNext-specific issue. It may be something that's broken in the preview version of .NET 11 with the way these types are file scoped. If you feel like this is a general .NET issue, I can file it there, referencing this issue. I did a search for any current issues reported with TypeLoadException and nothing seemed related to this.
I also ran the same code targeting .NET 10 and it works with no issues, so ... I'm guessing this is .NET 11-specific.
- Lingua principale
- C#
- Stelle
- 2k
- Fork
- 157
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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.
Issue simili
-
bug priority: P2
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
WebullFeeModel charges SPXW options the SPX exchange feeForse già presa @Amadeus-22 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
QuantConnect/Lean#9922 ·
I maintainer di solito rispondono entro 1 giorno
-
[Docs] README/PRIVACY still name AppCenter although v1.5.6.0+ uses the Microsoft Store Services SDKAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Azure/azure-sdk-tools#17317 ·
I maintainer di solito rispondono entro 1 giorno