Skip to content

Fix incremental build issue where Microsoft.WindowsAppRuntime.Bootstrap.dll is always written to output #4282

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
9 changes: 6 additions & 3 deletions build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
%(AdditionalDependencies);
</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy.exe /y "$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppRuntime.Bootstrap.dll" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>

<Target Name="CopyMicrosoftWindowsAppRuntimeBootstrapdllToOutDir" Condition="'$(AppxPackage)' != 'true'" AfterTargets="Build">
Copy link
Member

Choose a reason for hiding this comment

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

Why is this conditioned on "not an appx package"? I guess because generally appx uses the FWP model of binding and not bootstrap?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know, I just maintained the condition from where it was previously. Probably a question for whoever added this -- @DrusTheAxe added in #827.

I also see that Howard tried to make a change to Copy in #2734 and put it back on #2758. Hopefully someone more knowledgeable about these can help verify this change doesn't re-break any of those scenarios. I suspect the change in #2734 didn't work because it wasn't invoking the task in a Target.

Copy link
Member

Choose a reason for hiding this comment

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

OK. I'm generally supportive of the change. If you wanted a slam-dunk no-questions-asked change, just add the /d parameter to xcopy, which only copies if the source is newer than the target.

Copy link
Member

Choose a reason for hiding this comment

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

Why is this conditioned on "not an appx package"?
Because Bootstrapper is only needed when WinAppSDK MSIX packages via WinAppSDK DynamicDependencies, AND WinAppSDK DynDep only supports unpackaged apps.

But isn't this necessary-but-insufficient -- the condition should be "I an not a packaged app AND i am not using WinAppSDKSelfContained"?

Condition="('$(AppxPackage)' != 'true') and ('$(WindowsAppSDKSelfContained)' != 'true')"

?

Copy link
Member

Choose a reason for hiding this comment

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

'$(AppxPackage)' != 'true'

Is that the right test or should it be '$(WindowsPackageType)'=='None' ?

@Scottj1s @bpulliam @evelynwu-msft what's the latest practices for "My VS project is not making an MSIX package"?

Copy link
Member Author

Choose a reason for hiding this comment

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

This condition came from the ItemGroup above.

<Copy
SourceFiles="$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppRuntime.Bootstrap.dll"
DestinationFolder="$(OutDir)"/>
</Target>

</Project>
Loading