-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom Dll Import search path for entry point functions #1029
Comments
Would specifying |
So to make this work the code needs to find FabricClient.dll in the right directory. [DefaultDllImportSearchPaths("C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code")] might work? |
You can't specify a path like that. The attribute only takes a flags enum. You can see the options here. I'm not aware of any setting that will simply search all the directories in PATH for dependencies, even in native applications. I think native apps have the same set of options that is exposed to .NET applications through that enum. Frankly though, I think the simplest path for you may be to find the file yourself and load it using |
Using "LoadLibrary" suggested solved the issue. |
The generated code marks the dll import search path to be system32 path.
But the dll lives in
C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code
So, when using these functions, this error is encountered.
The specified module could not be found.
The solution is to support custom values for "DefaultDllImportSearchPaths" in the generated code.
More details can be found here:
youyuanwu/service-fabric-cs#2
The text was updated successfully, but these errors were encountered: