Skip to content

.NET Framework Support #11

Description

@ameisen

Any chance you could add a build configuration for .NET Framework (preferably 4.5)?

Activity

  1. Nominom commented on Jan 3, 2021

    @Nominom
    Owner

    Do you specifically need Framework 4.5? Would some netstandard target work? It might require a little effort since most of the internals use Span but probably not impossible.

  2. ameisen commented on Jan 3, 2021

    @ameisen
    Author

    I believe that NET Standard 1.1 or 1.2 would work (as those reflect 4.5 and 4.5.1).

    I ended up implementing my own Span in my project.

  3. Nominom commented on Jan 3, 2021

    @Nominom
    Owner

    I'll see what I can do. (Also, nice cat.)

  4. Nominom commented on Jan 3, 2021

    @Nominom
    Owner

    Seems like ImageSharp (my dependency) only supports down to netstandard1.3. Would your project be able to upgrade to Framework 4.6 or 4.7?

  5. ameisen commented on Jan 4, 2021

    @ameisen
    Author

    Unfortunately, no. It's a mod for a game that relies on XNA, so the framework is pretty locked.

    What is needed in ImageSharp?

    (He isn't in the room right now, but if he were he would respond probably by purring)

  6. Nominom commented on Jan 4, 2021

    @Nominom
    Owner

    ImageSharp is used for saving and loading standard image formats (jpg, png, tga..) and resizing the texture for mipmap creation. I am planning on replacing it with my own implementation eventually, but that's probably going to take a while.

    If you have another way of feeding RGBA-data to the library and don't need mipmaps, then creating a dependency-free fork for net45 might be possible.

  7. ameisen commented on Jan 4, 2021

    @ameisen
    Author

    I don't need mipmaps, and I have zero use for standard formats. The input data is raw data (BGRA, RGBA, BGR, RGB), and I expect raw BCn results (I only need BC1/2/3).

  8. Nominom commented on Jan 5, 2021

    @Nominom
    Owner

    I'll whip up a stripped-down version for net45 tonight then. Might be up on nuget by tomorrow. I probably won't be maintaining that one as actively but it's there until I can get rid of ImageSharp.

  9. Nominom commented on Jan 6, 2021

    @Nominom
    Owner

    Hey, the net45 version is up on nuget now: https://www.nuget.org/packages/BCnEncoder.Net45

    Input data needs to be as a byte array in rgba format and there is no mipmap generation. For getting raw compressed bytes you can use the BcEncoder.EncodeToRawBytes API.

    If you use it and find anything lacking or something not working correctly, hit me up with another issue.

  10. ameisen commented on Jan 9, 2021

    @ameisen
    Author

    I haven't had a chance to use it yet, I've been very busy at work and haven't had an opportunity to work on this project.

  11. Nominom commented on Jan 9, 2021

    @Nominom
    Owner

    Alright. Let me know if you do and need anything changed. For now I think this issue can be marked as closed.

  12. tokke001 commented on May 12, 2022

    @tokke001

    hey @Nominom ,
    any chance you plan on an update of the .NET Framework version to latest?

    your library is very good, and i m trying to use it for my projects of reading game texture files
    but there are some problems with the .NET framework version wich got fixed at the (newer) .net standard version:
    i think issues in the alpha , and no BC6 support

    i tried myself to convert the latest 2.1.0 version to .NET framework 4.7.2 (wich has support for .NET Standard 2.0) :
    but i didnt succeed and had empty textures

    if you would find time (and energy),
    because i think you know your code better for this
    i would appreciate very much
    but anyway: still a great library ! :)

  13. Nominom commented on May 12, 2022

    @Nominom
    Owner

    Hi!

    I'm currently in the process of making version 3.0, which includes many major refactors and improvements. I could look into adding support for older .NET Standard versions in the same update. It would be quite a pain to manually import the new changes to the net45 branch since they are so different.

    I can't promise anything concrete for now, but I'll reopen this issue and keep you posted!

  14. tokke001 commented on May 12, 2022

    @tokke001

    yes,
    i know what you mean, i noticed myself the changes between the two versions

    thanks, i ll keep an eye on the project for sure !

  15. UlyssesWu commented on Jul 3, 2022

    @UlyssesWu

    I just made a .NET standard 2.0 port (with minimal changes), in order to use it in .NET Framework 4.8 projects.
    https://github.com/MonarchSolutions/BCnEncoder.NET

    And here is the myget package so you can use it now:
    https://www.myget.org/feed/monarchsolutions/package/nuget/BCnEncoder.NetStd

    Unit tests show 185/200 cases passed, so I guess maybe there are still something wrong?
    But at least the BC7 decode/encode is working for me.
    bcN-test

    I should warn that I didn't measure the performance, and it should be very bad comparing to the original .NET standard 2.1 version, because I have to replace Nominom's carefully constructed high-performace span/memory codes to some very bad performance codes like Span<T>.ToArray(). My project don't care much about this performance at the moment.

  16. RonaldZaZ commented on Feb 25, 2023

    @RonaldZaZ

    Is it possible to support netstandard2.0? I'm trying to write an shell extension using shellsharp which only support net framework. I can't consume netstandard2.1 from net framework.

  17. linked a pull request that will close this issueSupport Netstandard 2.0 again #74on Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions