Native PHP Support in Visual Studio 2010

Native PHP support in Visual Studio 2010?

Visual Studio 2010 won't have native PHP support. However, it's "relatively easy" to add some language support to Visual Studio 2010. If all you want is syntax highlighting, auto comment/uncomment, and brace matching, it could be done in one sitting by someone who knows how the new extensibility model works.

After you wrote this post, I started making an add-in to show you what I mean. I downloaded the WordPress source only to note that the .php extension is registered with Expression Web 3, which does support PHP (first image).

My 15 minute attempt at an extension (second image) is not as impressive, but keep in mind I started working on it after I answered this question. Edit: Updated to color keywords/global functions/global objects separately.

Microsoft Expression Web for PHP
(source: 280z28.org)

My PHP extension for Visual Studio 2010
(source: 280z28.org)

Visual Studio project type for PHP projects

Microsoft does not provide PHP templates, compiler support or intellisense.

PHP is not a Microsoft technology, so they do not provide custom tooling for it.

There are third party tools like VS.PHP that utilize the extensibility features of Visual Studio to offer PHP support in Visual Studio, but there is nothing "native", as you put it.


See this related question from 2009 - Native php support in Visual Studio 2010?.

Using Visual Studio 2010 as an editor for non-VS projects

AFAIK, this is not possible.

Visual studio is an editor made by Microsoft for use with Microsoft languages, such as C#, VB.net, C++ and F#. Even though can exist mods on internet (I really dont know anyone) I dont think they will work nicely (intellisense will not work, for example).

Visual studio are not like Eclipse.

Eclipe may work for what you want, but it depends on the language you are going to work with.

EDIT

Visual studio will open any files you want, but it cant compile neither understand projects that are not those I mentioned.

EDIT2

After writing this post, I found out this:

Native PHP support in Visual Studio 2010?

http://www.jcxsoftware.com/vs.php

Maybe it can help you.

Enable PHP highlights in VS 2010?

You can enable syntax highlighting for php files using a simple hack in Visual Studio 2010 (might also work for earlier versions)

Open Tools -> Options dialog from the menu, and select Text Editor -> File Associations on the left. Add php as a new extension and select 'Microsoft Visual C++' in the adjacent combo box. Apply and now you and open and edit any php file in Visual Studio with Syntax highlighting and code folding. The only problem come is when the file has mixed php and html code. It does not look really good and editing is painful.

I have tried VS.php, and I am certainly not impressed. The only thing it can add to visual studio is creating a php project easily, otherwise, I haven't been able to find it any more useful.

How to use Visual Studio for WordPress development?

No built-in support for VS, and I guess there won't be, but there are some options like the answer on this thread for Expressions. The other thing I've been looking at recently is WebMatrix - it looks promising in that it supports WordPress.

Visual Studio 2010 and UTF-8 encoding

File → Advanced Save Options. At least in Beta 2.

PHP intellisense on Visual Studio - Is it possible?

You can use VS.PHP to get php in similar VS environment. (Commercial)

Introducing the next generation of PHP
development tool Rich intellisense and
debugging support Easy to get started
with built-in PHP web server

Or Free alternative:

Php4VS

The Php4VS is a Package for Visual
studio which aims to do the same thing
as some others do, but with one
difference : for FREE !

What compilers support CUDA

The CUDA Toolkit Release Notes list the supported platforms and compilers.



Related Topics



Leave a reply



Submit