jeffcampbellmakesgames / Entitas-Redux

An entity-component framework for Unity with code generation and visual debugging
MIT License
102 stars 13 forks source link

[BUG] Generate CLI code doesn't work on my machine unless the executable path of Genesis.CLI.dll is surrounded by quotation marks #62

Closed ashwin911 closed 2 years ago

ashwin911 commented 2 years ago

Starting "Generate CLI Code" results in a "unexpected error occurred" "Code generation failed, process exited with code 1"

If I copy the dotnet command from the log message and run it in Command Prompt I get the error "Specify which project file to use because this 'E:\GameDev\Builderdam Workspace\BuilderDam' contains more than one project file."

If I add quotation marks around the path of the Genesis.CLI.dll the command works and if I change SB.Append(GenesisPreferences.GetExecutablePath()); in line 224 and 257 in "GenesisCLIRunner.cs" to SB.Append("\"" + GenesisPreferences.GetExecutablePath() + "\""); "Generate CLI Code" works

Unity Version: Unity 2020.3.27f1

To Reproduce Steps to reproduce the behavior:

  1. Place the Genesis.CLI folder in a path with a white space
  2. Update the path in the Genesis preferences
  3. execute Tools ->JCMG->Genesis->Generate CLI Code

Expected behavior Generate code completes and produces no error

Additional context Win10

jeffcampbellmakesgames commented 2 years ago

Hi @ashwin911 ,

I was able to reproduce this issue with CLI executable paths not being formatted correctly if they had a space in the folder name. I have fixed this in the way you've described along with an additional unrelated bug for a case-sensitive argument for executing a dry run. This has been merged to develop, is in Genesis v2.4.4, and should be available shortly on OpenUPM for installation. Meanwhile I will be shortly updating the Genesis min version for Entitas Redux to this version.

When you have a moment please attempt to repro this and report both, otherwise I will be closing this issue on Monday.