How to Convert PHP to .NET For Beginners [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
What options do I have for converting PHP to C#/ASP.NET?
I had a really tough time finding information on this, so I've created this question/answer to be a one stop shop for those of you who have also hit this kind of stumbling block.
In short, I will explain the different tools I'd found, what worked out for me, and also link you to some conversion guides.

Microsoft's PHP to ASP.NET Migration Assistant
http://www.asp.net/downloads/archived-v11/migration-assistants/php-to-aspnet
The Good:
Microsoft has a PHP to ASP.NET Migration Assistant! It's not perfect, but does fairly well despite the differences inherent in the languages. It doesn't create the codebehind for you, but rather, puts generated C# in a script tag in an .aspx file.
The Bad:
It was a challenge getting this working because it's a little old and required me to install Microsoft .NET Framework 1.1 Redist, and Microsoft .NET Framework 1.1 Service Pack 1 in VS2010 in order to install the Migration Assistant itself.
Some of you may have trouble with these Framework installations. If you do, I found a 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 it to install, it wasn't appearing in my conversion tools in VS2010. So, I had to do this:
http://forums.asp.net/t/1530808.aspx?no+PHP+to+ASP+NET+Migration+Assistant+in+MS+Visual+Studio+2008
Re: no PHP to ASP.NET Migration Assistant in MS Visual Studio 2008
Apr 11, 2012 10:15 PM|LINK
Once you install the Migration assistant open a DOS window thru
CMD.exe In the dos window : Change directory to: CD C:\Documents
and Settings\spatel>cd C:\Program Files\Microsoft Corporation\PHP t o
ASP.NET Migration Assistant Then type in the following and click enter
: PHPCONVERT.EXE C:\PhpSourceDirectory /Out C:\ASPoutputdirectory
Open the project from within Visual Studio 2008 and choolse to
convert. Note: in the step 3 above C:\PhpSourceDirectory is where I
had my PHP files stored and similarly C:\ASPoutputdirectory is where I
wanted my ASP.net output to go.
PHPCONVERT.EXE has other options that you can explore by typing in
PHPCONVERT.EXE /?
When I saw this forum ...I gave hope but PHPCONVERT.EXE was a life
saver , my work effort reduced by 90% for the conversion.
The latest version of the convertor is available #
http://www.asp.net/downloads/archived-v11/migration-assistants/php-to-aspnet
I'll note that these command lines needed tweaking for an x86 machine. PHPCONVERT.EXE might be in Program Files(x86) instead of Program Files.
Overall, it took some time, but that's what I had to do to get it working, I hope that this helps you out of your current bind.
Phalanger - A PHP Compiler for Visual Studio
If you want PHP to compile in your .NET app try Phalanger http://www.php-compiler.net/
I was interested in this, but ultimately decided against it due to licence fees. However, they are on GitHub if you want to check it out.
https://github.com/DEVSENSE/Phalanger
Converting PHP Yourself
Here are some resources for learning PHP basics, and a bare-bones conversion guide.
http://learnxinyminutes.com/docs/php/http://www.codestore.net/store.nsf/unid/BLOG-20100603-0518
Thanks everyone! All the best to you, and happy coding.

Related

Resharper 2019.1.1 in combination Visual Studio 2019 (16.1) slow [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
A new year, new releases, and like always new aggrevation. The combination of Visual Studio 2019 (16.1 release) and Resharper 2019.1.1 is deadly for our not so large solution (10 projects & 6 test projects) in 1 solution .NET Core 2.2. Not combined with frontend (javascript/typescript).
When opening solution, VS hangs and uses A LOT of CPU, and it now even has come to a point that i need to disable resharper to continue developing.
And not only disabling resharper, i also needed to disable code lens in Visual Studio, because ServiceHub.RoslynCodeAnalysis service was still taking a lot of CPU, found that on (https://github.com/dotnet/roslyn/issues/19205)
I already found this article on Jetbrains site: https://resharper-support.jetbrains.com/hc/en-us/articles/206546919 , but this time i can't figure out what the problem is.
I also found this on microsoft developer community: https://developercommunity.visualstudio.com/content/problem/521943/vs-2019-high-cpu-and-memory-usage.html :
status 01/06/2019 - NO SOLUTION
I also created my own ticket on the developer community, will keep both sites in sync: https://developercommunity.visualstudio.com/content/problem/593963/visual-studio-2019-version-161-slow-and-consuming.html
status 04/06/2019 - TICKET CREATED
Anybody in the community with the same issue and some help on how to solve it.
It's not hardware related ot OS related, probably some settings from both systems that mess up each other.
For more detail:
Visual Studio: default installation
Resharper: default installation
Codebase: rather small: a few hundred tests / a few hundred classes
Hardware: Parallels on MAC: with 10GB RAM; 8 CPU machine (been doing
that for years, i am only having problems since upgrading to 2019
versions)
No frontend projects included
Only API in .NET Core 2.2
No continuous testing
Solution wide analysis off resharper disabled
No fancy plugins, no custom rules, no metrics (all that is done on Azure Devops when code is being build ETC
>
Update: 25 June 2019 (and it is running again at a usable speed)
No info on ticket from Microsoft website
Executed these things
Visual Studio 16.1.3 update Reshaper 2019.1.2
update
Codelens disabled
Disabled defender for these processes (be aware about what you do, no scanning will happen in these processed):
Code.exe & Node.exe: we have an angular frontend ConEmu64.exe &
conhost.exe & dotnet.exe : we have .net core api running in kestrel
sqlserv.exe: we have a sql backend Also excluded my sourcefolder
from defender
Many thanks

Visual studio ".exe" built application cannot open in other computer [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I've build a visual studio 2015 project into ".exe" and it worked on my computer and other computer. And then after i update my visual studio 2015, and build the program again, the ".exe" won't open on other computer, but it working as usual on my computer.
Does it have anything to do with the update ?
I've tried it on 3 others computers, on windows 7 it shows error clr20r3. But on windows 10 it doesnt show the error message
UPDATE : Sorry for not being specific. After googling i have found many similliar problem and it have something to do with the Net Framework. I've check my project application project target Net Framework it is 4.5.2. And i already create a setup wizard for it and it's include Net Framework 4.5.2 offline installer. I build it everything fine, then i try to run the Net Framework 4.5.2 installer on other computer, it says Net Framework 4.5.2 already updated/installed. But my app still wont open on that computer, only a loading (circle) symbol, but then the app won't open.
Without more information we cannot guarantee we'll provide a correct answer.
You should check for:
.NET Framework (in which you built the project with)
Configuration files
Dependencies
As we only got the information that it's "crashing", we cannot guarantee it will work.

C# winforms application what's next? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
So a friend has asked to develop a desktop application in order to ease his work, it's not too big or crazy just some simple crud operation and some search tasks here & there.
I have finished the application now it's time to deliver it.
I have never delivered an app before and never really found myself in that situation since I am a total beginner with absolutely no real world experience so am super new to this, but I can handle and deliver what I am asked to do.
Some information about the application:
Developped using C# ( winforms ) on top of .Net ( 4.5 )
SQL Server 2014
Entity Framework 6.
So how do I deliver this to his workstation, I have read in the last days these a lot ( release , deploy , publish ) kinda got confused because the explanations were too vague plus the english that was used was a little bit difficult for me since it's not my native language.
Please let me know what should I be aware of, and I would love to see like step by step how to do this, and how professionals do it.
Thanks in advance and have a nice day to each and every one of you.
For my solution (Windows Form application with a SQL Server Database using EntityFramework), I used ClickOnce to publish it.
How to: Publish a ClickOnce Application using the Publish Wizard
You have to be sure that all the assembly you use in your project (.dll) are installed on the computer like those containing entity framework. You can easily find them on Microsoft website.
If your database is a local database, you have to install sql server express LocalDB on the computer.
And then, you only have to double click on the generated file from clickOnce and it will launch an installer wizard. If it fail, it shows you the error in detail and you can easily fix it.
Finally, you have to validate the connection string in your configuration file to be sure that it is pointing to your database.

How to "integrate" non-.net developers into a .net project? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm working on an Asp.net MVC + WebApi application that's using Azure (SQL, Storage) in the back and Angular in the front. Locally I'm running MS SQL and Azure Storage Emulator. But I desperately need some extra development brains because there's just too much work to do.
I've got a good client-side developer that will be able to help me on the Angular part of the app as well as on LESS files. So pretty much the client-side only.
The problem is that he's never used Visual Studio and doesn't intend to start doing so just for this project. He's used to client-side tools, smart editors like Sublime and similar and client automation services like Grunt or Gulp that could replace Web Essentials auto compilation of LESS files.
But there'll always be the problems of *.csproj files (they'd likely mess it up with manual edits if at all), app compilation (although that would be possible with some batch files), manage NuGet packages, database upgrades etc. It just seems too complicated without Visual Studio's automation.
So how can you sufficiently work on a .net project without Visual Studio (or WebMatrix)? and still be able to:
add new/remove/rename files in the project
add/remove/upgrade NuGet packages
compile the app as other devs may've changed backend to support something new on the client
else?
Who has done it, which tools should be used and how painful is it?
Note: I'm not asking about software recommendations even though may read that way. I'm mostly interested in your experience and whether I should force that developer to go hands on with Visual Studio or not...
I'm not going to say that it isn't possible to work on a Visual Studio project without Visual Studio, but I'm definitely going to say that it isn't at all feasible.
If you are building a Microsoft MVC system within Visual Studio, then you have made that system dependent on Visual Studio. The 'Solution' and 'Project' files are dependent on Visual Studio. Even though they are technically XML files that can be manually manipulated, it's just not feasible to go that route.
If your developer has the resources and capabilities of installing/using Visual Studio, that's the route that s/he needs to go. The fact that s/he has no prior experience working within Visual Studio, to me, isn't a good excuse.
IMO :-
You should force the developer to use VS because in the end it is
just a tool to use, with lot helpful(needed) features.
The porting of Project would required hell of a effort and Skills, So
in the end you will waste most development time in it than it would
take the developer to get familiar with VS.
This would be good for developer to learn and expand his
knowledge-base about IDEs, If he is thinking that it would be hard or
not interested to learn new stuff. Then I think you got the wrong guy
:)

Creating a plugin for Visual Studio [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm a fan of style cop but hate the way it dosn't have a more producticve way of resolving errors.
So I'm thinking, to give me a wee project to keep me happy in my spare time, of creating a Visual studio plugin to automate some error fixing.
Has anyone authored a plug in before and got any useful links, hints, experience to share?
You can write an addin to Visual-Studio on it's addins model directly: http://www.c-sharpcorner.com/UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx
It requires some hard work since the extension model is not very intuitive.
You can also do it using DXCore:
http://blogs.microsoft.co.il/blogs/dhelper/archive/2009/06/17/how-to-write-a-simple-dxcore-plug-in.aspx
It's a little bit more simple, and the plugins engine is free.
Last option is to write plugins using Resharper, I never did it but it has reach plugins among Style-cop plugin.
I had experience with both of the first options. First one, VS extensions model, is very hard to work with. It's an old API coming from previous versions of VS, based on classic COM and miss a lot of documentation. Second option, DXCore plugins, is much more intuitive,
has reacher API but it also lack some documentation. Another issue is that it requires installation of ~30MB.
Good luck :)
The new Visual Studio 2010 Beta 2 and the SDK have projects designed for this kind of thing. The extensibility options with the new WPF interface will be a great way to get this done:
http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx#Extensibility
There is going to be a lot of cool things coming out with 2010
The videos are also really good on : http://msdn.microsoft.com/en-gb/vstudio/bb507746.aspx but these are for older Visual Studio versions

Categories