locked
Unknown error -1 in file LC RRS feed

  • Question

  • Hi all,

    Can anyone figure out why this error comes.

    "Unknown error -1" in the File "LC"

    Actually i am working on an project that is a part of a centralized project. When am trying to debug this code am getting the above error. I've searched for tha file and it seems that there is no file named LC inside the project under which it is showing the error. When i double click the error message it shows a message box saying "file it says that the file is deleted or moved". Am getting a big problem out of this. All my work is in stake as because of this error and am not able to proceed with my work. If anyone knows why this error occurs or how to remove this error or atleast having any idea of how to proceed pleaseeeeeee advice. Thank you soooo much in advance.

    Pleaseeeeeee help or come up with any suggestion. I'm working in C# using VC2005.
    -------------kings--------------
    Thursday, November 27, 2008 10:43 AM

Answers

  • I've deleted the .licx file in the project directory and it worked and i'm able to work on it now. But i dont know the reason why it doesnt work previously as though i am having the proper licence. Could anyone give me reason please.

    Thanks in advance for your help.
    -------------kings--------------
    • Marked as answer by jacobkingsly Monday, December 1, 2008 1:11 PM
    • Unmarked as answer by jacobkingsly Tuesday, December 2, 2008 6:36 AM
    • Marked as answer by jacobkingsly Tuesday, May 5, 2009 11:12 AM
    Monday, December 1, 2008 12:33 PM
  • It is unlikely to be an installation issue.  It sounds like a bad parameter to the program.

    The LICX file in your project is going to use the LC task during compilation to generate an embedded resource containing the license information.   The actual LC program has an option to dump verbose information about the conversion but the MSBuild task does not expose it.

    I would recommend that you manually invoke the LC command against your LICX file to make sure it works correctly outside the build.  There could be a dependency problem.  To get the command line to use I would recommend that you build the project in VS with full logging enabled for MSBuild (Tools\Options -> Projects and Solutions -> Build and Run).

    I don't have any LICX files to test against but you could also try right-clicking the file and viewing its properties to see if there are any options available that you can configure.  I don't believe there are any project-level settings for it.

    Michael Taylor - 12/2/08
    http://p3net.mvps.org
    Tuesday, December 2, 2008 2:30 PM
    Moderator
  • Hi all,

    After all these days i was able to find out what is the problem with the licence compiler in my machine. The problem happened as the licence compiler doesn't have an entry in the register and a new entry is created when i had executed lc.exe inside the visual studio inside program files. For some who had the entry in the registry but faced the same problem i had also got it solved when they executed the lc.exe file. This i wanted to share with you all so that someone who had the issue like mine can easily come out of this.
    -------------kings--------------
    • Marked as answer by jacobkingsly Wednesday, December 2, 2009 12:24 PM
    Wednesday, December 2, 2009 12:24 PM

All replies

  • I've deleted the .licx file in the project directory and it worked and i'm able to work on it now. But i dont know the reason why it doesnt work previously as though i am having the proper licence. Could anyone give me reason please.

    Thanks in advance for your help.
    -------------kings--------------
    • Marked as answer by jacobkingsly Monday, December 1, 2008 1:11 PM
    • Unmarked as answer by jacobkingsly Tuesday, December 2, 2008 6:36 AM
    • Marked as answer by jacobkingsly Tuesday, May 5, 2009 11:12 AM
    Monday, December 1, 2008 12:33 PM
  • LC is the license compiler.  It is used to generate licx files for controls that use licensing.  Why you were getting that error is hard to say.  Perhaps it was trying to write the LICX file but couldn't (read only maybe) or perhaps the file was corrupt.  If you aren't using licensing then you won't need the LICX file.  If you are using licensing then it should regenerate the license when you build.  If you are using somebody else's licensed code then the LC shouldn't be running at all I believe.  I haven't actually tested it though.

    Michael Taylor - 12/1/08
    http://p3net.mvps.org
    Monday, December 1, 2008 3:07 PM
    Moderator
  • I am using a licenced product in that application. Its infragistics. I've proper licence to use it in my computer. If LC is a licence compiler are you trying to say that i've problem with my IDE itself?

    If so will reinstalling the Visual studio solve the problem?
    -------------kings--------------
    Tuesday, December 2, 2008 6:38 AM
  • It is unlikely to be an installation issue.  It sounds like a bad parameter to the program.

    The LICX file in your project is going to use the LC task during compilation to generate an embedded resource containing the license information.   The actual LC program has an option to dump verbose information about the conversion but the MSBuild task does not expose it.

    I would recommend that you manually invoke the LC command against your LICX file to make sure it works correctly outside the build.  There could be a dependency problem.  To get the command line to use I would recommend that you build the project in VS with full logging enabled for MSBuild (Tools\Options -> Projects and Solutions -> Build and Run).

    I don't have any LICX files to test against but you could also try right-clicking the file and viewing its properties to see if there are any options available that you can configure.  I don't believe there are any project-level settings for it.

    Michael Taylor - 12/2/08
    http://p3net.mvps.org
    Tuesday, December 2, 2008 2:30 PM
    Moderator
  • can you elaborate on how to compile a licence file outside the build manually. I'm new to this environment. Your help could be much useful to me. Please advice 
    -------------kings--------------
    Monday, March 9, 2009 8:12 AM
  • From a command prompt (one that has access to the VS binaries) run the LC command.  The syntax and an example is defined here: http://msdn.microsoft.com/en-us/library/ha0k3c9f(VS.80).aspx

    If you want to see the command that is actually used in your build then following the steps I posted earlier about enabling verbose logging in MSBuild.  You will then be able to scan the output window to get the command that was used.

    Michael Taylor - 3/9/09
    http://3pnet.mvps.org

    Monday, March 9, 2009 1:18 PM
    Moderator
  • Hi all,

    After all these days i was able to find out what is the problem with the licence compiler in my machine. The problem happened as the licence compiler doesn't have an entry in the register and a new entry is created when i had executed lc.exe inside the visual studio inside program files. For some who had the entry in the registry but faced the same problem i had also got it solved when they executed the lc.exe file. This i wanted to share with you all so that someone who had the issue like mine can easily come out of this.
    -------------kings--------------
    • Marked as answer by jacobkingsly Wednesday, December 2, 2009 12:24 PM
    Wednesday, December 2, 2009 12:24 PM