Welcome to this blog where we embark on a journey to uncover whether a .NET NuGet package finds its perfect match with IBM Power. If you're new to the world of NuGet, fret not! This is your trusty guide, ready to provide a quick crash course. NuGet, the official package manager for .NET, empowers developers to seamlessly package and distribute their software crafted using .NET framework. So, fasten your seatbelts as we delve into the fascinating realm of package compatibility!
What is a NuGet package?
So, what exactly is a NuGet package? It's a neat little ZIP file with the extension .nupkg. Inside, you'll find compiled code (DLLs), related files, and a descriptive manifest that includes information like the version number of the package.
Where can I find the list of available NuGet packages?
To discover available NuGet packages, head over to the NuGet Gallery. It serves as the central package repository for both package authors and consumers.
Steps to identify if a package is supported on IBM Power
Let's now jump into the steps to identify if a package is supported on IBM Power:
- Go to the NuGet Gallery website, enter the package name in the search box, and hit enter. For example, if you're looking for the ‘Microsoft ML package’, simply type its name and search for it.
- Click on the package name to access its details, including an overview, available versions, supported .NET framework versions, project website, source repository link, and more.
- Switch to the ‘Frameworks’ tab to check which versions of the .NET framework are supported. Since .NET is supported on IBM Power starting from version 7, ensure that the package supports .NET 7 or a higher version.
- If the package doesn't support .NET 7, it won't work on IBM Power. In such cases, you'll need to port it to .NET 7.
- If the package is supported on .NET 7, verify that it contains platform-specific DLLs. To do this, download the package by clicking the ‘Download Package’ link on the right panel. Change the file extension from '.nupkg' to '.zip' and unzip the package.
- Inside the package, you will find DLL files. If a DLL is platform specific, it will be located in a subfolder named after the platform, such as x86, arm64 and more.
Here's an image depicting the folder structure for the Microsoft.ML package with its platform specific subfolders.
Here’s another image depicting the folder structure for the CsvHelper package without platform specific DLLs.
- If a package contains platform-specific code but lacks DLLs for the IBM Power platform, it means the package isn't supported on IBM Power. If the package's code is open source, you'll find the URL on the NuGet site's right panel as shown.
Additionally, you have the option to port a package to IBM Power. If you encounter any issues during the porting process, feel free to reach out to us for assistance.
- If you don't find any platform-specific DLLs, it indicates that the package is generic and should work on IBM Power without any issues.
These steps will help you determine if a .NET NuGet package is supported on IBM Power. However, it's still essential to verify the package on IBM Power by running sample code or test cases provided in the corresponding Git repository. Here's an example of how we verified the CsvHelper package on Power by running its tests.
Sometimes, despite going through these steps, you might assume a package should work on IBM Power, but it may still require code modifications. For instance, the SQLitePCLRaw.core package should have functioned on IBM Power but needed minor changes. We've implemented those changes through Add support for linux-ppc64le target #525 pull request (PR).
To sum it up, these are general guidelines for identifying if a package is supported on IBM Power or not. Verify the package by writing a sample application that uses the package or by running its test cases before you use it on IBM Power.