NuGet强制安装忽略版本

时间:2014-07-04 00:28:24

标签: c# .net visual-studio-2013 nuget nuget-package

NPM的家伙,对NuGet事情并不熟悉。

我试着

  Install-Package UnmanagedExports

但是,

Installing 'UnmanagedExports 1.2.6'.
Successfully installed 'UnmanagedExports 1.2.6'.
Adding 'UnmanagedExports 1.2.6' to my-project.
Uninstalling 'UnmanagedExports 1.2.6'.
Successfully uninstalled 'UnmanagedExports 1.2.6'.
Install failed. Rolling back...
Install-Package : Could not install

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


   At line:1 char:2
    +  Install-Package UnmanagedExports 
    +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
       + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

可能这个图书馆根本没有注意到最新的.net版本,我希望如此,因此我会强行安装。

你能告诉我怎么样?

我解压缩了nupkg,并调查了内容,但没有任何线索。感谢。

sdfsd

1 个答案:

答案 0 :(得分:0)

好的,版本一塌糊涂。我现在正在使用VS.net 2012。 VS.net 2010 express一般不支持nuget。