Not able to install Okta.sdk in MVC application

Hi,

I am working on MVC application where Azure Active Directory is used. Now, I want to replace it with Okta Active Directory and Okta Authentication. For the same, I want to access Okta APIs.
I was working with .net 4.5 framework and for installation, I have migrated my project to .net 4.6.1 still facing the issue.
I am trying to install Okta.sdk through nuget but get an error as:
Install-package : Unable to find package ‘Okta.Sdk’.
At line:1 char:1

  • Install-package Okta.Sdk
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
    
    

Could you please help me how to proceed?

Okta.Sdk requires .NET 4.6 or higher, so you’re good there. The package is currently in prerelease (beta), so you need to use the -IncludePrerelease flag, like:

Install-Package Okta.Sdk -IncludePrerelease
2 Likes

Many thanks for the reply. But now it is rolling back with other error as:-

Install-Package : Could not install package 'Okta.Sdk 1.0.0-alpha8'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Okta.Sdk -IncludePrerelease
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Also, when i try to install from online nuget package it has following error:

image

Please let me know what should I do to resolve this?

Hey,

I have migrated my project from VS2013 to VS2017, and it worked.

1 Like