0
votes

I'm just starting to work with Universal Apps in VS2015 (C#). Nuget is on version 3.3. I was able to install the package Newtonsoft.json through nuget with no issues. However, when I try to install DotNetOpenAuth I get a message "Package restore failed. Rolling back package changes for 'TestLibrary'. I have nuget auto package restore turned on. If I run install-package DotNetOpenAuth from the package manager console I get:

install-package : DotNetOpenAuth.OpenId.RelyingParty.UI 4.3.4.13329 is not compatible with UAP,Version=v10.0.

At line:1 char:1

install-package DotNetOpenAuth

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo : NotSpecified: (:) [Install-Package], Exception

FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

install-package : DotNetOpenAuth.OpenId.Provider.UI 4.3.4.13329 is not compatible with UAP,Version=v10.0.

At line:1 char:1

for each of the components it tries to install.

Is DotNetOpenAuth not compatible with Universal Apps or is there a workaround?

1

1 Answers

0
votes

DOTNETOPENAUTH is meant as an ASP.NET helper, and it requires the entire .NET framework. You wouldn't be able to access it from a universal app since you don't have the entire .NET framework, just .NET Core plus some other functionality (subsets of WPF, etc.). It is more meant as an extension for ASP apps, although it is supported in full .NET Framework apps.

Your error message indicates that it's not currently published to NuGet as a package for the Universal Windows App platform.

If you want to do OAuth in a universal app (without working to make DOTNETOPENAUTH compatible yourself), you'd have to find a library that would support that functionality. This seems to be a potential resource: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/WebAuthenticationBroker