A set of .NET Framework managed libraries for developing graphical user interfaces.
Hi @Dave Willadsen ,
Thanks for reaching out.
From my research, this kind of error is caused by the WinForms designer holding onto an old cached package path, even when that preview package was not intentionally added to the project.
The first thing I would do is close Visual Studio completely, then delete the WinForms designer cache under %LOCALAPPDATA%\Microsoft\VisualStudio\18.0_*\WinFormsDesigner. After that, delete the project's bin and obj folders, reopen the solution, and build again before opening the form.
It would also be worth checking the project file and packages.config if you have one, just to make sure Microsoft.Extensions.DependencyInjection.Abstractions is not explicitly referenced as a preview version. If you do find it there, remove it or change it to a stable release that matches the rest of the project, then restore and rebuild.
If Visual Studio still tries to pull that old package path back in, clear the NuGet caches as well with dotnet nuget locals all --clear, then restore again and test the designer one more time.
If there is no preview reference anywhere in the project after that, then this points more to a Visual Studio designer cache or tooling issue. In that case, I would update Visual Studio to the latest servicing build and, if needed, use the Visual Studio Installer to repair the .NET desktop development workload so the Windows Forms designer components are refreshed as well.
Hope this helps! If my explanation and the information I provided were helpful, I would greatly appreciate it if you could follow the instructions here so others with the same problem can benefit as well.