Native AOT - possible to generate Map file for use with VMprotect or other tools?

354 views Asked by At

Using Native AOT for some mostly console + MessageBox applications, working well (using suppression option to allow Windows Forms)

https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/

However, I need to generate MAP files to use VMprotect to its full potential.

Is there some way to enable MAP file generation in this situation?

Tried passing the /MAP:xxxx flag and it isn't supported

dotnet publish -r win-x64 -c Release /MAP:mymap.map

Maybe there is some super under the hood way to achieve this?

Are C++ compilers ever even utilized in the Native AOT build chain?

1

There are 1 answers

0
JOULTICOA On BEST ANSWER

Issue answered here:

https://github.com/dotnet/runtime/issues/80992

<ItemGroup>
   <LinkerArg Include="/MAP:$(TargetName).map" />
</ItemGroup>