user586399
user586399

Reputation:

Converting .net exe to native win32 exe?

I have visited this and found no answer How to convert a .NET exe to native Win32 exe? for me. I am searching for a program that converts .net exe to win32 exe. Is that possible ? I have run ngen.exe from Microsoft, but when I write the command that should convert the assembly, it tells that converting successed, but I don't find the converted exe: This is the command:

start ngen install C:\program.exe /debug

Upvotes: 0

Views: 4538

Answers (2)

Hans Passant
Hans Passant

Reputation: 941208

You need a much bigger weapon to create a native win32 executable from a managed program. Ngen.exe merely pre-compiles the IL, the CLR and the original assemblies are still needed to run the program.

The kind of tool you need was somewhat popular in the early days of .NET when programmers were fretting about getting the .NET framework installed on the target machine. They are known as ".NET linkers", Salamander was popular. No idea if it has kept up with .NET versions, you definitely want to verify the trial version first. Also beware of the considerable sticker-shock you'll suffer.

Upvotes: 5

Larry Watanabe
Larry Watanabe

Reputation: 10184

I think ngen.exe installs the native image in the cache. So you don't really see it as a file on disk, but it will run when you invoke the application.

You can see what images are in the cache with

ngen display

Upvotes: 1

Related Questions