无法在代码中使用我安装的 NuGet 包。

huangapple go评论60阅读模式
英文:

Can't use my installed NuGet package in code

问题

我已在我的VS项目中安装了NuGet包Miracle.FileZilla.Api,但当我尝试通过指令“using”将其包含在我的代码中时,VS提示没有命名空间“Miracle”。如何修复?谢谢。

英文:

I have installed NuGet package Miracle.FileZilla.Api in my VS project, but when I try to include it in my code via directive "using" VS says there's no namespace "Miracle". How do I fix it? Thanks.

答案1

得分: -1

I have installed NuGet package Miracle.FileZilla.Api in my VS project, but when I try to include it in my code via directive "using" VS says there's no namespace "Miracle". How do I fix it?

主要问题是,VS Code工具水平,如nuget包管理器,不足以在更高级的VS IDE中使用。感谢Matti提供的提示和信息,使这个问题变得更简单。

VS Code是一个轻量级的代码编辑器,可以安装许多用于开发环境工具的扩展,如编译、安装nuget包、发布等。它具有广泛的项目兼容性,包括Java。但是工具在一些其他领域的使用能力不足。它更适合于代码编辑。

VS IDE是一个强大的集成开发环境,包括开发过程中的许多工具,如编译、调试、发布等。它更适合于开发整个项目生命周期。

简而言之,由于VS IDE中工具的强大功能和VS Code中项目的广泛兼容性,VS IDE中的nuget包可以在VS Code中使用,反之亦然,就会出现错误。或者请在相同版本的VS中安装nuget包并开发项目。

解决方案:

  1. 请安装nuget包,然后在相同版本的VS中使用它。我建议您使用功能强大的VS IDE。

  2. 或者您应该在VS中创建一个项目,然后安装nuget包,然后将其迁移到VS Code,您可以通过指令"using"将其包含在我的代码中,而不会出现任何错误。

希望对您有所帮助。

英文:

> I have installed NuGet package Miracle.FileZilla.Api in my VS project,
> but when I try to include it in my code via directive "using" VS says
> there's no namespace "Miracle". How do I fix it?

The main issue is that the VS Code tool level like nuget package manager is too low to be used in a more advanced VS IDE. And thanks to Matti for the tips and information that make this question much simpler.

VS Code is a lightweight code editor and can install many extensions for development environment tools, such as compiling, installing nuget packages, publishing, etc.It has wide compatibility with projects, including Java. But tools are not powerful enough to use in some other areas.And it is more suitable for code editing.

VS IDE is a powerful integrated development environment and includes many of the tools of the development process, such as compiling, debugging, publishing, and so on. It is better suited to developing an entire project lifecycle.

In brief, due to the powerful function of tool in VS IDE and wide compatibility of projects in VS Code, nuget package in VS IDE can be used in VS Code and in turn, the errors occurs. Or please install nuget packages and develop projects in the same version of VS.

Solution

1) Please install nuget packages and then use it in the same VS version. And l recommend you use VS IDE which is powerful enough.

2) Or you should create a project and then install the nuget package in VS and then migrate it to VS Code, you can include it in my code via directive "using" without any errors.

Hope it could help you.

huangapple
  • 本文由 发表于 2020年1月7日 02:27:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/59617108.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定