<p>I get the following error when building my Windows Forms solution: </p>

<blockquote>
  <p>"LC.exe" exited with code -1</p>
</blockquote>

<p>I use two commercial Windows Forms Libraries: Infragistics and the Gantt-Control from plexityhide.com, that's why I have licenses.licx files in my WinForms Projects. We also use Visual Sourcesafe as our Source Control.</p>

<p>When the licenses.licx files are in the Projects I cannot build without the above error. However, when I exclude them from my projects the build works fine. But I need the licenses.licx files when I want to work with the commercial controls in the designer.</p>

<p>This is a brand new developer machine with Windows XP SP3 (German) and Visual Studio 2005 Team Edition for Software Developers (German) with SP1. </p>

<p>It's Windows XP 32-Bit by the way.</p>

<p>Any suggestions?</p>

[{'answer_id': 34299, 'author': 'jfs', 'author_id': 718, 'author_profile': 'https://Stackoverflow.com/users/718', 'pm_score': 3, 'selected': False, 'text': "<p>We frequently encounter this error from our last project. The solution is to reinstall the libraries since we're using the trial version. This occurs when the libraries expire.</p>\n"}, {'answer_id': 34310, 'author': 'Timbo', 'author_id': 1810, 'author_profile': 'https://Stackoverflow.com/users/1810', 'pm_score': 2, 'selected': False, 'text': '<p>Is there any more information in the error message?</p>\n\n<p>When I had problems with LC.exe in the past, most times it was because the licensed component was upgraded (the version number increased), but the licx file still contained the old version.</p>\n\n<p>In this case, you can try to update the version in the licx file manually, or change it to <code>x.y.z.*</code> to just work for further updates. You can also try to re-generate the licx file by deleting it and re-inserting the licensed windows forms controls into your form.</p>\n'}, {'answer_id': 34388, 'author': 'Stefan Haubold', 'author_id': 3353, 'author_profile': 'https://Stackoverflow.com/users/3353', 'pm_score': 4, 'selected': True, 'text': '<p>I reinstalled Infragistics and that seems to have fixed it.</p>\n'}, {'answer_id': 6531709, 'author': 'rahul chavan', 'author_id': 822597, 'author_profile': 'https://Stackoverflow.com/users/822597', 'pm_score': 5, 'selected': False, 'text': '<p>Problem mainly arises due to license file. Exclude the file <code>licenses.licx</code> from your project</p>\n'}, {'answer_id': 10311386, 'author': 'vezenkov', 'author_id': 1025264, 'author_profile': 'https://Stackoverflow.com/users/1025264', 'pm_score': 1, 'selected': False, 'text': '<p>There should be a <code>license.licx</code> file in the properties folder when you use commercial components. It is often corrupted. If you clean its contents, the <code>"LC.EXE" exited with code -1</code> disappears.</p>\n'}, {'answer_id': 14602174, 'author': 'alessandro', 'author_id': 2024996, 'author_profile': 'https://Stackoverflow.com/users/2024996', 'pm_score': 2, 'selected': False, 'text': '<p>seems the problem is due to updating the controls.\nlicenses.licx includes version 2 of .net controls. it works deleting lines with version 2 (after versioning).\nOther times worked in this way:\nadd an empty form, then insert the control that caused the problem.</p>\n'}, {'answer_id': 59926886, 'author': 'cjspuy', 'author_id': 6649339, 'author_profile': 'https://Stackoverflow.com/users/6649339', 'pm_score': 1, 'selected': False, 'text': '<p>Had the same problem. Could not build with <code>licenses.licx</code> (even if blank) and had 3rd party licensing problems without <code>licenses.licx</code>. This problem appeared after I upgraded Visual Studio from 2015 to 2019 and changed my .NET Target Framework Version from v4.5.2 to v4.7.2. To do further testing I ran the command (from the error message) in cmd at the location of lc.exe. I got no useful errors but noticed a version mismatch. I didn\'t have lc.exe for 4.7.2 installed. ("C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.7.2 Tools\\lc.exe"). With some guidance from <a href="https://stackoverflow.com/a/54281384/6649339">this answer</a>, I installed the <a href="https://dotnet.microsoft.com/download/visual-studio-sdks" rel="nofollow noreferrer">.NET 4.7.2 Developer Pack</a> and could build with <code>licenses.licx</code> again.</p>\n'}]
['https://Stackoverflow.com/questions/34284', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3353/']