2017-06-20 108 views
2

我正在使用本地SDK在本地運行我的作業。不過,我得到了以下錯誤消息:由於超出路徑長度限制導致USQL失敗

Error : '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. 

我的一個同事是能夠將誤差追查到裏面DataRoot的目錄文件夾中的文件.SS通過在C上新建一個目錄下運行項目:\。 .ss文件的路徑爲

C:\HelloWorld\Main\Source\Data\Insights\NewProject\NewProject\USQLJobsForTesting.Tests\bin\Debug\DataRoot\_catalog_\database\d92bfaa5-dc7f-4131-abdc-22c50eb0d8c0\schema\f6cf4417-e2d8-4769-b633-4fb5dddcb066\table\aa136daf-9e86-4650-9cc3-119d607fb3b0\31a18033-099e-4c2a-aae3-75cf099b0fb1.ss 

超過了允許的260個字符的限制。我無法減少項目路徑的長度,因爲我的組織遵循特定的工作目錄格式。

有沒有解決這個問題的方法?

回答

1

嘗試在CMD中使用subst來通過將驅動器號映射到要使用的數據根來解決此問題。

subst X: C:\PathToYourDataRoot

然後在Visual Studio中ADL工具設置DataRoot到X:

enter image description here

+1

這可能對當地,但沒有運行它自動化測試工作。例如。我們有自動化測試,這些測試是通過從輸出目錄引用的DataRoot運行的。這有時會導致更長的路徑,我們僅限於使用輸出目錄進行測試項目 –