我可以在 Node 项目中使用 Nuget 包吗?

Can I consume a Nuget package within a Node project?

我在 Visual Studio 2017 年工作。我从;基本 Node.js Express 4 应用程序。

我在 VSTS 中有一个私有 Nuget,它有一个 .Net 工具,我现在想在 Node.js 项目中使用(以执行一些特定领域的类似构建的任务)。

是否可以将 Nuget 引用添加到 Node.js 项目中(只是为了下载该工具)?

我看到 VSTS 提供了 npm,但这似乎与我现有的 Nuget 包不兼容。

Is it possible to add a Nuget reference into a Node.js project (just to download the tool)?

恐怕你现在不能那样做。

因为Nuget目前不支持node.js项目,即使你只是下载工具。当您在 node.js 项目上使用 nuget 时,我们总是会收到错误 'Project "Default" is not found.'。 npmnode.js 项目包管理的正确解决方案。

有关更多详细信息,请参阅 GitHub 上的类似问题:

Cannot install packages in Node.js project - Project "Default" is not found

Nuget package manager cannot 'see' Node.JS projects

希望对您有所帮助。