-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow for disabling default MAUI usings when embedding #19314
base: main
Are you sure you want to change the base?
Conversation
@@ -7,7 +7,7 @@ | |||
</MauiXaml> | |||
</ItemDefinitionGroup> | |||
|
|||
<ItemGroup Condition=" ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable') and '$(TargetFrameworkVersion)' != '' "> | |||
<ItemGroup Condition=" ('$(MauiEnablePlatformUsings)' != 'true') and ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable') and '$(TargetFrameworkVersion)' != '' "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also do this in a .csproj
today:
<Using Remove="@(Using->HasMetadata('Sdk'))" />
There is an example here how we removed iOS/Android default usings:
Line 12 in 174a3a9
<Using Remove="@(Using->HasMetadata('Platform'))" /> |
Would you also want to restore the default iOS/Android usings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is using the same property that does restore the platform usings. So if you restore the platform usings, it disables the maui usings as they pretty much all conflict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, at minimum, it seems like we want a project in here we could build as a test case. Just one that would fail to build if it didn't work correctly, and also is an example of embedding?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying my best to get that in, but we got no budget to add samples today. I have one locally, but maybe this all must wait then.
This will have to wait for embedding to become a priority. |
Description of Change
Provide a way to disable the maui usings when embedding to avoid many ambiguities.
This is mainly for windows, but android does have a few as well.