Skip to content
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

[TokenCache] Downgrade dependency version for Microsoft.Extensions on net472 #1663

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@
<DocumentationFile>Microsoft.Identity.Web.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net472' Or '$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'net5.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net462' Or '$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="5.0.8" />
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net472'">
Copy link
Member

@bgavrilMS bgavrilMS Mar 22, 2022

Choose a reason for hiding this comment

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

@jennyf19 @jmprieur @pmaytak - this package has no conditional compilation at all, so the only reason we have all these frameworks it to be able to have different dependencies, i.e. different versions of dependencies.

In particular, net462 and net472 seem identical?

If we get net4x2 to have the same dependencies as netstandard, we might as well eliminate net4x2 completely.

Copy link
Member

@bgavrilMS bgavrilMS Mar 22, 2022

Choose a reason for hiding this comment

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

I don't remember the details of the investigation into the target framework, but I see that some packages try to simplify things into supporting only netstandard2.0.
https://www.nuget.org/packages/Microsoft.Extensions.Configuration.AzureKeyVault/

Copy link
Author

Choose a reason for hiding this comment

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

I will note that while I was trying to assemble a simple repro of this issue, a project on net462 used the netstandard dependency set for some reason, while net472 used the expected net472 dependencies. I didn't look into it too deeply though, my org's projects are all net472.

<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.0" />
Expand Down