Csharp the type (...), has been forwarted... RRS feed

  • Question

  • Salut salut! .. alors j'ai un petit problème que je n'arrive pas à résoudre si vous pouvez m'aidez ce serais sympa ..

    je suis en train de faire un jeu avec le moteur unit3d que tous le monde connaissent et je programme en csharp avec Visualstudio..donc je fais une connexion à MySQL avec studio visuel pour mon jeux..tous allais bien jusqu'a ce que quand je rentre dans l'unité je trouve une erreur

    ""the type 'system.data.Common.DbConnection' has been forwarded to an assembly that is not referenced.Consider adding a reference to assembly 'System.Data, version"""

    je ne comprends pas bien!

    Merci d'avance!!

    Friday, June 8, 2018 4:10 PM

All replies

  • This is the English forums. Please post your question in English or post in the forums appropriate for your locale.

    Based upon your partial message it looks like a type in an old assembly was moved to a new assembly. In the old assembly there is a type forwarding attribute so the CLR goes to the new assembly to load it. However your code isn't referencing the new assembly and therefore it fails. You need to add a reference to System.Data in the impacted code.

    Michael Taylor http://www.michaeltaylorp3.net

    • Proposed as answer by Dolen Zhang Monday, June 11, 2018 2:04 AM
    Friday, June 8, 2018 4:47 PM
  • Hi,

    >>"the type 'system.data.Common.DbConnection' has been forwarded to an assembly that is not referenced.Consider adding a reference to assembly 'System.Data, version"

    You should add the reference to this assembly using the Reference tab. Right click Reference, select Add Reference and then (in the new window that opens up for you) select the assembly that is required; in your case System.Data with version of (Make sure this is present on your system installed)

    Then you should (first) clean the project, then re-build the project with the new resources and assemblies in the project.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, July 4, 2018 6:01 AM