I have been developing an azure function that Would receive encrypted data and do some operations on this data and then return. I am however having an issue with the Microsoft SEAL Nuget package. When I run my function Locally there is no issue and I can use the package, however when I publish my function to azure I get a warning saying:
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\Kyle\.nuget\packages\microsoft.research.sealnet\3.4.5\lib\netstandard2.0\SEALNet.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
1>FunctionApp3 -> C:\Users\Kyle\source\repos\FunctionApp3\bin\Release\netcoreapp3.0\bin\FunctionApp3.dll
1>Done building project "FunctionApp3.csproj".
2>------ Publish started: Project: FunctionApp3, Configuration: Release Any CPU ------
2>There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\Kyle\.nuget\packages\microsoft.research.sealnet\3.4.5\lib\netstandard2.0\SEALNet.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
2>FunctionApp3 -> C:\Users\Kyle\source\repos\FunctionApp3\bin\Release\netcoreapp3.0\bin\FunctionApp3.dll
2>FunctionApp3 -> C:\Users\Kyle\source\repos\FunctionApp3\obj\Release\netcoreapp3.0\PubTmp\Out\
2> Could not evaluate 'sealnetnative.dll' for extension metadata. Exception message: Bad IL format.
2>Publishing C:\Users\Kyle\source\repos\FunctionApp3\obj\Release\netcoreapp3.0\PubTmp\FunctionApp3 - 2020020416504394.zip to https://functionapp320200204042055.scm.azurewebsites.net/api/zipdeploy...
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========
The Function still publishes to azure,however When I try and send a request, I receive an error 500, this is only when using the SEAL functionality. When I check the function insights on azure the failure is giving the error :
Could not load file or assembly 'SEALNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
From my research I think it may be a dependency issue however I am unable to solve this. Thanks in advance if I have not formatted this correctly Edits are welcome.