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

Proposal: Namespace override at the project level. #4445

Open
Noemata opened this issue Mar 8, 2021 · 2 comments
Open

Proposal: Namespace override at the project level. #4445

Noemata opened this issue Mar 8, 2021 · 2 comments
Assignees
Labels
area-ProjectSystem area-Tooling feature proposal New feature proposal product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@Noemata
Copy link

Noemata commented Mar 8, 2021

Proposal: Namespace override at the project level.

Summary

To ease the process of migrating UWP code to WinUI, having a namespace override at the project level would allow for scenarios that required zero source code level changes when maintaining common code that targets both UWP and WinUI. This mechanism would be useful in other scenarios also.

Rationale

  • Ease the process of migrating code from UWP to WinUI
  • Simplify code maintenance that requires common code between UWP and WinUI
  • Increase the likelihood of project migration from UWP to WinUI

The mechanism would look something like this at the project level:

...
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <Platforms>x86;x64;arm64</Platforms>
    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
...
    <NameSpaceOverrides>
	Windows.UI.Composition = Microsoft.UI.Composition
	Windows.UI.Xaml.Navigation = Microsoft.UI.Xaml.Navigation
    </NameSpaceOverrides>
@Noemata Noemata added the feature proposal New feature proposal label Mar 8, 2021
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Mar 8, 2021
@asklar
Copy link
Member

asklar commented Mar 25, 2021

For C++ projects, you can use this: https://www.nuget.org/packages/XamlStraddle/

@Noemata
Copy link
Author

Noemata commented Mar 25, 2021

@asklar , C++ is awesome, you can morph it to do your bidding. My favorite example of this is a package that makes C++ look like Cobol. I doubt namespace swapping will get much attention on the C# side given WinUI is also targeting UWP. It would be a cool feature to have. Surprising we don't yet have this sort of capability in C#.

@evelynwu-msft evelynwu-msft removed the needs-triage Issue needs to be triaged by the area owners label Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ProjectSystem area-Tooling feature proposal New feature proposal product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

5 participants