Nuget package installation failure

Make sure your nuspec file contains a 'lib/net45' target

<package>
  <metadata>
    ...
  </metadata>
  <files>
    <file src="bin\Release\*.*" target="lib/net45" />
  </files>
</package>

Slippery Pete fixed this problem for me.

The first time I tried to install my Assembly I got:

Could not install package 'Package Name'. 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.

After ensuring my Assembly within the Nuget package was in the 'lib\net45' folder, I still got the error!

However after going to Tools->Options->Nuget->General and clearing the cache, the problem was solved.

Tags:

.Net

Nuget