locked
CS0234: Le type ou le nom d'espace de noms 'name' n'existe pas dans l'espace de noms 'using' (une référence d'assembly est-elle manquante ?) RRS feed

  • Question

  • User-458598543 posted

    Hello,

    for my project, i've got a problem of loading and calling ".dll" files. this problem appeared since a migration (copy) of the files of the sites to an other server. after copied these files, i launched the site and i' ve got the error message cs0234.

    CS0234: Le type ou le nom d'espace de noms 'name' n'existe pas dans l'espace de noms 'using' (une référence d'assembly est-elle manquante ?)

    the dll are the followings :

    using MySql.Web.Security;
    using MySql.Data;
    using MySql.Data.MySqlClient;

    using Newtonsoft.Json;

    using MaxMind.GeoIP2;
    using MaxMind.Db;

    meanwhile, i copied in the racine folder site the "bin" folder where there are the ".dll" files calling in the site.

    have you got the solution.

    thanks you for your contribution.

    M.A.

    Tuesday, March 16, 2021 7:47 AM

Answers

  • User-458598543 posted

    finally,

    i found the solution, i declare the ".dll" files in the file "web.config" too, i put the following lines :

    <system.web>
    <customErrors mode="Off" />
    <compilation debug="true">
    <assemblies>
    <add assembly="System.Management" />
    <add assembly="Newtonsoft.Json" />
    <add assembly="MaxMind.GeoIP2" />
    <add assembly="MaxMind.Db" />
    <add assembly="MySql.Data" />
    </assemblies>
    </compilation> 

    </system.web>

    and the sites launched correctly.

    truly yours.

    M.A.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 16, 2021 11:33 AM