question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to publish AOT?

See original GitHub issue

If I publish the sample app, I still get a managed .NET dll file with an executable host file and all the .NET runtime dll files. But when I publish a console project with AOT I get a single unmanaged executable. This is what I’ve expected for Winforms as well.

I used this command dotnet publish -r win-x64 and then went to the publish folder.

image

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
kant2002commented, Sep 7, 2022

Try

<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="7.0.0-preview.6.22324.4" />
0reactions
NCLnclNCLcommented, May 24, 2023

@NCLnclNCL can you show what’s in your Form1.checkactive function? Can you confirm that this is name of event handler for button click? hey bro, i know .net framework has .net native and it supports compiling for x86, why is it difficult to compile x86 for native aot at .net core

Read more comments on GitHub >

github_iconTop Results From Across the Web

Native AOT deployment overview - .NET
Publish native AOT using the CLI · Add <PublishAot>true</PublishAot> to your project file. This property enables native AOT compilation during ...
Read more >
Tutorial: Publish an ASP.NET Core app using native AOT
Learn about how to publish an ASP.NET Core app using native AOT.
Read more >
Microsoft Intros Native AOT for ASP.NET Core
Microsoft Native AOT deployment guidance explains that native AOT support lets developers create a self-contained app, AOT-compiled to native ...
Read more >
.NET functions with native AOT compilation - AWS Lambda
Learn how to create and deploy Lambda functions that use .NET 7 with native AOT compilation, which can reduce cold start times.
Read more >
Ahead Of Time (AOT) Compilation To Native Code In .NET 7
NET development, we compile and build our code to Intermediate Language (IL). Then, when we run the application, the JIT (Just-In-Time) compiler ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found