Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andreas_F_
Beginner
93 Views

UWP - Can't reference SDK dlls

Hi there,

I just downloaded and installed the complete SDK and tried the UWP Samples.
But to no avail, since the solution first didn't find the dlls.
Then I tried to reference them by myself via "Add reference" and "Browse". I tried this path: RSSDK\framework\UWP\ExtensionSDKs\Intel.RealSense\10.0.26.396\redist\CommonConfiguration\x86 (yes, build target was set to x86 to).

None of the provided dlls in the x86 or x64 folder were added, because VS2015 yelled: "Could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

What could be wrong or what could I've done wrong?

My Setup:
Windows 10 10586.545
VisualStudio 2015 update 2

Best regards,
Andy

0 Kudos
7 Replies
Andreas_F_
Beginner
93 Views

Can't edit my own post. Wanted to add for completeness, that I own the SR300.

Andreas_F_
Beginner
93 Views

No one?

jb455
Valued Contributor II
93 Views

Try just adding Intel.Realsense.dll as a reference? Maybe the other dlls don't need to be referenced, but are used by the RealSense dll - so you'll probably need to copy them to your debug folder.

Andreas_F_
Beginner
93 Views

Hi James,

yes I did that. As a matter of fact it was the very first thing I did. After that failed I tried all other dlls as well.
And each and every dll caused the aforementioned error.

Either no one tested the UWP samples and I'm the only one ;) or something is wrong on my end.

Additionally and out of curiosity I made a complete wipe of vs2015 with the total uninstaller and reinstalled it.
Same error :(

jb455
Valued Contributor II
93 Views

Finally got around to installing the Windows SDK and testing this. An old copy of the StreamViewer sample I had from the 2016R1 SDK wouldn't allow me to reference the RealSense dll, but I took a new copy from Program Files and it works fine! So, uh, not sure why it's broken, but try making a new copy of the sample and see if that fixes it!

jb455
Valued Contributor II
93 Views

Just tried to make a new UWP project and reference RealSense and got the same error you're getting.

However, I found this old article which shows how to set up a UWP project with RealSense and it says you have to reference the .winmd file in C:\Program Files (x86)\Intel\RSSDK\framework\UWP\ExtensionSDKs\Intel.RealSense\10.0.26.396\references\commonconfiguration\neutral instead of the .dll.

This built OK but when I stuck in 

var senseManager = SenseManager.CreateInstance();

I got an exception at runtime, "Requested Windows Runtime type 'Intel.RealSense.SenseManager' is not registered.".

After some googling, I determined that you need to take a copy of the .winmd and the .dll files, put them in the same folder, and reference the .winmd again. (Note, this step is mentioned exactly nowhere in any Intel docs I can find)

However, when debugging now, SenseManager.CreateInstance() only returns null and when I try to do anything else with the SDK I get a message saying my debugger can't handle that arise due to the fact that my sense manager is null. I can't see what I'm doing differently to the sample app now. On the off chance, does anyone know if there's some sort of secret process you have to go through before starting a SenseManager instance on UWP?

Andreas_F_
Beginner
93 Views

Hello James,

wow... good find. Thanks a lot. Wasn't even thinking of adding the winmd files.
At least it builds correct now.

But I got the TypeLoadException too on "SenseManager.CreateInstance();"
Tried the x64 build... same error in the end.

Currently repairing/modifying the sdk installation and reinstalling cameradriver. But I don't think this will magically fix the problem.
Tough I hope it is somehow related, because my SR300 tends to loose connection from time to time and I have to replug to another USB Port.

I should drop Mike Taulty a line at his blog, because he managed to add and build the sample from the v8 SDK on UWP (https://mtaulty.com/2016/05/06/windows-10-uwp-realsense-sr300-faces-and-the-surface-pro-3/)

Keep you posted and best regards,
Andy

Reply