gpt4 book ai didi

c++ - 在 Visual Studio 中通过包管理器控制台安装 TestStack.White

转载 作者:行者123 更新时间:2023-11-30 05:33:10 50 4
gpt4 key购买 nike

我正在尝试通过 Visual Studio 中的包管理器控制台使用 NuGet 安装 TestStack.White,但是当我在包管理器控制台中输入“Install-Package TestStack.White”命令时,出现此错误:

Installing 'Castle.Core 3.3.3'.
Successfully installed 'Castle.Core 3.3.3'.
Installing 'TestStack.White 0.13.3'.
Successfully installed 'TestStack.White 0.13.3'.
The names of some imported commands from the module 'TestStack.White' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
Adding 'Castle.Core 3.3.3' to PSTableManager.
Uninstalling 'Castle.Core 3.3.3'.
Successfully uninstalled 'Castle.Core 3.3.3'.
Install failed. Rolling back...
Install-Package : Could not install package 'Castle.Core 3.3.3'. You are trying to install this package into a project that targets 'Native,Version=v0.0', 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:1

我做错了什么吗?我该如何解决这个问题?

最佳答案

您无法安装此包的原因是因为它与您的项目不兼容。 Package TestStack.White 是基于 .NET 的(托管),因此不能将其添加到 native C++ 项目中:

You are trying to install this package into a project that targets 'Native,Version=v0.0', but the package does 
not contain any assembly references or content files that are compatible with that framework.

C++ 有一个托管版本,称为 C++/CLI。您可以尝试将其与 TestStack.White 包一起使用。但是,这取决于您的项目的要求。如果必须创建 native 应用程序,则不能使用 C++/CLI。

关于c++ - 在 Visual Studio 中通过包管理器控制台安装 TestStack.White,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34868558/

50 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com