「GenerateBindingRedirects」任務意外失敗。「GenerateBindingRedirects」任務意外失敗。指定的路徑,文件名或這兩者太長
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.PathHelper.GetFullPathName()
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Xml.XmlWriterSettings.CreateWriter(String outputFileName)
at System.Xml.XmlWriter.Create(String outputFileName, XmlWriterSettings settings)
at System.Xml.Linq.XDocument.Save(String fileName, SaveOptions options)
at Microsoft.Build.Tasks.GenerateBindingRedirects.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() Incryptex.OMS.Workflow.MarketData.Service
這是一個預期的問題 - 因爲它表示完整的文件路徑必須<260個字符,顯然你的不是。 – BugFinder
**完全限定的文件名必須少於260個字符,並且目錄名稱必須少於248個字符**它正在說明問題。 – Nitin
我不認爲文件夾名稱正在創建問題,因爲我的一個名爲「Incryptex.OMS.Workflow.ExchangeEngine.Workers.Tests」的類Liabrary項目工作正常並且構建成功。 但「Incryptex.OMS.Workflow.MarketData.Service」項目給出錯誤。 如果我們比較項目文件夾名稱或目錄,發出錯誤的字符的字符數量少於。 –