gpt4 book ai didi

asp.net-mvc - 尝试在包管理器控制台中执行添加迁移命令时收到错误

转载 作者:行者123 更新时间:2023-12-01 10:32:40 24 4
gpt4 key购买 nike

我需要另一双眼睛来审视这个。以下代码正在 visual studio 中运行,当它空闲时,绿色边栏表示语法正确。

但是,当我在包管理器控制台中运行添加迁移时,它会响应以下错误。

“传入的对象无效,应为‘:’或‘}’。(817)

它似乎与我的依赖项实现有关,但我找不到任何缺少括号或逗号的实例。

如果您能找到它,我很乐意提供您的答案并投赞成票。谢谢!

{
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
"Microsoft.AspNetCore.Identity": "1.0.0" //New package required for added functionality
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"publishOptions": {
"include": [
"wwwroot",
"web.config"
]
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final"
}
}

最佳答案

我在你的 json 上检测到的唯一问题是你在这里的评论

//New package required for added functionality

注释在 json 结构上无效,因此错误可能与此有关。

关于asp.net-mvc - 尝试在包管理器控制台中执行添加迁移命令时收到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40750418/

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