user9393635
user9393635

Reputation: 1429

"the package does not contain any assembly references or content files that are compatible with that framework"?

I've created a NuGet package which includes files from a solution where each class libary shows a "Target Framework" of 4.6.1 in Properties > Application > Target Framework.

I'm trying to add a reference to this NuGet package into a solution where each class libary shows a "Target Framework" of 4.6.1 in Properties > Application > Target Framework.

But when I try to add a reference to the NuGet package into my solution described above, I get the following error:

"Could not install package 'Janus.SecurityApi.Framework 1.0.0'. 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."

Any idea what the issue might be here? Based on the parameters that I described above, it seems like this should work as expected?

Upvotes: 1

Views: 3765

Answers (1)

user9393635
user9393635

Reputation: 1429

Looks like this addition to the .nuspec file fixed the issue:

<frameworkAssemblies>
  <frameworkAssembly assemblyName="Microsoft.CSharp" />
</frameworkAssemblies>

Upvotes: 2

Related Questions