微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Nuget / 命令行版本尝试安装 dotnet-warp

如何解决Nuget / 命令行版本尝试安装 dotnet-warp

我完全不明白为什么我无法将 dotnet-warp 安装到我的项目中(使用 JetBrains Rider)。

我的目标框架是 dotnet core 2.1 - 在 .csproj 文件中确认

特别令人费解的是:

Package dotnet-warp 1.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). 
Package dotnet-warp 1.1.0 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) 

我错过了什么?

下面的 Nuget 日志:

@ Installing dotnet-warp in (removed) started
Running restore with 12 concurrent jobs.
Reading project file (removed).
Restoring packages for (removed)...
Restoring packages for .NETCoreApp,Version=v2.1...
Resolving conflicts for .NETCoreApp,Version=v2.1...
Checking compatibility of packages on .NETCoreApp,Version=v2.1.
Package dotnet-warp 1.1.0 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package dotnet-warp 1.1.0 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) / any
Invalid project-package combination for dotnet-warp 1.1.0. DotnetToolReference project style can only contain references of the DotnetTool type 
Package 'dotnet-warp 1.1.0' has a package type 'DotnetTool' that is not supported by project '(removed)'.
NuGet.Packaging.Core.PackagingException: Package 'dotnet-warp 1.1.0' has a package type 'DotnetTool' that is not supported by project '(removed)'.
   at JetBrains.ProjectModel.NuGet.Operations.NuGetPatchedInstallationCompatibility.EnsurePackageCompatibility(NuGetProject nuGetProject,PackageIdentity packageIdentity,NuspecReader nuspecReader)
   at JetBrains.ProjectModel.NuGet.Operations.NuGetPatchedInstallationCompatibility.EnsurePackageCompatibility(NuGetProject nuGetProject,INuGetPathContext pathContext,IEnumerable`1 nuGetProjectActions,RestoreResult restoreResult)
   at NuGet.PackageManagement.NuGetPackageManager.<PreviewBuildIntegratedProjectsActionsAsync>d__79.MoveNext()
--- End of stack trace from prevIoUs location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptiondispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<PreviewBuildIntegratedProjectActionsAsync>d__78.MoveNext()
--- End of stack trace from prevIoUs location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptiondispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<PreviewInstallPackageAsync>d__69.MoveNext()
--- End of stack trace from prevIoUs location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptiondispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<InstallPackageAsync>d__48.MoveNext()
--- End of stack trace from prevIoUs location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptiondispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.NuGetPackageManager.<InstallPackageAsync>d__47.MoveNext()
--- End of stack trace from prevIoUs location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptiondispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at JetBrains.ProjectModel.NuGet.Operations.NuGetInstallOperation.<>c__displayClass5_0.<<InstallAsync>b__0>d.MoveNext()
--- End of stack trace from prevIoUs location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptiondispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at JetBrains.ProjectModel.NuGet.Operations.NuGetInstallOperation.<InstallInternal>d__9.MoveNext()

@ Installing dotnet-warp in (removed) finished (0.033 sec)
[Notification][Install] Install Failed (project: (removed),package: dotnet-warp v1.1.0)
Package 'dotnet-warp 1.1.0' has a package type 'DotnetTool' that is not supported by project '(removed)'.

我也试过通过命令行安装:

>dotnet tool install --global dotnet-warp
error NU1202: Package dotnet-warp 1.1.0 is not compatible with net50 (.NETFramework,Version=v5.0) / any. Package dotnet-warp 1.1.0 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) / any
The tool package Could not be restored.
Tool 'dotnet-warp' Failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found,but it was not a .NET tool.
* The required NuGet Feed cannot be accessed,perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons,including package naming enforcement,visit https://aka.ms/failure-installing-tool

更莫名其妙的是它与 nuget 日志不匹配?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。