使用 Visual Studio 2017 创建 cs2php 编译器 [英] Creating cs2php compiler using Visual Studio 2017

查看:32
本文介绍了使用 Visual Studio 2017 创建 cs2php 编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 GitHub 上发现了一个有趣的项目,它允许将 C# 代码转换为 PHP.链接:https://github.com/isukces/cs2php

I found an interesting project on GitHub which allows converting C# code to PHP. Link: https://github.com/isukces/cs2php

他们表示:您必须自己下载并构建 cs2php 编译器.源代码可在 GitHub 上找到.由于 Microsoft Rosylin 许可限制,目前未分发二进制版本."

我很难创建一个 cs2php.exe 编译器.我尝试构建一个类库项目,但我得到的只是 dll 文件,当我将输出类型更改为 Windows 应用程序时,我收到我缺少 main 方法的信息.

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.

如何编译cs2php.exe?

How can I compile cs2php.exe?

推荐答案

根据我的研究,您可以在 https://github.com/isukces/cs2php 你提供的.

Based on my research, you could download the file in the https://github.com/isukces/cs2php you provided.

首先,请打开 CSToPHP 解决方案.

First, please open CSToPHP solution.

其次,选择Engine->Lang.Php.Compiler.

Second, choose Engine->Lang.Php.Compiler.

第三,右键单击重建.

最后,你会得到路径'cs2php-master\cs2php-

Finally, you will get the cs2php.exe file in the path 'cs2php-master\cs2php-

master\Lang.Cs2Php\bin\Debug\net472\cs2php.exe'.

master\Lang.Cs2Php\bin\Debug\net472\cs2php.exe'.

这篇关于使用 Visual Studio 2017 创建 cs2php 编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆