问题
I found an interesting project on GitHub which allows converting C# code to PHP. Link: https://github.com/isukces/cs2php
They Stated: "You have do download and build cs2php compiler by yourself. Source code is available on GitHub. Binary version is currently not distributed due to Microsoft Rosylin licence limitations."
I'm having a hard time creating a cs2php.exe compiler. I tried building a Class Library project but all I get is dll file, when I change Output Type to Windows application I receive that I'm missing main method.
How can I compile cs2php.exe?
回答1:
Based on my research, you could download the file in the https://github.com/isukces/cs2php you provided.
First, please open CSToPHP solution.
Second, choose Engine->Lang.Php.Compiler.
Third, Right click Rebuild.
Finally, you will get the cs2php.exe file in the path 'cs2php-master\cs2php-
master\Lang.Cs2Php\bin\Debug\net472\cs2php.exe'.
来源:https://stackoverflow.com/questions/59012662/creating-cs2php-compiler-using-visual-studio-2017