Skip to content

Make InstallRuntimeComponentToFinalDestination use NativeOutputPath for copying to runtime output #100782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/native/managed/native-library.targets
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

<Target Name="InstallRuntimeComponentToFinalDestination"
AfterTargets="CopyNativeBinary"
DependsOnTargets="CopyNativeBinary;StripLibraryLikeCoreCLRBuild" Condition="'$(IsRuntimeComponent)' == 'true'">
DependsOnTargets="CopyNativeBinary;_CopyAotSymbols;StripLibraryLikeCoreCLRBuild" Condition="'$(IsRuntimeComponent)' == 'true'">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MichalStrehovsky @agocke is there a better / public target to chain into instead of _CopyAotSymbols for running something after NativeAOT symbols are copied?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be copied from bin\[config]\[framework]\[rid]\native ($(NativeOutputPath)) instead? That one should be available after LinkNative already, we don't even need to run Publish. Looks like this is making three copies of the symbols. We could get away with two.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to using NativeOutputPath and depending on LinkNative.

we don't even need to run Publish. Looks like this is making three copies of the symbols. We could get away with two.

Agreed, we should be able to avoid this. In the interest of just unblocking codeflow, I didn't try removing the publish in this PR - will also look at that as a folllow-up along with using either the live or versions.props version of the tools.

<Error Text="Set at least one @InstallRuntimeComponentDestination item" Condition="@(InstallRuntimeComponentDestination->Count()) == 0" />

<PropertyGroup>
Expand All @@ -88,7 +88,7 @@

<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<CopyFinalFiles Include="$(PublishDir)$(TargetName)$(NativeBinaryExt)" />
<CopyFinalFilesPDB Include="$(PublishDir)$(TargetName).pdb" />
<CopyFinalFilesPDB Include="$(PublishDir)$(TargetName).pdb" Condition="Exists('$(PublishDir)$(TargetName).pdb')" />
</ItemGroup>

<Message Importance="Normal" Text="Installing @(CopyFinalFiles) into %(_NormalizedInstallRuntimeComponentDest.Identity)"/>
Expand Down