Search Unity

Question Extern Dll doesn't work in Visual Studio Project

Discussion in 'Editor & General Support' started by revgamstudios, Aug 6, 2021.

  1. revgamstudios

    revgamstudios

    Joined:
    Sep 1, 2018
    Posts:
    4
    Hello everyone,

    i try to use a self programmed dll which uses the System.ServiceModel namespace.

    My steps so far:
    • Added the dll to the unity plugins folder
    • Added the refference with this post upload_2021-8-6_16-15-52.png
    In Visual Studio all works fine, no IntelliSense Errors appears. But if i push the play button i get the following error:
    MethodAccessException: Method `System.ServiceModel.BasicHttpMessageSecurity..ctor()' is inaccessible from method `D3Client.D3Connector..ctor(string,int,string,string,string,string,int,bool)'
    D3Client.D3Connector..ctor (System.String ip, System.Int32 port, System.String server, System.String user, System.String password, System.String language, System.Int32 arch, System.Boolean https) (at <55103ac3c64043c9bcdebd6f52b8d1e5>:0)

    It seems like the Unity editor doesn't realise the manual added reference.

    Have you any idea, how to solve this problem?

    Thanks for help.

    Best Regards
    Sebastian