CoreCycler icon indicating copy to clipboard operation
CoreCycler copied to clipboard

core cycler invalid search path specified "%lib%"

Open extrifixation opened this issue 1 year ago • 3 comments

at startup, the terminal displays the following error:

Add-Type : (0) : Warning, treated as an error: In "environment variable LIB" -- "The system cannot find the specified path. " invalid search path specified "%lib%" (1) : using System; C:\CoreCycler-v0.9.5.0alpha3\script-corecycler.ps1:593 sign:1

  • Add-Type -ErrorAction Stop -Name PowerUtil -Namespace Windows -Member ...
  •   + CategoryInfo          : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Except
     ion
      + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand
    

extrifixation avatar Jun 07 '24 19:06 extrifixation

Huh, that's a weird one.

The code block mentioned there is importing some C#/.NET code to try to prevent a shutdown while the script is running, and while importing that code the C# code itself throws this error. I'm not sure what's going on there, it's somehow trying to access an environment variable lib, which isn't mentioned in the code to be imported. 🤷

Do you maybe work with Visual Basic, MSBuild, etc, where this variable would've been set/changed/overridden?

sp00n avatar Jun 07 '24 19:06 sp00n

I've worked in codeblocks and visual studio, I'll try to figure it out.

extrifixation avatar Jun 08 '24 03:06 extrifixation

Did you figure this one out?

sp00n avatar Aug 20 '24 15:08 sp00n

Apparently you did. 🙃

sp00n avatar Nov 11 '24 15:11 sp00n