none
An exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll but was not handled in user code. Additional information: Could not find any resources appropriate for the specified culture or the neutral culture. Make s

    Question

  • Hei,

    I've tried to make an app, just for example for a presentation, and when I run the app I have this error:

    An exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll but was not handled in user code. Additional information: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MultiLanguageForm.App_GlobalResources.Lang.resources" was correctly embedded or linked into assembly "MultiLanguageForm" at compile time, or that all the satellite assemblies required are loadable and fully signed.

    I'm new in this domain, I make this app watching to an tutorial. I don't understand what I'm doing wrong. Can someone help me, please???

    Thursday, April 20, 2017 12:33 PM

All replies

  • Hi Alexandra,

    Can you please tell what type off app your trying to build WinForm, Web/ ASP.Net, WPF, UWP?


    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered"Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


    Thursday, April 20, 2017 12:51 PM
    Moderator
  • Make sure that you have all resources referenced correctly in your project. Please look into below articles for more information.

    A System.Resources.MissingManifestResourceException exception occurs when you try to access a localized resource

    An exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll but was not handled in user code


    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Thursday, April 20, 2017 12:56 PM
    Moderator
  • web/ASP.Ner app

    Thanks!

    Thursday, April 20, 2017 1:18 PM
  • Hi,

    This is Visual C# forum. Please ask your question into ASP.Net forum for getting quick response.

    https://forums.asp.net/

    Your understanding and cooperation will be grateful.

    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Thursday, April 20, 2017 1:26 PM
    Moderator
  • I've check again and I don't see any error. The name of ressources are spell correctly.

    this is the code

    namespace MultiLanguageForm
    {
        public partial class Message : System.Web.UI.Page
        {
            ResourceManager rm;
            CultureInfo ci;
            protected void Page_Load(object sender, EventArgs e)
            {
                if (Session["Lang"] == null)
                {
                    Session["Lang"] = Request.UserLanguages[0]; // default language           
                }
                if (!IsPostBack)
                {
                    LoadString();
                }
            }
            private void LoadString()
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo(Session["Lang"].ToString());
                rm = new ResourceManager("MultiLanguageForm.App_GlobalResources.Lang", Assembly.GetExecutingAssembly());
                ci = Thread.CurrentThread.CurrentCulture;

                
                lblName.Text = rm.GetString("Name",ci);
                lblSurname.Text = rm.GetString("Surname", ci);
                lblPhone.Text = rm.GetString("Phone", ci);
                lblEmail.Text = rm.GetString("Email", ci);
                lblCountry.Text = rm.GetString("Country", ci);
                lblCityAddress.Text = rm.GetString("CityAddress", ci);
                lblMessage.Text = rm.GetString("Message", ci);
                btnSave.Text = rm.GetString("Save", ci);
                btnCancel.Text = rm.GetString("Cancel", ci);

            }

            protected void ddLang_SelectedIndexChanged(object sender, EventArgs e)
            {
                // pentru schimbarea limbii
                Session["Lang"] = ddLang.SelectedValue;
                LoadString();

            }
        }
    }

    Thursday, April 20, 2017 1:30 PM
  • And the code for form is:

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Message.aspx.cs" Inherits="MultiLanguageForm.Message" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
        <div style="text-align:right;">
            <asp:DropDownList ID="ddLang" runat="server" AutoPostBack="true" >
                <asp:ListItem Value="en-US" Text="English" />
                <asp:ListItem Value="fr-FR" Text="français" />
                <asp:ListItem Value="hi-IN" Text="हिन्दी" />
                <asp:ListItem Value="tr-TU" Text="Türk" />
                <asp:ListItem Value="es-SP" Text="español" />
                <asp:ListItem Value="ru-RU" Text="русский" />
                <asp:ListItem Value="de_GE" Text="Deutsch" />
             
            </asp:DropDownList>
        </div>
        <table>
            <tr>
                <td><asp:Label ID="lblName" runat="server" /></td>
                <td><asp:TextBox ID="txtName" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:Label ID="lblSurname" runat="server" /></td>
                <td><asp:TextBox ID="txtSurname" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:Label ID="lblPhone" runat="server" /></td>
                <td><asp:TextBox ID="txtPhone" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:Label ID="lblEmail" runat="server" /></td>
                <td><asp:TextBox ID="txtEmail" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:Label ID="lblCountry" runat="server" /></td>
                <td><asp:TextBox ID="txtCountry" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:Label ID="lblCityAddress" runat="server" /></td>
                <td><asp:TextBox ID="txtCityAddress" runat="server" /></td>
            </tr>
            <tr>
                <td><asp:Label ID="lblMessage" runat="server" /></td>
                <td><asp:TextBox ID="txtMessage" runat="server" /></td>
            </tr>
            <tr>
                <td></td>
                <td><asp:Button ID="btnSave" runat="server" /> &nbsp; &nbsp;
                    <asp:Button ID="btnCancel" runat="server" />
                </td>
            </tr>
        </table>
    </asp:Content>

    Thursday, April 20, 2017 1:38 PM
  • You could try putting a debug pointer and see what is happening inside your code and see whay you are getting that error.

    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Thursday, April 20, 2017 1:40 PM
    Moderator
  • And the name of Resources are:

    Lang.en-US.resx

    Lang.fr-FR.resx

    Lang.es-SP.resx

    Lang.hi-IN.resx

    Lang.tr-TU.resx

    Lang.de-GE.resx

    Lang.ru-RU.resx

    Thursday, April 20, 2017 1:40 PM
  • And how I can do this?
    Thursday, April 20, 2017 2:10 PM