You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I'm trying to use ConfuserEX.CLI in VisualStudio via a PostBuild Event to confuse the output files of the project. This is the script I'm using: If $(ConfigurationName) == Release+Obfuscated ( $(ProjectDir)..\..\ConfuserEx_bin\Confuser.CLI.exe -n -out=$(TargetDir) $(TargetPath) )
And it is working fine normally. The problems begin when the paths contains some spaces, to use them I need to add " " so the script become:
If $(ConfigurationName) == Release+Obfuscated ( "$(ProjectDir)..\..\ConfuserEx_bin\Confuser.CLI.exe" -n -out="$(TargetDir)" "$(TargetPath)" )
In this way the first and third parameters work again (both the Confuser.CLI.exe and the input module "$(TargetPath)" are found), but the second one, the one that specify the output folder, give the following error:
[ERROR] Unknown error occurred. Exception: System.ArgumentException: Characters not valid in the path. in System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) in System.IO.Path.Combine(String path1, String path2) in Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in C:\Users\MatteoTex\Downloads\ConfuserEx-Reborn-master\Confuser.Core\ConfuserEngine.cs:row 92
So I can't use ConfuserEx when the projects has some spaces in its path... I'm doing something wrong or it is a problem with the control for the -out parameter?
Thanks for the attention,
Matteo Tessarotto.
The text was updated successfully, but these errors were encountered:
The issue here might be caused by the scripting language, I can’t see off the bat what that language is, but I assume it is PowerShell, considering you are using Windows.
To make it easier to read your post, can you define what language your script is in in markdown?
I would try a similar script in maybe another scripting language and if you still have issues with -out arguments with spaces.
If all else fails the code can be modified to not crash when it receives such input, I may be able to fix that if time makes it possible.
I had a similar problem with encasing the output directory with quotes, I was able to work around the issue by ensuring there is no trailing backslash in the output directory. It seems the NDesk.Options class that parses the command line escapes that quote if the backslash is there and then fails to correctly parse the rest of the line.
Hi I'm trying to use ConfuserEX.CLI in VisualStudio via a PostBuild Event to confuse the output files of the project. This is the script I'm using:
If $(ConfigurationName) == Release+Obfuscated (
$(ProjectDir)..\..\ConfuserEx_bin\Confuser.CLI.exe -n -out=$(TargetDir) $(TargetPath)
)
And it is working fine normally. The problems begin when the paths contains some spaces, to use them I need to add " " so the script become:
If $(ConfigurationName) == Release+Obfuscated (
"$(ProjectDir)..\..\ConfuserEx_bin\Confuser.CLI.exe" -n -out="$(TargetDir)" "$(TargetPath)"
)
In this way the first and third parameters work again (both the Confuser.CLI.exe and the input module "$(TargetPath)" are found), but the second one, the one that specify the output folder, give the following error:
[ERROR] Unknown error occurred. Exception: System.ArgumentException: Characters not valid in the path. in System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) in System.IO.Path.Combine(String path1, String path2) in Confuser.Core.ConfuserEngine.RunInternal(ConfuserParameters parameters, CancellationToken token) in C:\Users\MatteoTex\Downloads\ConfuserEx-Reborn-master\Confuser.Core\ConfuserEngine.cs:row 92
So I can't use ConfuserEx when the projects has some spaces in its path... I'm doing something wrong or it is a problem with the control for the -out parameter?
Thanks for the attention,
Matteo Tessarotto.
The text was updated successfully, but these errors were encountered: