Creating cs2php compiler using Visual Studio 2017

微笑、不失礼 提交于 2021-02-11 06:25:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!