Using external .dll in dot net core

前端 未结 3 1822
北荒
北荒 2020-12-08 02:07

I\'ve my own .dll file that I used to use with Edge.js in nodejs, I\'m trying to use it now with dot net core app, but found no where/no how to get access to it, or define i

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 02:43

    You can add a dll with the following code:

    [DllImport("MyLbraryFile.dll", SetLastError = true, CharSet = CharSet.Auto)]
    

    All you have to do is put the dll in the same directory.

    https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute(v=vs.110).aspx

提交回复
热议问题