home.social

#nativeaot — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #nativeaot, aggregated by home.social.

fetched live
  1. Исследование .NET: от DnSpy к IDA Pro

    Что мы обычно представляем под исследованием бинарных файлов .NET? Обычно все просто: открываешь сборку в DnSpy или ILSpy, получаешь очень близкий к исходнику C# (может и не очень близкий, а обфусцированный) и дальше уже думаешь не про восстановление логики, а про анализ исходного кода — даже не нужно нажимать F5... В стандартных .NET-сборках компилятор сохраняет символы приложения в виде метаданных, необходимых для работы рантайма и рефлексии. DnSpy даже поддерживает экспорт содержимого сборки в проект для Visual Studio, что размывает границу между исследованием исходников и бинарного файла. Но платформа от Microsoft развивается, и теперь .NET-приложения могут исполняться не только через CLR, но и компилироваться в машинный код целевой платформы с помощью Ahead-Of-Time. Исторически первым таким решением стал NGEN (2002) — установочная предкомпиляция для .NET Framework, однако он требовал ручного запуска, дублировал IL-код и не обновлялся автоматически при изменении рантайма. Затем, в 2015 году, появился .NET Native — первый полноценный AOT, но исключительно в UWP-приложениях для Windows Store. В современной ветке .NET (Core/5+) следующим шагом стал ReadyToRun (2019), с возможностью переключения на IL, а затем и Native AOT, в котором была полностью убрана зависимость сборки от рантайма .NET. В данной статье рассмотрим, с чем может столкнутся реверсер при исследовании .NET приложений, собранных с использованием Ahead-Of-Time компиляции в современных версиях .NET.

    habr.com/ru/companies/pm/artic

    #net #reverseengineering #c# #readytorun #nativeaot

  2. We just shipped Core Framework v3 4.0.0-pre.108 and Analyzers 2.0.0-pre.51.

    This release adds new features, new analyzers, and fixed several bugs. We anticipate these being the final prerelease builds of this cycle. Please test thoroughly!

    xunit.net/releases/v3/4.0.0-pr
    xunit.net/releases/analyzers/2

    #DotNet #CSharp #FSharp #UnitTest #TDD #NativeAOT

  3. We just shipped Core Framework v3 4.0.0-pre.108 and Analyzers 2.0.0-pre.51.

    This release adds new features, new analyzers, and fixed several bugs. We anticipate these being the final prerelease builds of this cycle. Please test thoroughly!

    xunit.net/releases/v3/4.0.0-pr
    xunit.net/releases/analyzers/2

    #DotNet #CSharp #FSharp #UnitTest #TDD #NativeAOT

  4. There will be another prerelease coming this weekend.

    Since we like to have prerelease builds stable for a month before declaring them release, please make sure to use the current and upcoming builds to verify, especially with Native AOT.

    Thanks!

    #DotNet #UnitTest #NativeAOT #CSharp

  5. There will be another prerelease coming this weekend.

    Since we like to have prerelease builds stable for a month before declaring them release, please make sure to use the current and upcoming builds to verify, especially with Native AOT.

    Thanks!

    #DotNet #UnitTest #NativeAOT #CSharp

  6. Code review complete. Time to merge.

    Final damage:

    [native-aot cdfb42b2] Add Native AOT support
    Date: Wed Feb 25 11:16:49 2026 -0800
    856 files changed, 33149 insertions(+), 14167 deletions(-)

    #DotNet #UnitTest #NativeAOT

  7. Code review complete. Time to merge.

    Final damage:

    [native-aot cdfb42b2] Add Native AOT support
    Date: Wed Feb 25 11:16:49 2026 -0800
    856 files changed, 33149 insertions(+), 14167 deletions(-)

    #DotNet #UnitTest #NativeAOT

  8. New option coming for the xunit3 template: "--native-aot".

    This will only be available for C# projects, since Native AOT is only implemented for C#. #DotNet #UnitTest #NativeAOT

  9. New option coming for the xunit3 template: "--native-aot".

    This will only be available for C# projects, since Native AOT is only implemented for C#. #DotNet #UnitTest #NativeAOT

  10. They may take longer to builder, but they're definitely faster to run. 😄 #DotNet #UnitTest #NativeAOT

  11. They may take longer to builder, but they're definitely faster to run. 😄 #DotNet #UnitTest #NativeAOT

  12. I'm positive the code generation has holes in it, despite my extensive attempt to ensure I covered all my bases, but... I think I'm ready the merge `native-aot` into `rel/4.0.0` and maybe push a pre-release build soon. #DotNet #UnitTest #NativeAOT

  13. I'm positive the code generation has holes in it, despite my extensive attempt to ensure I covered all my bases, but... I think I'm ready the merge `native-aot` into `rel/4.0.0` and maybe push a pre-release build soon. #DotNet #UnitTest #NativeAOT

  14. The existing xUnit.net analyzers that are errors are helping define the most important set of "did I remember to test for this?" in the code generators, because they almost all end up creating generated code that won't compile (e.g., m Member data pointing at a non-public member). Almost all of the rest inform what conditions need to be validated in the generated code (e.g. incorrect number of values in a data row vs. number of parameters to the test method).

    #DotNet #UnitTest #NativeAOT

  15. The existing xUnit.net analyzers that are errors are helping define the most important set of "did I remember to test for this?" in the code generators, because they almost all end up creating generated code that won't compile (e.g., m Member data pointing at a non-public member). Almost all of the rest inform what conditions need to be validated in the generated code (e.g. incorrect number of values in a data row vs. number of parameters to the test method).

    #DotNet #UnitTest #NativeAOT

  16. Still don't have caching wired up, and I don't think I'm gonna bother, because things definitely got faster.

    Also, count-wise I clearly have to make a pass to determine if there are more current "reflection only" tests that need AOT backfills.

    Also need to fix an issue where I'm calling tests multiple times if they're defined in a partial across separate files.

    #DotNet #UnitTest #NativeAOT

  17. Still don't have caching wired up, and I don't think I'm gonna bother, because things definitely got faster.

    Also, count-wise I clearly have to make a pass to determine if there are more current "reflection only" tests that need AOT backfills.

    Also need to fix an issue where I'm calling tests multiple times if they're defined in a partial across separate files.

    #DotNet #UnitTest #NativeAOT

  18. Spot check!

    Also, the tests run in 0.021s, which is 5x faster than using the JIT. 🎉

    #DotNet #UnitTest #NativeAOT

  19. Spot check!

    Also, the tests run in 0.021s, which is 5x faster than using the JIT. 🎉

    #DotNet #UnitTest #NativeAOT

  20. Tests fixed, and xunit.v3.core.tests restructured for the changes introduced to the runner hierarchy (CoreXyzRunner and associated context inserted between TestXyzRunner and XunitTestXyzRunner, with CodeGenXyzRunner also deriving from CoreXyzRunner).

    Now it's time to get the xunit.v3.core.aot.tests building and passing, and add new tests for all the new code (which is significant 😮‍💨).

    #DotNet #UnitTest #NativeAOT

  21. Tests fixed, and xunit.v3.core.tests restructured for the changes introduced to the runner hierarchy (CoreXyzRunner and associated context inserted between TestXyzRunner and XunitTestXyzRunner, with CodeGenXyzRunner also deriving from CoreXyzRunner).

    Now it's time to get the xunit.v3.core.aot.tests building and passing, and add new tests for all the new code (which is significant 😮‍💨).

    #DotNet #UnitTest #NativeAOT

  22. This morning, I'm adding the missing type coercion support for theory parameters.

    I found another one that isn't going to work: `params` parameters for theories. There's no way for us to make the right kind of array at runtime, so we'll have to let you do the "hard work" of putting things in an array for us. Thankfully C#'s `[]` array syntax helper should make this conversion pretty trivial for most people. #DotNet #NativeAOT #UnitTest

  23. This morning, I'm adding the missing type coercion support for theory parameters.

    I found another one that isn't going to work: `params` parameters for theories. There's no way for us to make the right kind of array at runtime, so we'll have to let you do the "hard work" of putting things in an array for us. Thankfully C#'s `[]` array syntax helper should make this conversion pretty trivial for most people. #DotNet #NativeAOT #UnitTest

  24. On the plus side, I now have all of Fact, CulturedFact, Theory, and CulturedTheory running. Theories support InlineData, MemberData, and ClassData. User extensibility for data attributes will require people to write a code generator (kind of a bummer, but that's how all this Native AOT works). #DotNet #NativeAOT #UnitTest

  25. On the plus side, I now have all of Fact, CulturedFact, Theory, and CulturedTheory running. Theories support InlineData, MemberData, and ClassData. User extensibility for data attributes will require people to write a code generator (kind of a bummer, but that's how all this Native AOT works). #DotNet #NativeAOT #UnitTest

  26. This definitely changes how extensibility works.

    One example: instead of relying on a discoverer and custom test class type for [CulturedFact], we have a custom code generator.

    So now I have a FactAttributeGenerator and a CulturedFactAttributeGenerator, and the old reflection-based code (FactAttributeDiscoverer, CulturedXunitTestCase) are unused in native AOT.

    #DotNet #UnitTest #NativeAOT

  27. This definitely changes how extensibility works.

    One example: instead of relying on a discoverer and custom test class type for [CulturedFact], we have a custom code generator.

    So now I have a FactAttributeGenerator and a CulturedFactAttributeGenerator, and the old reflection-based code (FactAttributeDiscoverer, CulturedXunitTestCase) are unused in native AOT.

    #DotNet #UnitTest #NativeAOT

  28. It's just [Fact] tests for now, but I just got an end-to-end run through the code generation path for Native AOT, running all the tests (or not, as needed). 🎉

    Also, stack traces? What stack traces? 😂

    #DotNet #UnitTest #NativeAOT

  29. It's just [Fact] tests for now, but I just got an end-to-end run through the code generation path for Native AOT, running all the tests (or not, as needed). 🎉

    Also, stack traces? What stack traces? 😂

    #DotNet #UnitTest #NativeAOT

  30. It doesn't run anything yet, but the code generation infrastructure is in place (for [Fact] tests, to start), and being able to run things should not be too far behind. Later this week for sure, maybe even later today.

    More importantly, we get a clean AOT publish and execution.

    #DotNet #NativeAOT

  31. It doesn't run anything yet, but the code generation infrastructure is in place (for [Fact] tests, to start), and being able to run things should not be too far behind. Later this week for sure, maybe even later today.

    More importantly, we get a clean AOT publish and execution.

    #DotNet #NativeAOT

  32. Success! 🎉 The runner-side of @xunit has been made native AOT compatible, resulting in our ability publish a native multi-assembly runner.

    This runner is only able to run v3 projects (.NET or .NET Framework). It will definitely *never* be able to run v1 or v2 tests, since those require a runtime environment that's not possible in Native AOT.

    #DotNet #UnitTest #NativeAOT

  33. Success! 🎉 The runner-side of @xunit has been made native AOT compatible, resulting in our ability publish a native multi-assembly runner.

    This runner is only able to run v3 projects (.NET or .NET Framework). It will definitely *never* be able to run v1 or v2 tests, since those require a runtime environment that's not possible in Native AOT.

    #DotNet #UnitTest #NativeAOT

  34. I guess I'm removing XSL-T for report generation from @xunit before we can ship a native AOT version.

    It's okay, nobody likes XSL-T. I certainly don't. 😂 #DotNet #AOT #NativeAOT

  35. I guess I'm removing XSL-T for report generation from @xunit before we can ship a native AOT version.

    It's okay, nobody likes XSL-T. I certainly don't. 😂 #DotNet #AOT #NativeAOT

  36. A good first step.

    These tests (and xunit.v3.assert.aot) are compiled with <PublishAot>true</PublishAot>, but still being run normally (not via a published executable). It's hard for me to know how many *more* tests might fail after publishing, but that's quite a ways off.

    #DotNet #UnitTest #NativeAOT