更新时间:2023-02-25 21:46:45
您需要在 Tools 上添加引用.但仅限于构建时间
You need to add references on Tools. But only for build time
在 project.json
中,将以下内容添加到 dependencies
部分:
in project.json
, add the following to the dependencies
section:
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
"version": "1.0.0-preview2-final",
"type": "build"
}
仍然在 project.json
中,找到 tools
部分并添加以下内容
Still in project.json
, locate the tools
section and add the following
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.0.0-preview2-final",
"imports": [
"portable-net45+win8"
]
}