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

WinAppSdk app templates should generate code following coding best practices #1823

Closed
ChrisGuzak opened this issue Nov 18, 2021 · 4 comments
Closed
Assignees
Labels
area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration

Comments

@ChrisGuzak
Copy link
Member

Describe the bug

@angelazhangmsft updated the templates for the WinAppSDK samples in this PR. These types of changes should be made to the templates that generate the WinAppSdk Apps.

Steps to reproduce the bug

  1. in VS create a new WinAppSdk C++ app using the templates
  2. inspect the code

Expected behavior

expected: the code follows best practices, for example using

namespace winrt
{
    using namespace Microsoft::UI::Xaml;
}

instead of

using namespace winrt;
using namespace Microsoft::UI::Xaml;

Screenshots

No response

NuGet package version

No response

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

No response

@JaiganeshKumaran
Copy link
Contributor

I think using the winrt namespace is fine as long as the project only uses C++/WinRT and doesn't use C++/CX and/or WRL along with it.

@andrewleader andrewleader added the area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration label Nov 22, 2021
@ChrisGuzak
Copy link
Member Author

This is the recommended best practice that we want templates to follow.

@bpulliam
Copy link
Collaborator

@ChrisGuzak are there any remaining issues in the templates located in https://github.com/microsoft/WindowsAppSDK/tree/main/dev/VSIX?

@LegendaryBlair
Copy link

According to the discussion in this draft PR, close this issue as won't fix.

@LegendaryBlair LegendaryBlair closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration
Projects
None yet
Development

No branches or pull requests

9 participants