C# 10 brought implicit usings.
I globaly like them, but they're causing me a conflict on a particular class called Region as there's a conflict with the Microsoft.Identity.Client.Region class.
There's a nice thread here explaining how to disable implicit usings everywhere: C# 10: Disable Global Using
I don't want to do it globally, I want to do it just on specific classes. Alternatively, a solution that would allow me to disable a particular implicit using (Microsoft.Identity.Client.Region) would also serve my needs.
To remove implicit namespace for project completely you can use Using
xml element (see also) with Remove
attribute:
<ItemGroup>
<Using Remove="Microsoft.Identity.Client" />
</ItemGroup>
It also provides option to specify Condition
attribute but I have not found docs on it for this specific use case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With