-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Simplify target to enable config binding src generator from NuGet package, ensure it runs for all TFMs, and rename enabling property #84379
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-configuration Issue Details
|
...ensions.Configuration.Binder/src/buildTransitive/EnableConfigurationBindingGenerator.targets
Outdated
Show resolved
Hide resolved
923793c
to
98917de
Compare
98917de
to
1994914
Compare
...crosoft.Extensions.Configuration.Binder/src/Microsoft.Extensions.Configuration.Binder.csproj
Outdated
Show resolved
Hide resolved
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.
LGTM - just a non-blocking nit.
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="buildTransitive\$(MSBuildProjectName).*" |
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.
<Content Include="buildTransitive\$(MSBuildProjectName).*" | |
<Content Include="buildTransitive\$(PackageId).targets" |
nit: I tend to avoid a wildcard unless it's needed since it hurts evaluation perf. nit: $(PackageId)
should be used rather than $(MSBuildProjectName)
since they can differ, but the PackageID is the one that needs to match.
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.
Maybe we could update the docs (and the other places that do this as well) to be consistent across the repo?
runtime/docs/coding-guidelines/libraries-packaging.md
Lines 130 to 137 in 4f4dd93
```xml | |
<ItemGroup> | |
<Content Include="buildTransitive\$(MSBuildProjectName).*" | |
PackagePath="buildTransitive\netstandard2.0\; | |
buildTransitive\$(NetFrameworkMinimum)\; | |
buildTransitive\$(NetCoreAppMinimum)\" /> | |
</ItemGroup> | |
``` |
I believe the *
is there to support both .props
and .targets
. But @ViktorHofer would know for sure.
...crosoft.Extensions.Configuration.Binder/src/Microsoft.Extensions.Configuration.Binder.csproj
Outdated
Show resolved
Hide resolved
The Line 232 in 15c7022
This is undesirable and can lead to undefined behavior. The latest commit 9eab1ce fixes this issue, enforcing that the removal target runs for all TFMs & also emitting the compat warning for unsupported TFMs. This fix is hardcoded for now. We need to also fix it for the other source-generator targets for multi-targeting and disabling, and come up with the right templating across all the targets & packages. cc @ViktorHofer |
...s.Configuration.Binder/src/buildTransitive/Microsoft.Extensions.Configuration.Binder.targets
Outdated
Show resolved
Hide resolved
</Target> | ||
|
||
<Target Name="NETStandardCompatError_Microsoft_Extensions_Configuration_Binder" | ||
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''"> |
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.
Please change this to '$(SuppressTfmSupportBuildWarnings)' != 'true'
. While at it, can you please also change that here:
Line 207 in c8ec3fd
Condition="'%24(SuppressTfmSupportBuildWarnings)' == ''"> |
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="NETStandardCompatError_Microsoft_Extensions_Configuration_Binder" |
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.
Please file a tracking issue to discuss how to support both the NETStandardCompatError
infrastructure and target framework agnostic msbuild infrastructure.
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.
Here you go: #84570.
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.
LGTM aside from two comments.
EnableMicrosoftExtensionsConfigurationBinderGenerator
toEnableConfigurationBindingGenerator
(fyi @eerhardt).