-
Notifications
You must be signed in to change notification settings - Fork 196
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
Remove net6.0 multitarget for improved compatibility #98
base: main
Are you sure you want to change the base?
Conversation
@@ -7,7 +7,7 @@ | |||
<VersionPrefix>2.0.0</VersionPrefix> | |||
<VersionSuffix>beta.7</VersionSuffix> | |||
|
|||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> | |||
<TargetFrameworks>netstandard2.0</TargetFrameworks> |
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.
Should this target 8.0 instead?
@@ -7,7 +7,7 @@ | |||
<VersionPrefix>2.0.0</VersionPrefix> | |||
<VersionSuffix>beta.7</VersionSuffix> | |||
|
|||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> | |||
<TargetFrameworks>netstandard2.0</TargetFrameworks> |
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.
This may cause issues with sync-over-async in the SCM pipeline, which relies on newer net6.0 sync APIs being available for HttpClient APIs to avoid sync-over-async for the majority case. Removing this target would require sync-over-async for all sync HttpClient calls.
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.
I don't think we will start doing sync over async, unless this OpenAI dll calls the sync HTTP APIs directly. The System.ClientModel implementation (6+ or NS2) is picked based on the runtime of the program, not based on framework target of OpenAI. @ericstj, could you confirm or deny?
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.
Having said that, I don't think we should be removing NETx target. I think we should always cross target to the latest LTS target.
Hello all, Is there any likelihood of this PR being merged? The targeting issue seems to be a blocker for me; if there is some resolution (either via this PR or some other method?), it might unlock a lot of use cases. Thanks in advance |
As described at:
Azure/azure-sdk-for-net#44709
These problems are specific to using the OpenAI library via an intermediate class library targeting
netstandard2.0
; in that case, the multi-target is causing the executing project to pick up the uplevel framework target that's incompatible with downlevel intermediate library.Although there may be other approaches to mitigate, it seems reasonable to not expressly multi-target net6.0 if netstandard2.0 is sufficient.