System.Resources.MissingManifestResourceException on rolling sdk project from .netcore3.1 to framework 4.7.2

0

I edited my SDK style project to change from TargetFramework netcoreapp3.1 to net472 The project builds without errors However I have following runtime error

System.Resources.MissingManifestResourceException
  HResult=0x80131532
  Message=Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Snap.UI.UnitabCostingMethodControl.resources" was correctly embedded or linked into assembly "Snap.UI" at compile time, or that all the satellite assemblies required are loadable and fully signed.
  Source=mscorlib
  StackTrace:
   at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
   at Snap.UI.UnitabCostingMethodControl.InitializeComponent() in D:\devnet10\SBD.Common\SnapInUI\Controls\UnitabCostingMethodControl.Designer.cs:line 516
   at Snap.UI.UnitabCostingMethodControl..ctor() in D:\devnet10\SBD.Common\SnapInUI\Controls\UnitabCostingMethodControl.cs:line 16
   at Snap.UI.frmVivUniversal.InitializeComponent() in D:\devnet10\SBD.Common\SnapInUI\frmUniversal.designer.cs:line 419
   at Snap.UI.frmVivUniversal..ctor() in D:\devnet10\SBD.Common\SnapInUI\frmUniversal.cs:line 20
   at Snap.Main.Form1.loadUniversalJob(String connectionstring) in D:\devnet10\SBD.Common\Main\Form1.cs:line 40
   at Snap.Main.Form1.button3_Click(Object sender, EventArgs e) in D:\devnet10\SBD.Common\Main\Form1.cs:line 93
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Snap.Main.Program.Main() in D:\devnet10\SBD.Common\Main\Program.cs:line 18

I have looked at this question which is similar but for web.
My folders have Namespace Provider false.

I also found this question but have not seen anything that would explain why the problem only occurs when I switch to net472

[Update]

I created a blank form and experimented with dragging and dropping controls on to it. I repeated the problem with a particular control that had a System.Windows.Forms.BindingNavigator control

Indeed even clicking on this control in the toolbox generates a similar error

Could not find any resources

Interestingly I was able to create a new user control from scratch which would support the bindingNavigator control

I noticed that the new control included the folder name in it's namespace, even though the folder's Namespace Provider property was set to false.

OK , now I have a good control and a bad control. I cant see any difference visually. Time to run a diff.

c#
.net
visual-studio
bindingnavigator
asked on Stack Overflow Jan 11, 2021 by Kirsten Greed • edited Jan 11, 2021 by Kirsten Greed

1 Answer

0

The namespace of the control was the issue.

I was able to get it working by having the control use the namespace given by it's folder location

answered on Stack Overflow Jan 11, 2021 by Kirsten Greed

User contributions licensed under CC BY-SA 3.0