.net Core编译出现错误:指定的任务可执行文件“sgen.exe”未能运行,文件名或扩展名太长
问题描述
.net Core项目编译的时候出现错误:
错误MSB6003 指定的任务可执行文件“sgen.exe”未能运行。System.ComponentModel.Win32Exception (0x80004005): 文件名或扩展名太长。在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)在 System.Diagnostics.Process.Start()在 Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)在 Microsoft.Build.Utilities.ToolTask.Execute() YESWEB.Module.DocNos C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 3624
解决方案
项目属性 → 生成
→ 生成序列化程序集
“开”设置成“自动”|| 项目属性->生成 把“On”设置成“Auto
”
版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
post YES开发框架