Open
Description
In a project we switched from SelfContained to PublishAot.
This project wants to sign the published executable in the end.
The Target looks something like this:
<Target Name="SignAfterPublish" AfterTargets="Publish" Condition="''$(RuntimeIdentifier)'=='win-x64' AND '$(Configuration)'=='Release'">
<Message Text="Signing $(MSBuildProjectDirectory)\$(PublishDir)\$(TargetName)$(NativeBinaryExt)"/>
<Exec Command="signtool "$(MSBuildProjectDirectory)\$(PublishDir)\$(TargetName)$(NativeBinaryExt)""/>
</Target>
The filepath got changed from $(PublishedSingleFilePath)
to $(MSBuildProjectDirectory)\$(PublishDir)\$(TargetName)$(NativeBinaryExt)
for the AoT build.
With PublishAot the file in the publish directory is not the AoT binary, when AfterPublish gets called.
It seems its the executable from the folder above publish. Its 300 KB, while the AoT Binary is 40 MB.
The AoT binary is placed in the publish folder after the AfterPublish runs.
Is there a new Target to hook into for this?
At least couldn't find any PublishAoT-Targets in the sources.