NuGet Package Installation Error

I am trying to install the PureCloudPlatform.Client.V2 NuGet package in Visual Studio 2015 and (my latest attempt) .Net framework 4.7.2. I get the same error I got when I first tried with .NET framework 4.5 and then 4.61 and now 4.7.2. I have tried to clear the NuGet Cache since I read once case where somebody did that and it resolved this issue, but I have not succeeded in clearing the cache using the various methods people have suggested. Before I spend more time on this I wondered if I could get an updated answer for the following question, "Should the NuGet package (PureCloudPlatform.Client.V2.71.0.0) install on Visual Studio 2015 .NET framework 4.7.2 OR do I need to upgrade to Visual Studio 2017?

Here is the exact error I get when trying to install the package:

Install-Package : Could not install package 'PureCloudPlatform.Client.V2 71.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compati
ble with that framework. For more information, contact the package author.
At line:1 char:17

  • install-package <<<< purecloudplatform.client.v2 -project TDS
    • CategoryInfo : NotSpecified: (:slight_smile: [Install-Package], Exception
    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

I'm not aware of any dependencies on the IDE, just on the .NET framework you're targeting. The short answer is the SDK is compatible with .NET 4.6.1 or later. See this post for additional discussion on the topic and a proposed workaround:

As a test I created a new VS 2015 solution targeting .NET Framework 4.7.2 As soon as I saved the solution I tried to install the package and got the same error. My assumption then is that although the SDK may work as of .NET Framework 4.6.1, the NuGet Package itself will NOT install using VS 2015 at this point (perhaps older versions of it did because I did read where somebody successfully installed when it was like version 56, but now it is version 71). So the way I see it I have two choices at this point: 1-I can update my solution to VS 2017 and then hope I can get the NuGet Package to install with that; 2-I can download the raw SDK files (dlls and xml) and manually add them to my VS 2015 solution and hope that my assumption that this is just a Package issue is correct. Frankly I do not want to try either approach for different reasons. If I upgrade to VS2017 there is a chance I break my complicated and critical solution in the process and there is still a chance the package won't install anyways. If I try the raw files I am now "going cowboy" and I'm afraid existing sample code, examples, tutorials, etc.... won't quite apply to me or wont apply without me doing some extra work that I am not aware of. Any advice? And wish me good luck :stuck_out_tongue:

The SDK's source code is published as open source intentionally to allow users to use it however they see fit. Using the compiled DLLs or source code directly from the repo instead of using nuget is an expected use case; the package that gets published to nuget is just the compiled DLLs that are in the repo.

Got it. I will go that route then. Thank you.

I just found this StackOverflow post that indicates you can't use .NET Core 2.0 in VS 2015. I couldn't find an official page from Microsoft saying that, but it seems consistent with your experience. It's interesting though because I believe the SDK does work in non-core 2.0 projects.

Ok, good to know. I'm going to manually add the DLLS to a test VS 2015 solution targeting .NET framework 4.7.2 and play with it there. If it works well I'll incorporate it into my existing solution. If not I'll update my solution to VS 2017 and try that. I'll let you know what my experience is. Thank you for your help.

1 Like

I am trying to add the PureCloudPlatform.Client.V2.XML file as a service reference to my VS 2015 solution. I've done this in the past by renaming the file to a WSDL file, but this XML file is not formatted as a WSDL file so it is rejected. I'm assuming I do need a service reference to PureCloud end point. How should I add it manually?

The SDK is a class library, not a web service, so it must be added as a library reference. The XML file is documentation for the class library; a WSDL describes a SOAP web service.

So all I need to do is add the dll to my references list and I don't actually need to do anything with the xml file?

Yes. The XML file is for IntelliSense.

https://docs.microsoft.com/en-us/visualstudio/ide/how-to-add-or-remove-references-by-using-the-reference-manager?view=vs-2015

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.