PalmEmanuel
PalmEmanuel

Reputation: 71

Microsoft information protection SDK 1.7.133 - LoadLibrary failed

I saw that the MIP SDK 1.7.133 now has support for .NET Core, and I'm trying to implement Microsoft Information Protection SDK in an Azure Function using .NET Core to label documents in SharePoint (by downloading, labeling and uploading the document again), but when calling MIP.Initialize(MipComponent.File) I'm getting the error below.

Executed 'SensitivityLabeling' (Failed, Id=591fade7-7c51-40b6-b723-56b68af3a66d, Duration=572ms)
System.Private.CoreLib: Exception while executing function: SensitivityLabeling. Microsoft.InformationProtection: LoadLibrary failed for: [F:\<verified-path-to-function>\SensitivityLabelingFunction\bin\Debug\netcoreapp3.1\x64\mip_dotnet.dll].

I followed the quick-start guide before the update which worked well, but when I now update the SDK in the same project and run it with version 1.7.133 it crashes on the same command as my new Azure Function project.

I tried both the plain overload above and with the path using the below example from another question, verifying that the path is correct while debugging, but with the same error.

var path = Path.Combine(
           Directory.GetParent(Path.GetDirectoryName(newUri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath)).FullName,
           Environment.Is64BitProcess ? "bin\\x64" : "bin\\x86");

//Initialize Wrapper for File API operations
MIP.Initialize(MipComponent.File, path);

Another semi-related question, is there any other way to label a specific document in SharePoint using code except for the MIP SDK? No other API seems to support applying labels, only changing the actual label settings.

Upvotes: 0

Views: 393

Answers (1)

PalmEmanuel
PalmEmanuel

Reputation: 71

Running it in release mode with version 1.7.133 instead according to Microsoft information protection SDK 1.7.133 - Load library failed issue error seems to work.

Upvotes: 0

Related Questions