c# - How to Convert PHP to .NET For Beginners -
what options have converting php c#/asp.net?
i had tough time finding information on this, i've created question/answer 1 stop shop of have hit kind of stumbling block.
in short, explain different tools i'd found, worked out me, , link conversion guides.
microsoft's php asp.net migration assistant
http://www.asp.net/downloads/archived-v11/migration-assistants/php-to-aspnet
good:
microsoft has php asp.net migration assistant! it's not perfect, despite differences inherent in languages. doesn't create codebehind you, rather, puts generated c# in script tag in .aspx file.
bad:
challenge getting working because it's little old , required me install microsoft .net framework 1.1 redist, , microsoft .net framework 1.1 service pack 1 in vs2010 in order install migration assistant itself.
some of may have trouble these framework installations. if do, found handy dandy guide right here: http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/how-to-install-net-framework-11-in-windows-7-64/eb1e6232-e874-432e-ab43-17660e25e43d?page=1&tm=1345067625733
also, after i'd gotten install, wasn't appearing in conversion tools in vs2010. so, had this: http://forums.asp.net/t/1530808.aspx?no+php+to+asp+net+migration+assistant+in+ms+visual+studio+2008
re: no php asp.net migration assistant in ms visual studio 2008 apr 11, 2012 10:15 pm|link
once install migration assistant open dos window thru cmd.exe in dos window : change directory to: cd c:\documents , settings\spatel>cd c:\program files\microsoft corporation\php t o asp.net migration assistant type in following , click enter : phpconvert.exe c:\phpsourcedirectory /out c:\aspoutputdirectory open project within visual studio 2008 , choolse convert. note: in step 3 above c:\phpsourcedirectory had php files stored , c:\aspoutputdirectory wanted asp.net output go.
phpconvert.exe has other options can explore typing in phpconvert.exe /?
when saw forum ...i gave hope phpconvert.exe life saver , work effort reduced 90% conversion.
the latest version of convertor available @ http://www.asp.net/downloads/archived-v11/migration-assistants/php-to-aspnet
i'll note these command lines needed tweaking x86 machine. phpconvert.exe might in program files(x86) instead of program files.
overall, took time, that's had working, hope helps out of current bind.
phalanger - php compiler visual studio
if want php compile in .net app try phalanger
http://www.php-compiler.net/
i interested in this, decided against due licence fees. however, on github if want check out. https://github.com/devsense/phalanger
converting php yourself
here resources learning php basics, , bare-bones conversion guide.
http://learnxinyminutes.com/docs/php/
http://www.codestore.net/store.nsf/unid/blog-20100603-0518
thanks everyone! best you, , happy coding.
Comments
Post a Comment