0
votes

I tried to install Medidata.RWS.NET via nuget but I get this error message:

Install-Package : Could not install package 'Medidata.RWS.NET 1.0.4'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', 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.

1

1 Answers

1
votes

The error message is correct in the sense that the package is not compatible with your project.

Medidata.RWS.NET v1.0.4 does not target .NET framework v4.5 as your project does. If you download the package and open it using 7Zip then you can look into its lib folder. The lib folder contains only 1 folder i.e. net452 which is equal to .NET Framework v4.5.2.

Since you project targets a lower version of the .NET Framework than the package, the package is not compatible with your project. This happens because the package maybe using newer APIs from .NET Framework v4.5.2 that is not available in your project and can cause runtime failures.

You can solve this by upgrading your project to .NET Framework v4.5.2 by doing the following -

  1. Open your project in Visual Studio
  2. Right Click on project -> Properties -> Application
  3. Change the target framework to .NET Framework 4.5.2
  4. Save and close the properties window and then rebuild your project.

After following the above steps, you should be able to add reference to the package.