Aar*_*ron 7 c# asp.net-mvc visual-studio razor
我正在使用 asp.net core、razor 引擎和实体框架。当我尝试使用 dotnet watch run 在 VS code 中运行我的代码时,出现此错误。这是完整的错误。
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...
Run Code Online (Sandbox Code Playgroud)
以前有人见过这个错误吗?解决方法是什么?
我收到了同样的错误,但我还有其他问题。我遇到的问题是,我尝试使用 Microsoft 凭据(例如使用Server=(LocalDB)
. 将其更新为连接数据库的 MacOS 方式后,它起作用了。
我从
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=ShirtDB;Trusted_Connection=True;MultipleActiveResultSets=true"
Run Code Online (Sandbox Code Playgroud)
到
"DefaultConnection": "Server=localhost,*port number*;Database=MyDB;User ID=sa;Password=******"
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8236 次 |
最近记录: |