简体   繁体   English

无法使用正确的.NET版本安装NuGet包

[英]Could not install NuGet package with the correct .NET version

I created a few packages on my internal NuGet server (hosted by TeamCity). 我在我的内部NuGet服务器上创建了一些包(由TeamCity托管)。 All packages work as expected except one. 所有包都按预期工作,除了一个。 I getting error: 我收到错误:

Could not install package 'MYPACKAGE'. 无法安装包'MYPACKAGE'。 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. 您正在尝试将此软件包安装到以“.NETFramework,Version = v4.5”为目标的项目中,但该软件包不包含与该框架兼容的任何程序集引用或内容文件。 For more information, contact the package author. 有关更多信息,请与软件包作者联系。

包装信息 项目信息

Everything looks good, but it's impossible to install this package. 一切看起来都不错,但是不可能安装这个包。 Thank you for any advice. 谢谢你的任何建议。

Problem solved, assembly which was distributed by NuGet was strongly signed by a .snk key. 问题解决后,由NuGet分发的程序集由.snk密钥强烈签名。 That causes problems.. After removing the key, everything works as it should. 这会导致问题..删除密钥后,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM