Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LC.exe could not be run

On compilation I receive error for LC.EXE

The specified task executable "LC.exe" could not be run. The filename or extension is too long

This error occurs when I compile my unit test project. Of the google tricks I've seen, nothing has worked.

  • I am set to Target framework = ".NET Framework 4" not client profile.

This started today. There's hardly anything in source control history. The changes all have to do with AssemblyInfo.cs where a 3rd party utility increments our version #'s.

UPDATE
Looking out my output window the command line call to LC.EXE is HUGE

CompileLicxFiles:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\LC.exe /target:BuildAll.Tests.dll /complist:Properties\licenses.licx /outdir:obj\Debug\ /i:C:\

There's 100's of /i params...

like image 437
P.Brian.Mackey Avatar asked Aug 10 '12 16:08

P.Brian.Mackey


2 Answers

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

like image 55
zchpit Avatar answered Sep 23 '22 07:09

zchpit


I changed the value of the property Build Action from EmbeddedResource to None on the file licenses.licx. It solved the problem.

like image 45
Alex Caranha Avatar answered Sep 23 '22 07:09

Alex Caranha