【发布时间】:2017-06-13 15:19:23
【问题描述】:
我正在使用 asp.net 核心、剃须刀引擎和实体框架。当我尝试使用 dotnet watch run 在 VS 代码中运行我的代码时出现此错误。这是完整的错误。
Project c-login (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
A JSON parsing exception occurred in [/Users/aaronmk2/Desktop/CodingDojo/c#/asp.net/entity/c-
login/bin/Debug/netcoreapp1.0/c-login.deps.json]: * Line 1, Column 2 Syntax error: Malformed
token
Error initializing the dependency resolver: An error occurred while parsing /Users/aaronmk2/D
esktop/CodingDojo/c#/asp.net/entity/c-login/bin/Debug/netcoreapp1.0/c-login.deps.json
[DotNetWatcher] fail: dotnet exit code: 139
[DotNetWatcher] info: Waiting for a file to change before restarting dotnet...
以前有人见过这个错误吗?解决方法是什么?
【问题讨论】:
-
如果你只运行“dotnet run”,它是否运行没有错误?
-
@RickHodder,不,当我尝试 dotnet run 时遇到同样的错误
-
我会检查它正在讨论的 json 文件是否有错误:您可以将其粘贴到 jsonlint.com 中。
-
你能分享一下哪里出了问题,以便其他人遇到它,他们会在这里找到答案吗?我对 json 的看法是对的吗?
-
我只需要删除我的 bin 文件并运行 dotnet restore 和 dotnet watch run 即可。
标签: c# asp.net-mvc visual-studio razor