.NET Core遇到的问题解决方式
.1
使用工具-NuGet包管理器-程序包管理器控制台(PMC)执行命令时候,提示“Script Halted”。因为是PowerShell脚本版本不够导致。需要升级PowerShell版本。
在保证本机.NetFramework版本在3.0以上,然后下载
http://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/Windows6.1-KB2506143-x64.msu 进行安装,重启电脑后执行成功!
.2
连接sqlserver,在appsettings.json中添加
"MvcMovieContext": "Data Source=.;Initial Catalog=Test;Persist Security Info=False;User ID=sa;pwd=123456;Pooling=False;MultipleActiveResultSets=False;Encrypt=False;TrustServerCertificate=True"
报错:
An unhandled exception occurred while processing the request.
Win32Exception: 管道的另一端上无任何进程。
Unknown location
SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - 管道的另一端上无任何进程。)
解决办法:
官方下载SqlServer 2008 Sp3 补丁
https://download.microsoft.com/download/9/6/4/964BB4EC-FC28-4DA7-9295-7D4A8FDBE1A4/CHS/SQLServer2008R2SP3-KB2979597-x64-CHS.exe
官方下载SqlServer 2012 Sp3 补丁
http://www.catalog.update.microsoft.com/search.aspx?q=sql%20server%202012%20sp3
sqlserver数据库版本不同,需要下载的SP3版本不同
https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=49996