-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
DisableImplicitNamespaceImports=false doesn't disable DisableImplicitNamespaceImports_DotNet. #19465
Comments
I think this applies to all |
That's strange, Line 38 in 2c47826
The individual conditions do not control whether the target runs or not, they only control whether the namespaces are added to the item group that's used by the target. In effect, |
I see, this behavior happens with a |
This is what is causing that behavior: sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.props Lines 85 to 99 in 55195f3
Should the ones that are imported for VB be conditioned to not be included if |
Reassigning to you @rafikiassumani-msft to ensure this is handled appropriately. @safern @DamianEdwards is this issue still applicable❔ |
As part of the changes in rc.1 the sub-level properties were removed so this doesn't apply anymore. |
When settings
DisableImplicitNamespaceImports=false
,DisableImplicitNamespaceImports_DotNet
is not set to any value:sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateImplicitNamespaceImports.targets
Line 22 in 2c47826
So this condition '$(DisableImplicitNamespaceImports_DotNet)'!='true' in
sdk/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.props
Line 86 in 2c47826
true
and the implicit namespaces are still generated. So the only way to disable them is to set both properties totrue
explicitly.cc: @dsplaisted @JunTaoLuo
The text was updated successfully, but these errors were encountered: