Skip to content
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

Support for Modern UWP #12

Merged
merged 8 commits into from
Nov 13, 2024
Merged

Support for Modern UWP #12

merged 8 commits into from
Nov 13, 2024

Conversation

devsko
Copy link
Contributor

@devsko devsko commented Oct 20, 2024

This PR adds support for Modern UWP (currently in preview) as described here Modernize your UWP app with preview UWP support for .NET 9 and Native AOT
Build prerequisites

  • .NET 9 RC2
  • Windows SDK 26100

I also changed how the font files find their way into the APPX because

  • in classic UWP they were copied to the root directory and not found during runtime at all
  • in modern UWP they were found but also visible in solution explorer

@davidxuang
Copy link
Owner

Hi,

These changes look good overall, but for the edits about the assets:

  • Is there any reference regarding this?
  • Should this be adapted to WinUI 3 port as well?

Thanks for your contributions.

@devsko
Copy link
Contributor Author

devsko commented Oct 27, 2024

Hey @davidxuang

Is there any reference regarding this?

The contentFiles NuGet feature doesn't work reliably for legacy projects like (legacy) UWP. For me it didn't work at all, and I had to hack the copy font files.
In SDK projects like modern UWP or WinUI, they work but are always visible - and editable - in solution explorer.
Screenshot 2024-10-27 152712

There are several open issues describing this (i.e. dotnet/project-system#3431).
The NuGet build and buildTransitive assets are described here https://learn.microsoft.com/en-us/nuget/concepts/msbuild-props-and-targets and here https://github.com/NuGet/Home/wiki/Allow-package--authors-to-define-build-assets-transitive-behavior

Should this be adapted to WinUI 3 port as well?

Absolutely, if you want, i can add it to this PR.

@davidxuang
Copy link
Owner

I've merge the changes about the assets and adapted it to WinUI. For the modern UWP part I will wait for the official release of .NET. Are you sure that net8.0-windows instead of net9.0-windows will work for UWP?

@devsko
Copy link
Contributor Author

devsko commented Oct 29, 2024

Double checked that it works for TargetFramework net8. You need .net9 rc2 or higher SDK to build though.

@devsko
Copy link
Contributor Author

devsko commented Oct 29, 2024

I am just merging your changes.
Right now the changes in build\uap10.0.17763.0\FluentIcons.Uwp.props do NOT work in legacy project system. That is part of the bug. In legacy project system, it only works this way:

<Project>

  <ItemGroup Condition="'$(OutputType)' == 'AppContainerExe'">
    <Content Include="$(MSBuildThisFileDirectory)..\..\content-transitive\**\*.*">
      <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
    </Content>
  </ItemGroup>

</Project>

(In SDK project system this bug is fixed)

davidxuang pushed a commit that referenced this pull request Oct 29, 2024
@davidxuang davidxuang merged commit 6b45001 into davidxuang:master Nov 13, 2024
davidxuang added a commit that referenced this pull request Nov 22, 2024
Closes #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants