Compiling Hydra Visual Plugin Module Project, but error "lc.exe exited with code -1"

Hi

I’m trying compile a Hydra Project, but often got the error in Visual Studio “Error “lc.exe exited with code -1”.

Redownload the licences throgh Everwood, but the error persists.

So I’ve checket the licence file “licenses.licx“ and seems ok, it isn’t tied to a specific version, containing the texts below:

_______________________________________________________

“RemObjects.Hydra.VisualPlugin, RemObjects.Hydra
RemObjects.Hydra.NonVisualPlugin, RemObjects.Hydra” _______________________________________________________

Specs:

OS: Windows 11

Hydra: Installed in both Visual Studio version 2019 and 2022

Hydra version: 6.7.0.1355

.Net Framework Version: 4.8

Project Type: Hydra Plugin Module .Net Framework

So I’ve created an example from scratch, and got the same error.

Attachment:

HydraPluginModule.NetFramework.zip (14.6 KB)

Thx

Hi,

I’ve no issue with your testcase:

Rebuild started at 5:19 PM...
1>------ Rebuild All started: Project: HydraPluginModule.NetFramework, Configuration: Debug Any CPU ------
1>  HydraPluginModule.NetFramework -> C:\Users\VM\Documents\HydraPluginModule.NetFramework\HydraPluginModule.NetFramework\bin\Debug\HydraPluginModule.NetFramework.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 5:20 PM and took 49.860 seconds ==========

I’ve used VS2022

Is there a way to check if Hydra is correctly installed in Visual Studio?

Hi,

I think, you can just reinstall Hydra.
It should fix potential issues

Hi

Reinstalled and created another application from scratch in Visual Studio 2022, but the problem persists

Hi,

try to do these steps:

  • close VS
  • remove Obj folder inside project
  • launch Developer Command Prompt for VS 2022
  • locate folder with your project
  • launch msbuild
  • you will have something like
full log
C:\test\HydraPluginModule.NetFramework>msbuild
MSBuild version 17.13.19+0d9f5a35a for .NET Framework
Build started 10/13/2025 5:46:34 PM.

Project "C:\test\HydraPluginModule.NetFramework\HydraPluginModule.NetFramework.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
Project "C:\test\HydraPluginModule.NetFramework\HydraPluginModule.NetFramework.sln" (1) is building "C:\test\HydraPlugi
nModule.NetFramework\HydraPluginModule.NetFramework.csproj" (2) on node 1 (default targets).
PrepareForBuild:
  Creating directory "obj\Debug\".
CompileLicxFiles:
  C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\lc.exe /target:HydraPluginModule.NetFram
  ework.dll /complist:Properties\licenses.licx /outdir:obj\Debug\ /i:"C:\Program Files (x86)\Reference Assemblies\Micro
  soft\Framework\.NETFramework\v4.8\mscorlib.dll" /i:"C:\Program Files (x86)\RemObjects Software\Hydra for .NET\Bin\Rem
  Objects.Hydra.dll" /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Core
  .dll" /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Data.dll" /i:"C:\
  Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll" /i:"C:\Program Files (x86
  )\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Drawing.dll" /i:"C:\Program Files (x86)\Referenc
  e Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Windows.Forms.dll" /i:"C:\Program Files (x86)\Reference As
  semblies\Microsoft\Framework\.NETFramework\v4.8\System.Xml.dll"
CoreCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /nowarn:1701,
  1702 /fullpaths /nostdlib+ /errorreport:prompt /warn:5 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Fil
  es (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll" /reference:"C:\Program Files (x86)
  \RemObjects Software\Hydra for .NET\Bin\RemObjects.Hydra.dll" /reference:"C:\Program Files (x86)\Reference Assemblies
  \Microsoft\Framework\.NETFramework\v4.8\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Micr
  osoft\Framework\.NETFramework\v4.8\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft
  \Framework\.NETFramework\v4.8\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework
  \.NETFramework\v4.8\System.Drawing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.
  NETFramework\v4.8\System.Windows.Forms.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framewo
  rk\.NETFramework\v4.8\System.Xml.dll" /debug+ /debug:full /optimize- /out:obj\Debug\HydraPluginModule.NetFramework.dl
  l /subsystemversion:6.00 /resource:obj\Debug\HydraPluginModule.NetFramework.dll.licenses /target:library /warnaserror
  - /utf8output /langversion:7.3 ModuleController.cs ModuleController.Designer.cs Properties\AssemblyInfo.cs "obj\Debug
  \.NETFramework,Version=v4.8.AssemblyAttributes.cs"
  CompilerServer: server - server processed compilation - HydraPluginModule.NetFramework
CopyFilesToOutputDirectory:
  Copying file from "C:\test\HydraPluginModule.NetFramework\obj\Debug\HydraPluginModule.NetFramework.dll" to "C:\test\H
  ydraPluginModule.NetFramework\bin\Debug\HydraPluginModule.NetFramework.dll".
  HydraPluginModule.NetFramework -> C:\test\HydraPluginModule.NetFramework\bin\Debug\HydraPluginModule.NetFramework.dll
  Copying file from "C:\test\HydraPluginModule.NetFramework\obj\Debug\HydraPluginModule.NetFramework.pdb" to "C:\test\H
  ydraPluginModule.NetFramework\bin\Debug\HydraPluginModule.NetFramework.pdb".
Done Building Project "C:\test\HydraPluginModule.NetFramework\HydraPluginModule.NetFramework.csproj" (default targets).

Done Building Project "C:\test\HydraPluginModule.NetFramework\HydraPluginModule.NetFramework.sln" (default targets).


Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:03.93
  • copy command related to lc, add /v parameter and execute.
    in my case, it is
C:\test\HydraPluginModule.NetFramework>"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\lc.exe" /target:HydraPluginModule.NetFramework.dll /complist:Properties\licenses.licx /outdir:obj\Debug\ /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll" /i:"C:\Program Files (x86)\RemObjects Software\Hydra for .NET\Bin\RemObjects.Hydra.dll" /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Core.dll" /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Data.dll" /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll" /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Drawing.dll" /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Windows.Forms.dll" /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Xml.dll" /v
Microsoft (R) .NET License Compiler
[Microsoft .Net Framework, Version 4.8.3928.0]
Copyright (C) Microsoft Corporation.  All rights reserved.


Processing complist 'Properties\licenses.licx'...
Properties\licenses.licx (1) : info LC0001 : Processing component entry 'RemObjects.Hydra.VisualPlugin, RemObjects.Hydra'
Properties\licenses.licx (1) : info LC0002 : Resolved entry to 'RemObjects.Hydra.VisualPlugin, RemObjects.Hydra, Version=6.7.0.1355, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098'
Properties\licenses.licx (2) : info LC0001 : Processing component entry 'RemObjects.Hydra.NonVisualPlugin, RemObjects.Hydra'
Properties\licenses.licx (2) : info LC0002 : Resolved entry to 'RemObjects.Hydra.NonVisualPlugin, RemObjects.Hydra, Version=6.7.0.1355, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098'
Creating Licenses file obj\Debug\\hydrapluginmodule.netframework.dll.licenses...

it should show why you have Error “lc.exe exited with code -1.

Hi

It doesn’t show the problem anymore, may be something related to Obj temporary debug file

Thank you

Hi,

I wonder why it failed with new project created from scratch …

Probably re-installation of Hydra solved original issue, but Obj folder still contained some files that caused failure…

1 Like