I have a few nuget packages created and installed on my local Nuget Server. They work fine. I can install them no problem. But when I created another package and put it to the server the package install always fails with the error:
Could not install package ... 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.
The project is exactly the same: it uses the same framework version (4.5). I have created yet another package with the same settings and it works as expected. The project does not reference anything that require other frameworks. In fact all assemblies it uses are used in other packages too.
The nuspec is the same: the same target location as in other packages. I tried to include other framework versions and it did not help.
<file src="bin\Release\*.*" target="lib\net45\" />
I checked what's packed in the resulting nupkg. It has the dlls in lib/net45. I did not find any differences from other packages.
I am totally confused. Why are packages for very similar projects produce different results.
Is there any way to find out what causes the error: Install failed. Rolling back...
Victor