简体   繁体   中英

Azure and C++ DLL files

I have a web app on Azure. It uses .NET Core 3.1. I use two C++ DLL files as dependencies in the app. The first DLL depends or uses the second DLL. When I run the project in Visual Studio locally, there is no issue. When I deploy the app to Azure, it complains only from the second DLL, and it says "unable to load dll or one of its dependencies". As I said the first DLL use the second DLL in its codes by using " [DllImport(@"..\Folder\Second.dll")] ". What do I need to do or add in web app? Why it is working locally anf not on Azure? Any help would be appreciate.

  1. First make sure that your .dll does not need to be registered in the registry on your local computer. Then you can copy and paste your .dll file directly into the scm website for testing. If it can be successful, then it can be supported.

    In this way, we only need to add the following code to the .csproj file , and include your .dll file when publishing.

    The specified files are included in the release.

  2. If your.dll needs to be registered in the computer registry, then I can tell you clearly that azure web app is not supported because it is a sandbox environment.

    But you can publish your application through azure container webapp or virtual machine.

    Related Post

    DLLImport does not work on Azure App Service Net. 3.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM