我遇到了VisualStudio的问题--2017年和2019年。如果我试图打开我的解决方案,我会得到以下错误:

VS2019中的错误消息有点不同,但含义相同。在我研究ActivityLog文件时,只有这个节点对这个问题感兴趣:
<entry>
<record>698</record>
<time>2019/07/03 08:14:00.064</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)

at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)

at System.IO.Path.InternalGetDirectoryName(String path)

at Microsoft.VisualStudio.ErrorListPkg.PathColumnDefinition.GetCachedDirectoryName(ITableEntryHandle entry)

at Microsoft.VisualStudio.ErrorListPkg.PathColumnDefinition.TryCreateStringContent(ITableEntryHandle entry, Boolean truncatedText, Boolean singleColumnView, String& content)

at Microsoft.VisualStudio.Shell.TableControl.TableEntryHandleExtensions.TryCreateStringContent(ITableEntryHandle entry, ITableColumnDefinition column, Boolean truncatedText, Boolean singleColumnView, String& content)

at Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControl.GenerateFiltersForColumn(UpdateResults results, ITableColumnDefinition columnDefinition)

at Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControl.UpdateEntryFilters(UpdateResults results, HashSet`1 variableColumns)

at Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControl.UpdateEntries(HashSet`1 variableColumns, Boolean anyColumnChanges, List`1& frozenSinksAwaitingDisposal)

at Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControl.<UpdateEntriesAsync>d__182.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)</description>
</entry>有没有办法确切地找出哪条路是错的?我怀疑SpecFlow是导致这个问题的原因。但如果我禁用这句话,什么都不会改变。
另一个队友并没有用同样的解决方案来解决这个问题。
发布于 2019-07-08 09:49:12
我不知何故去掉了这条错误信息。我不明白怎么做,但让我分享一下我做过的步骤。
发布于 2020-10-23 08:13:46
由于我的路径相当长,我也遇到了一些这样的PathTooLongExceptions。这是尤指。VS项目使用相对路径的情况。显然,缩短路径会解决很多问题。
但是在对您的开发环境进行这一相当耗时的大修之前,您可以做一些事情:
上述问题解决了我的问题。
https://stackoverflow.com/questions/56888970
复制相似问题