无法通过 NUGET 安装 NodeJS

Cannot install NodeJS via NUGET

尝试通过 Nuget 包管理器安装 Node.js 时,出现以下错误。没有进一步的信息可以利用。知道那里发生了什么吗?

我尝试更改项目的 .NET Framework 版本,但我仍然遇到同样的问题。

不同论坛上的一些其他人在通过包管理器安装 nodejs 时指出了类似的问题。只是想确定这是否是已知问题。

Could not install package nodejs-v.0.8.16 0.8.16. You are trying to install this package into a project that targets .NETFramework,Version=v4.5.2, 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.

正在阅读您的问题陈述;我相信您正在尝试从解决方案目录结构中的本地化目录 运行 Node.js,而不是单独安装 node.js。

Node.js基金会的官方包 - node.js(注意“.”) - The Official node.js package 是您可能想要的,您会注意到这在针对 4.5.2+ 项目执行时确实有效,例如您正在测试的项目:

Install-Package Node.js

注意:根据我的测试,您可以针对 4.5.2 项目为该特定包安装的绝对最旧版本是 0.10.26.1。


旁注:

您所引用的是 "nodejs"(注意缺少的“.”)中的 "nodejs"(我自己检查过的 here 中的旧软件包,无论项目属性中指定的框架版本如何,它都不会安装,0.8.16 也是旧版本。