Skip to content

Conversation

@bruno-garcia
Copy link
Member

@bruno-garcia bruno-garcia commented Nov 21, 2023

On main we don't have any dependencies, so this was introduced on net8.0:

<FrameworkReference Include="Microsoft.AspNetCore.App" />

If that's the case, we don't need to add when running on net6.0/7.0.

If not, we should define the lowest version per TFM

#skip-changelog

Comment on lines 36 to 39
<!-- <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
</ItemGroup> -->

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If CI works without this, just delete it:

Suggested change
<!-- <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
</ItemGroup> -->
<!-- <ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
</ItemGroup> -->

Copy link
Collaborator

@jamescrosswell jamescrosswell Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, very mysterious. I am wondering how this code can possibly work in CI without that, as it depends on the source generated configuration bindings from Microsoft.Extensions.Configuration.Binder:

They are only used at design time to generate the *.g.cs classes I guess... still doesn't make sense to me though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.NET 6 prob used reflection, and .NET 8 added source generator (get make this trimmable/AOT friendly)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That particular method (Bind) isnt' available via reflection (it's a generated method) and the codepath that uses it is when !NETSTANDARD2_0 so it still doesn't compute for me 🤷🏻‍♂️

@bitsandfoxes bitsandfoxes merged commit 89b2f6a into feat/4.0.0 Nov 21, 2023
@bitsandfoxes bitsandfoxes deleted the fix/aspnetcore-dependency branch November 21, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants