sunnamed434 / BitMono

Obfuscator for .NET and Mono, with a customizable engine for building your own obfuscators.
https://bitmono.readthedocs.io/en/latest/
MIT License
354 stars 29 forks source link

PostPublish.bat file works when called using Command Prompt, Throwing error when called as a Post Publish Event #110

Closed techei closed 1 year ago

techei commented 1 year ago

Description

I am facing this issue & I raised a Stack Overflow question to resolve it.

Link to Stack Overflow Question

I am getting error from BitMono CLI, that's why sharing it here.

sunnamed434 commented 1 year ago

To be honest, it's a kinda really interesting feature that you're trying to reproduce, actually, it could save a lot of time with obfuscating after the build of the project. I had the branch with MSBuild.Tasks feature support for BitMono, but I had problems with references, etc. I'll check what can be done to resolve the exception that occurred in BitMono CLI

techei commented 1 year ago

To resolve issues with references I am publishing(as self contained) the project. Projects which doesn't support publish, I am manually coping dependencies (couldn't think of a better approach). If you have a better way kindly suggest.

This issue(which is raised on Stack Overflow) is resolved now, I don't know the root cause though.

Earlier: echo | BitMono.CLI -f -l -o

Fix: echo | Start BitMono.CLI -f -l -o

Start will run BitMono.CLI in new command prompt & that resolves my issue.

sunnamed434 commented 1 year ago

Cool that you solved the issue! Then you can close it now

techei commented 1 year ago

Do you have a better solution for references?

"Projects which doesn't support publish, I am manually coping dependencies (couldn't think of a better approach). If you have a better way kindly suggest."

sunnamed434 commented 1 year ago

Do you have a better solution for references?

"Projects which doesn't support publish, I am manually coping dependencies (couldn't think of a better approach). If you have a better way kindly suggest."

Wdym?

techei commented 1 year ago

To be honest, it's a kinda really interesting feature that you're trying to reproduce, actually, it could save a lot of time with obfuscating after the build of the project. I had the branch with MSBuild.Tasks feature support for BitMono, but I had problems with references, etc. I'll check what can be done to resolve the exception that occurred in BitMono CLI

As you said you had problems with references, did you find a solution for that?

sunnamed434 commented 1 year ago

To be honest, it's a kinda really interesting feature that you're trying to reproduce, actually, it could save a lot of time with obfuscating after the build of the project. I had the branch with MSBuild.Tasks feature support for BitMono, but I had problems with references, etc. I'll check what can be done to resolve the exception that occurred in BitMono CLI

As you said you had problems with references, did you find a solution for that?

No, I didn't find the solution, the problem is a solution has netstandard and .net framework, and both of them conflicting because of this NuGet package Microsoft.Bcl.AsyncInterfaces

See more here