Resource Files not linked to assembly? RRS feed

  • Question

  • I'm having an issue linking a lot of .resx file into a compiled assembly to be used in an asp.net web app. The error message I get is:


    Could not find any resources appropriate for the specified culture or the neutral culture. 
     Make sure "Reports.My.Resources.ArgsRptAgeAtAdmission.resources" was correctly embedded or linked into assembly "Reports" at compile time, 
    or that all the satellite assemblies required are loadable and fully signed.

    My solution is set up as so:


    Two .dll projects, both building a 'Reports.dll' at the same location (to be able to compile different sets of reports into the website). 

    One web app project

    Each project is located in their own separate folders.


    When I build my reports dll project, it saves the assembly in the site /bin folder. I then run the site, builds without errors. I get the exception when I try to load the report that uses the embedded resources. I find it odd, as in code I can access Reports.My.Resources.ArgsRptAgeAtAdmission just fine with Intellisense. 


    In the report code files, the exception is being thrown from the code

    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Resources.ArgsRptAgeAtAdmission))
    'Exception is thrown here  _____ \/ _______
    Me.textBox3.Text = resources.GetString("textBox3.Text")

    The assembly is also being loaded in to the page through reflection, if that makes any difference.

    What am I doing wrong in this scenario? I can retrieve the string value by directly calling Reports.My.Resources.ArgsRptAgeAtAdmission.textBox3_Text without error


    • Moved by Helen Zhou Wednesday, June 16, 2010 1:43 AM (From:Windows Forms General)
    Friday, June 11, 2010 7:41 PM

All replies

  • Hi Zhais,

    I'm moving this thread from Base ”Windows Forms" to "Visual Basic IDE" forum, since this issue is related to Visual Basic IDE. There are more Visual Basic IDE experts in that forum.

    Best Regards,
    Helen Zhou

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, June 16, 2010 1:42 AM