How to Convert PHP to ASP.NET (3 Steps)

By Joey Liam

Microsoft developed PHP to ASP.NET Migration Assistant to combine the two technologies together.
i Jupiterimages/Photos.com/Getty Images

PHP and ASP.NET have similar functionality, such as the ability to build elaborate and complex Web applications, but they also have some notable differences. PHP is a full-bloomed programming language, while ASP.NET is a set of technologies in the Microsoft.NET Framework. To integrate these two technologies together, use an application called "PHP to ASP.NET Migration Assistant." The main purpose of this application is to assist you in converting your PHP projects to ASP.NET.

Step 1

Download your free copy of ASP.NET from the Microsoft website. You also have the option to install it right from the download page by clicking the "Install Now" button.

Step 2

Open "Visual Studio .NET" and select the "Convert" menu option. Choose the "PHP to ASP.NET Migration Assistant" migrator, and determine whether you will produce a new solution or add the project you are converting to the current solution. Upon deciding, follow the PHP to ASP.NET Migration Assistant Wizard's instructions.

Step 3

Run the "PHPConvert.exe" command-line tool on your console to migrate or convert PHP files to ASP.NET:

PHPConvert[.exe] { [/Out ] [/NoLog | /LogFile ] [/NoLogo] [/Verbose] [/ProjectName ] [/ForceOverwrite] }

The migration assistant will now convert most of the PHP language components to C# equivalents, such as classes and objects, constants, control structures, functions, operators, references, syntax, types and variables.

×