问题
I have a problem. I recently installed VS 2015 and Windows 10 on my computer. Having Universal Apps are amazing and I plan to convert some of my programs on UWP. But I have a problem. In one of my programs, I allow the user to save its datas on its OneDrive. And if OneDrive is unavailable, the datas are stored on local devices. And when OneDrive is available, the newly stored datas are pushed to OneDrive. Synchronisation in fact. So it is the problem. In the UWP dll named Universal.Live I have installed Live SDK 6 with Nuget. During the package installation, there is some work done to see if the Live SDK is compatible with UWP. Great ! It's compatible and successfully installed. But when I wrote
using Microsoft.Live;
The name is not recognized. And if I use the class LiveAuthClient which is in the namespace, it isn't recognized too... This is a real problem :( Any ideas ?
回答1:
I had the same issue adding the Live SDK to my app. For some reason the Package.JSON isn't correctly resolving and downloading the package (or recognizing it).
Either way, just add the DLL to your references the old fashioned way. Personally, I'd just add it to a console app (not using the new Project.json package), get it from NUGET, and grab the DLL from the Packages.
After you have the DLL:
- Right click on References
- Add Reference -> Browse...
- Find the DLL and add it. ("...\\packages[LiveSdk]...")
- It works!
Download it from here, Compile it, and grab the desktop SDK:
https://github.com/liveservices/LiveSDK-for-Windows
You can also download the msi, install it, figure out where the DLL is installed to and grab it from there:
https://www.microsoft.com/en-us/download/details.aspx?id=42552
回答2:
According to this GitHub issue, LiveSDK isn't supposed to be used for Universal Windows Platform apps: https://github.com/liveservices/LiveSDK-for-Windows/issues/58
Instead we should use these SDKs that cover the same functionality:
- Mail/Calendar/Contacts: https://dev.outlook.com/
- Files/OneDrive: https://dev.onedrive.com/
来源:https://stackoverflow.com/questions/31855258/universal-windows-plateform-and-live-sdk