尝试在新的ASP.NET Core项目中执行控制器脚手架,我收到错误。
这是重现问题的确切步骤:
创建新项目> ASP.net核心Web应用程序> Web API
右键单击Controllers文件夹。
选择添加>控制器> API控制器为空。
ERROR:
There was an error running the selected code generator:
Unable to write data to the transport connection: An established connection was aborted by the software in your host machine.
Unhandled Exception: System.AggregateException: One or more errors occurred.
(Unable to write data to the transport connection:
An established connection was aborted by the software in your host machine.)
我有最新版的视觉工作室2017 RC。
在项目csproj文件中,我有最新的参考资料:
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0-msbuild3-final" />
</ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="1.1.1" />
===
我在事件查看器中发现,每次尝试进行scafolding时,dotnet.exe都会在后台崩溃。
Fault bucket 129390288245, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0
Problem signature:
P1: C:\Program Files\dotnet\dotnet.exe
P2: 1.1.0.1179
P3: 5820b092
P4: System.Net.Sockets
P5: 4.6.24705.1
P6: 581d6231
P7: 187
P8: 17
P9: System.AggregateException
P10:
Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7A90.tmp.mdmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7B8B.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7B8C.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER7BAD.tmp.txt
These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_C__Program Files_f41bf27ea39ac572c183c70b1a647b1d5fdfbab_66e69dae_3d448260
Analysis symbol:
Rechecking for solution: 0
Report Id: 19b7e4e4-fb57-487d-81b6-528f04a11eb7
Report Status: 268435456
Hashed bucket: 57d54f0839232cc5a9588d9f015bb19f
答案 0 :(得分:2)
在浪费了几天的时间后,我发现&#34; K9互联网保护应用&#34;造成了这个问题!一旦我卸载它,错误就消失了。