-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
The MAUI app project template does not target windows out-of-the-box #4374
Comments
This issue was prompted by the comments in #3625 |
I think you need to update your templates, this has not been the default for a while now. To clarify: the recent versions of templates have Windows enabled by default for a couple of previews already. For some reason the templates aren't updated nicely with Visual Studio, you can update them manually at this time by running the following command in a terminal window: Also check this portion of a video by James for more info: https://www.youtube.com/watch?v=ugem4UbAtC0&t=672s |
Thanks @jfversluis ! Is the comment in the second line below still needed? <ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
<!-- Required - WinUI does not yet have buildTransitive for everything -->
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.0.30" />
</ItemGroup> |
I think so. I think ultimately we can do without these explicit references and it will be implied by adding .NET MAUI to your project, but it seems WinUI hasn't implemented something like that yet... But I might be mistaken. Why you ask? |
I was merely curious - half expecting an explanation along the lines you just gave :-) |
Let me know how that one goes! |
Description
Following the steps to create a MAUI app, I get a project that does not target windows:
Steps to Reproduce
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
I don't know how to see the version of the project templates - or how to update those other than when updating VS itself
Did you find any workaround?
I can fix this in the project file by removing the xml comments around this line
and changing this section
to
Relevant log output
No response
The text was updated successfully, but these errors were encountered: