DEV Community

ilija1010
ilija1010

Posted on

Ngen doesnt't work on .net 6

When I try to use ngen on a executable compiled with .net6 i get following error:

Microsoft (R) CLR Native Image Generator - Version 4.8.4320.0
Copyright (c) Microsoft Corporation. All rights reserved.
Uninstalling assembly C:\Users\User\Desktop\dotnet1.exe because of an error during compilation: Failed to load the runtime. (Exception from HRESULT: 0x80131700).
Failed to load the runtime. (Exception from HRESULT: 0x80131700)

On the other hand, a executable compiled with csc works perfect with ngen. How to solve this, if not possible what are the alternatives to ngen?

Top comments (0)