I've got an older .NET Winforms application that targets Framework 4.7.2. I need to change it so the Infragistics libraries it references (UltraWinGrid, UltraWinDock, UltraWinToolbar, UltraWinTree) to get loaded via Nuget rather than referencing a location on disk.
I see an error whenever I try to add any WinForms Nuget package from the Infragistics licensed source.
Could not install package 'Infragistics.WinForms.Shared 19.2.476'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I did find this post: https://es.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/121276/nuget-packages-won-t-install
indicating that the nuget packages for WinForms only support .NET Core applications.
Is there a way I can get official source Nuget packages for WinForms without changing my application build target? Or, is there a way I could set up a local source on my machine using the installed Infragistics library files?
Hello John,
At the moment, we do not expose NuGet packages for the Infragistics for Windows Forms toolset that can target .NET Framework. If you are going to use the NuGet packages, the application you are trying to add to needs to target either .NET Core 3.0 / 3.1 or .NET 5. This information is essentially in the forum thread that you linked, but without a reason given.
The reasoning behind why we don’t provide NuGet packages for .NET Framework but do for .NET Core 3.0 / 3.1 and .NET 5 is because of the way the designers work in .NET Framework. As I understand it, .NET Framework required a .Design assembly to be in the directory that would essentially describe the designer-experience, but was not an assembly that you would actually reference - it would be picked up by Visual Studio. This assembly is the Infragistics4.Win.v19.2.Design.dll that will exist at your installation path for the Infragistics controls. This behavior is not something we could provide via NuGet though, and as such, we do not provide or even internally create NuGet packages for .NET Framework – they simply do not exist.
In .NET 3.0 / 3.1 and .NET 5, the designer experience changed significantly, and while we are still working on full support for the designers with our latest versions, it is allowing us to provide it via NuGet, and so we provide the packages.
It is also worth noting that if you are targeting version 19.2 at the moment, we only supported version .NET Core 3.0 in that version. We began supporting .NET Core 3.1 in 20.1 and .NET 5 as of 20.2. The designer support came in the latest version 21.1.
Please let me know if you have any other questions or concerns on this matter.
Thanks for getting back to me, I appreciate the explanation.
I'm not married to 19.2, I tried using Nuget to retrieve older versions in case that got me out of my predicament, ended up pasting the older version error but my experience was the same across the board, obviously.
It seems like I'm stuck in an institutional/tech bind. My org can't tell me when our client machines will be updated a supported runtime for the nuget packages (currently they're only deploying up to .NET Framework 4.8). Our dev ops team has made it so the build servers have no access to any file system where I could put a copy of the Infragistics binaries, effectively requiring us to use Nuget for our dependencies. Seems like I'm going to need to take this answer to them and explain they have to make an exception for my app.