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

Leverage packages provided by framework rather than polyfill/deprecated packages #5106

Closed
thompson-tomo opened this issue Mar 20, 2024 · 1 comment · Fixed by #5129
Closed

Comments

@thompson-tomo
Copy link
Contributor

The following nuget packages should only be required on older frameworks where the framework is not providing the libraries:

  • Microsoft.AspNetCore.Http -> Elsa.Telnyx
  • Microsoft.AspNetCore.Http.Abstractions -> Elsa.Telnyx
  • System.ComponentModel.Annotations -> >Elsa.Workflows.Core
  • System.Text.Json -> Elsa.Common
Copy link

glime-ai bot commented Mar 20, 2024

To address your inquiry about the necessity of certain NuGet packages for Elsa Workflows, it's important to understand that the need for explicit package references can depend on the target framework of your application.

For applications targeting .NET Core 3.0 and above, many ASP.NET Core related packages are included as part of the shared framework, which is referenced by using the FrameworkReference tag in your project file. This means that for such applications, you typically do not need to reference individual ASP.NET Core packages like Microsoft.AspNetCore.Http directly.

However, if you are targeting an older framework or a framework that does not include these libraries as part of a shared framework, you may need to reference them explicitly.

Here's a breakdown of the packages you mentioned:

  • Microsoft.AspNetCore.Http and Microsoft.AspNetCore.Http.Abstractions: These packages are part of the ASP.NET Core shared framework. If you are targeting .NET Core 3.0 or above, you do not need to reference these packages explicitly, as they are included in the Microsoft.AspNetCore.App shared framework.

  • System.ComponentModel.Annotations: This package provides attributes that are used for data modeling and validation. It is not specific to ASP.NET Core and may need to be referenced explicitly if your project requires these annotations and they are not available in your target framework.

  • System.Text.Json: This package provides support for JSON serialization and deserialization. It is included in .NET Core 3.0 and above, so you would not need to reference it explicitly when targeting those frameworks.

For Elsa Workflows, you should review the framework compatibility and dependencies listed in the documentation or the NuGet package information to determine if you need to reference these packages directly. If you are using .NET Core 3.0 or above, it is likely that you do not need to add these packages explicitly unless you have a specific reason to do so.

Please let me know if you need further clarification or if you have a specific scenario in mind that requires these packages.

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 a pull request may close this issue.

1 participant