Intel Confidential Computing
Discussion board focused on Intel Confidential Computing technologies and how they can protect data and AI security, privacy, and sovereignty.

Linking C# code with Enclave code

Vaurine
初学者
2,796 次查看

I need to call some sgx methods in my C# code. I have found simple example with C# SGX integration on this page: https://software.intel.com/content/www/us/en/develop/articles/csharp-application-with-intel-software-guard-extensions.html. I try to rewrite it on my personal project, and everything builds fine. Unfortunately, when I am calling linker class SigningEnclaveLinkManaged enclave = new SigningEnclaveLinkManaged(), program returns following exception:

System.IO.FileNotFoundException
HResult=0x8007007E
Message=Cannot load a file or set 'SigningEnclaveLink.dll' or one of its dependencies. A specific module cannot be found.
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>

What can be the issue of that?  Do I need to check something in project options? There are only problems with Linker Class, SGX Support Detection Class works fine.

 

 

0 项奖励
1 解答
Vaurine
初学者
2,748 次查看

Reference was added before by me so that it was not the case. I fixed this bug to compare project settings of my Project and sample project. I had to change "Output Path" in C# Project Properties to "..\x64\Debug\". Now it works.

在原帖中查看解决方案

3 回复数
JesusG_Intel
主持人
2,757 次查看

Hello Vaurine,


Is your SigningEnclaveLinkManaged the equivalent of SMSSenderEnclaveLink from the example?


If so, you need to add the SigningEnclaveLinkManaged project as a reference in your main app project. Your main application does not know where to find the SigningEnclaveLinkManaged dll unless you tell it where it is.


Right click on your main application -> Add -> Reference.. -> select SigningEnclaveLinkManaged.


0 项奖励
Vaurine
初学者
2,749 次查看

Reference was added before by me so that it was not the case. I fixed this bug to compare project settings of my Project and sample project. I had to change "Output Path" in C# Project Properties to "..\x64\Debug\". Now it works.

JesusG_Intel
主持人
2,731 次查看

This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.


0 项奖励
回复