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

Remove net6.0 multitarget for improved compatibility #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Release History

## 2.0.0-beta.7 (Unreleased)
## 2.0.0-beta.8 (Unreleased)

## Bugs Fixed

- ([#84](https://github.com/openai/openai-dotnet/issues/84)) Fixed a `NullReferenceException` thrown when adding the custom headers policy while `OpenAIClientOptions` is null (commit_hash)
- Removed the project's multi-target to net6.0 to improve compatibility when calling via a netstandard2.x class library (commit_hash)

## 2.0.0-beta.7 (2024-06-24)

## Bugs Fixed

- ([#84](https://github.com/openai/openai-dotnet/issues/84)) Fixed a `NullReferenceException` thrown when adding the custom headers policy while `OpenAIClientOptions` is null ([0b97311](https://github.com/openai/openai-dotnet/commit/0b97311f58dfb28bd883d990f68d548da040a807))

## 2.0.0-beta.6 (2024-06-21)

Expand Down
2 changes: 1 addition & 1 deletion src/OpenAI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<VersionPrefix>2.0.0</VersionPrefix>
<VersionSuffix>beta.7</VersionSuffix>

<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Collaborator

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?

Copy link
Collaborator

@KrzysztofCwalina KrzysztofCwalina Aug 7, 2024

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.

<LangVersion>latest</LangVersion>

<!-- Sign the assembly with the specified key file. -->
Expand Down
Loading