Giter Site home page Giter Site logo

Comments (5)

basicx-StrgV avatar basicx-StrgV commented on May 27, 2024

Hi,
your project targets the .NET Framework 4.8, which is not supported by this library.
The library is written in .NET Core 3.1 and therefore only supports the same or higher versions.
If there is no specific reason as to why you used .NET Framework 4.8 for your project, I would recommend using at least .NET 6.0 (Oldest LTS version) for new applications*.

If you need to use .NET Framework 4.8 for your project, the library can not be used with it.

*I don’t know how familiar you are with .NET, but if you are quite new to it, you should make yourself familiar with the different .NET versions.
The different names and versions can be a little confusing at first. I would recommend to read the following article, that gives a simple explanation about the different versions: https://learn.microsoft.com/en-us/ef/core/miscellaneous/platforms

from wget.net.

SuperStark avatar SuperStark commented on May 27, 2024

Hi, your project targets the .NET Framework 4.8, which is not supported by this library. The library is written in .NET Core 3.1 and therefore only supports the same or higher versions. If there is no specific reason as to why you used .NET Framework 4.8 for your project, I would recommend using at least .NET 6.0 (Oldest LTS version) for new applications*.

If you need to use .NET Framework 4.8 for your project, the library can not be used with it.

*I don’t know how familiar you are with .NET, but if you are quite new to it, you should make yourself familiar with the different .NET versions. The different names and versions can be a little confusing at first. I would recommend to read the following article, that gives a simple explanation about the different versions: https://learn.microsoft.com/en-us/ef/core/miscellaneous/platforms

Thank you for the response, unfortunately the project I have is too big to convert to .net core (without breaking a lot of things!)
I think I will write a CLI using .net core and incorporate WGet.NET to get correctly formatted results.

My issue is related to extracting strings from Winget eg just Name and ID and adding them to separate list boxes, but as the ID can contain multiple sizes and full stops its rather hard to code a substring - your tool looks like the answer.

from wget.net.

basicx-StrgV avatar basicx-StrgV commented on May 27, 2024

You could also try the following option, if it is viable for your project.

The library is under the MIT license, so you can use any part of the code if you provide the original license with it.
If your application only needs to get the name and id of a package, and it already has the winget output, you might be interested in just using the static ‘ProcessOutputReader’ class from the library.
https://github.com/basicx-StrgV/WGet.NET/blob/main/src/WGet.NET/HelperClasses/ProcessOutputReader.cs

You could copy it and port it to your target framework version.
The class is not that big and all source related content can properly be removed for your use case.

The ToPackageList method of the class, takes the winget output as a string array containing the output lines, an enum providing information about the actions, and a source name.
You properly can ignore the source name input, because it is only used to provide the source info to the packages, if the output is filtered by source.

public static List<WinGetPackage> ToPackageList(string[] output, PackageAction action = PackageAction.Default, string? sourceName = null)

It will return a list of WinGetPackage objects containing the info that you need.

from wget.net.

basicx-StrgV avatar basicx-StrgV commented on May 27, 2024

Seeing that this seems to be a bigger problem than I first thought, because I did not expect people to use the library in older software, I will think about a solution to support older framework versions.

Please refer to the following Issue for further updates.
#15

from wget.net.

basicx-StrgV avatar basicx-StrgV commented on May 27, 2024

Version 3.0 is out now, with support for .Net Standard 2.0.

https://github.com/basicx-StrgV/WGet.NET/releases/tag/3.0.0

This should fix the problem with .Net Framework 4.8 you encounter.

I will close the issue for now. If you still encounter any problems feel free to open a new issue.

from wget.net.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.