Thursday, May 11, 2017

MissingManifestResourceException could not find...

Yesterday a colleague of mine asked me if I could help with an exception he was getting when trying to run a new form he created. The error was: "System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture..."


This problem can have many causes, sometimes the resx isn't set as embedded resource.

But in our case the problem was that there was an interface declared as the first piece of code in his form. Apparently the first piece of code in a form file should be the form class and not some other class or code otherwise you get this error. 

So for example the following code in a file FormTemplat1e.vb will trigger the error

Public Interface IFormTemplate1
    Sub Load
    Property Language As LanguageFunctions.LanguageEnum
    Sub Reset
    Sub Refresh
End Interface

Public Class FormTemplate1
Implements IFormTemplate
End Class 

There is also a KB published by Microsoft about this issue, you can have a look at here

No comments:

Post a Comment