I have a solution with a .NET 8.0 WPF application and a .NET 8.0 Windows Application Packaging Project. When i try to install it on a machine that does not have .NET 8.0 Runtime installed, the installation works but the application wont start.
So is there a way I can somehow include it in the package?
I tried adding "<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>" and
<Target Name="_RemoveFrameworkReferences" BeforeTargets="_ConvertItems;_CalculateInputsForGenerateCurrentProjectAppxManifest">
<ItemGroup>
<FrameworkSdkReference Remove="@(FrameworkSdkReference)" Condition="$([System.String]::Copy('%(FrameworkSdkReference.SDKName)').StartsWith('Microsoft.WindowsAppRuntime.'))" />
</ItemGroup>
</Target>
in both the Packaging Project and WPF application but it didn't seem to do anything