【问题标题】:There was an error running the selected code generator in VS 2017 scaffolding在 VS 2017 脚手架中运行选定的代码生成器时出错
【发布时间】:2017-10-15 21:30:20
【问题描述】:

试图在一个新的 ASP.NET Core 项目中做一个控制器脚手架,我得到一个错误。

这是重现问题的确切步骤:

  1. 已创建新项目 > ASP.net Core Web 应用程序 > Web API

  2. 右键单击 Controllers 文件夹。

  3. 已选择添加 > 控制器 > API 控制器为空。

  4. 错误:

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.)

我有最新版本的 Visual Studio 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" />

===

我在事件查看器中发现,每次我尝试做一个脚手架时,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

【问题讨论】:

    标签: c# asp.net visual-studio asp.net-core visual-studio-2017


    【解决方案1】:

    在这个问题上浪费了好几天,我发现是“K9 互联网保护应用程序”导致了这个问题!一旦我卸载它,错误就消失了。

    【讨论】:

    • 你是怎么发现的?
    • 没关系,我重新安装donet core runtime 解决了它。我有同样的代码问题,但来自另一个原因。我按照this issue 中的建议做了。
    猜你喜欢
    • 2013-11-24
    • 1970-01-01
    • 2015-05-05
    • 1970-01-01
    • 2022-07-25
    • 2020-08-10
    • 2019-10-15
    • 1970-01-01
    • 2019-01-25
    相关资源
    最近更新 更多