Reputation: 51
I am developing a SharePoint 2013 solution using VS 2012, the solution has a licx file. I get a compile time error and a warning.
Error: The specified task executable "LC.exe" could not be run. The filename or extension is too long
Warning: The command-line for the "LC" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "LC" into multiple calls with fewer parameters per call.
I have tried the lc.exe.config has <startup useLegacyV2RuntimeActivationPolicy="true">
I also tried moving the solution to "C:\", was earlier in the Projects folder.
I am still unable to resolve this error.
Upvotes: 5
Views: 8822
Reputation: 1013
You will be able to save a lot on the path length by making a shortcut to the specific .NET version you use (in this case 4.5.2). Here are the steps;
Upvotes: 2
Reputation: 1404
This issue is fixed in VS2017 as per this GitHub checkin: https://github.com/Microsoft/msbuild/commit/e49717c727c3cab4db466bcb0a5abb624a8156bb I believe the version is full release version is VS2017 Update 2.
Upvotes: 0
Reputation: 11
Deleting licenses.licx file is not a solution. It will give you error at runtime if you are using third party control which need licenses.
LC.exe takes argument as licenses file with full path, if argument is too long, it throw error.
So keep the file name and path shorter length, it will compile and work.
Upvotes: 1
Reputation: 1919
Deleting licence file did not help me. I end up deleting the "licenses.licx" under the Solution Explorer -> Properties group Surly that helps
Upvotes: 0
Reputation: 3121
There is MS Support workaround:
when you build the project , delete the Licence file from the project everytime you get this error , just delete the licence file
https://connect.microsoft.com/VisualStudio/feedback/details/779433/lc-exe-task-command-line-too-long
Upvotes: 2