unoplatform / uno.templates

Uno Platform project templates
https://platform.uno/
Other
17 stars 10 forks source link

Support for net9 Uno Platform class library #1103

Open digger73 opened 1 week ago

digger73 commented 1 week ago

Current behavior

In a newly created UNO platform solution targeting .Net9, creating a new project (uno platform library) results in the project targeting .Net8. Uno-check, Uno-templates and Uno were updated before creating the solution.

Expected behavior

Would expect the new project to target .Net9 like the solution created.

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

Edit the newly added project file to target .Net9 (copy paste the targetframework from the project file created when the solution was created.)

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

Build tasks

IDE

Visual Studio 2022

IDE version

17.12.0

Relevant plugins

No response

Anything else we need to know?

No response

jeromelaban commented 1 week ago

Thanks for the report.

At this time, the class library template does not have a net9 version, only net8. You'll notice that there's no choice either in the template itself to do so. What you did you update the csproj manually is the way to go at this time.

jeromelaban commented 1 week ago

It's supported by the dotnet new command line, though, where you can specify the -tfm parameter.