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

Request to Update Target Framework for Microsoft.Extensions.AI.Abstractions #110039

Closed
cloudsere opened this issue Nov 21, 2024 · 10 comments
Closed
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Comments

@cloudsere
Copy link

Description

Hi Team,

We noticed that the latest release of Microsoft.Extensions.AI.Abstractions targets .NET Framework 4.6.2. However, .NET Framework 4.6.2 will reach end of support on January 12, 2027. https://learn.microsoft.com/en-us/lifecycle/products/microsoft-net-framework

Our project uses .NET Framework 4.7.2, which has long-term support, but we are currently blocked from using this package due to the lack of target platform support for .NET Framework 4.7.2.

Could you please update the target framework to .NET Framework 4.7.2 in future releases to ensure compatibility with our project and other similar scenarios?

Thank you for your consideration!

Reproduction Steps

Add Microsoft.Extensions.AI.Abstractions to a .NET Framework 4.7.2 project

Expected behavior

Microsoft.Extensions.AI.Abstractions targets .NET Framework 4.7.2

Actual behavior

Image

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 21, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 21, 2024
@huoyaoyuan
Copy link
Member

Our project uses .NET Framework 4.7.2, which has long-term support, but we are currently blocked from using this package due to the lack of target platform support for .NET Framework 4.7.2.

Could you please update the target framework to .NET Framework 4.7.2 in future releases to ensure compatibility with our project and other similar scenarios?

It isn't needed. Any package supporting .NET Framework 4.6.2 is supporting .NET Framework 4.7.2.

The warning message means you aren't targeting .NET Framework 4.7.2 in your project, but other .NET Standard compatible frameworks. I can't reproduce it on a fresh .NET Framework 4.7.2 project.

@huoyaoyuan
Copy link
Member

The package lives in https://github.com/dotnet/extensions , though it can also be helpful to discuss in this repo. You can navigate with "Source repository" link on nuget.org.

@cloudsere
Copy link
Author

Hi @huoyaoyuan thanks for sharing, but this is our error: Microsoft.Extensions.AI.Abstractions 9.0.0-preview.9.24525.1 doesn't support net472 and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. wondering do you know the reason?

@huoyaoyuan
Copy link
Member

It's better to collect msbuild binlog to see what happens. Note that it would contain information about your project and source code.
Are you using the old .NET Framework project, or new SDK-style project?

@cloudsere
Copy link
Author

Hi @huoyaoyuan, we are using the old .NET Framework project:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <EnableNETAnalyzers>true</EnableNETAnalyzers>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
  </PropertyGroup>

@huoyaoyuan
Copy link
Member

It looks strange. Looking through the package content of Microsoft.Extensions.AI.Abstractions, it doesn't contain msbuild targets for the target framework validation logic. Can you confirm which .targets file the warning comes from?

@cloudsere
Copy link
Author

cloudsere commented Nov 21, 2024

Hi @huoyaoyuan, the .targets file is

139>...\.nuget\packages\microsoft.extensions.ai.abstractions\9.0.0-preview.9.24525.1\buildTransitive\net462\Microsoft.Extensions.AI.Abstractions.targets(5,5): warning : Microsoft.Extensions.AI.Abstractions 9.0.0-preview.9.24525.1 doesn't support net472 and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk.

@cloudsere
Copy link
Author

cloudsere commented Nov 21, 2024

The package lives in https://github.com/dotnet/extensions , though it can also be helpful to discuss in this repo. You can navigate with "Source repository" link on nuget.org.

Yes, I actually came from the 'Source repository' link. However, when I created the issue, I selected 'Issue with .NET runtime or core .NET libraries,' which redirected me here. I can move the issue to the https://github.com/dotnet/extensions repo though:)
Image

@huoyaoyuan
Copy link
Member

OK I looked closely into the version. The warning was present in the previous version 9.0.0-preview9.24525.1. The warning unconditionally applied to any .NET Framework version, including .NET Framework 4.6.2. It's now removed from the latest version 9.0.0-preview.9.24556.5.

However, when I created the issue, I selected 'Issue with .NET runtime or core .NET libraries,' which redirected me here.

"Core" means libraries under System namespace and a portion of Microsoft.Extensions that has been ported here.

@cloudsere
Copy link
Author

@huoyaoyuan
Thanks for sharing!

However, we are using the latest [email protected], which is still using the old version 9.0.0-preview.9.24525.1:
Image

That said, I noticed that SemanticKernel was updated just 14 hours ago: Link to commit.
microsoft/semantic-kernel@96b3595#diff-21abc2ac38e0ade95299a2450724507fe1d080c383a3024337f9177278c64186L66

So I think once the new version got release, our problem will be resolved, thanks!

@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

No branches or pull requests

2 participants