The extension adds project templates into your Visual Studio that makes it easy to start building your PeachPie powered web, library or application.
Grab the official extension from Visual Studio’s Marketplace or install it directly from your Visual Studio.
We have prepared common project templates for the most used scenarios.
File
| New
| Project
PHP (PeachPie)
project templates and choose the one you want to get started withVisual Studio creates and loads the newly created project. It needs an Internet connection to download the project dependencies for the first time and then you’re ready to go.
Now build your project and run it with F5
!
You’ve just created a .NET project in PHP! Discover other possibilities and use cases with PHP on .NET, or migrate an existing PHP library to the .NET platform.
.NET Core builds and empowers your application. It is a universal, cross-platform and secure environment for your code.
We have prepared common project types for you to get started. They hide all the complexity of project files and come with code samples.
dotnet new -i Peachpie.Templates::*
Now create the project. The command creates all the files required by the initial solution. Website
directory will contain the root of your PHP web site.
Continue by editing the newly created Website/index.php
file.
dotnet new web -lang PHP
Navigate to the Server
directory. This is the entry point of the web application, working as a bootstrapper for your PHP website.
The commands restore all dependencies, compile the project and start the web server.
cd Server dotnet run
Open your favorite web browser and enter the URL.
http://localhost:5004
.NET Core builds and empowers your application. It is a universal, cross-platform and secure environment for your code.
We have prepared common project types for you to get started. They hide all the complexity of project files and come with code samples.
dotnet new -i Peachpie.Templates::*
The following command creates the project and a sample script .php
file.
dotnet new console -lang PHP
Restore packages, compile your code and run with the following commands.
dotnet run
You’ve just created a .NET executable program in PHP! Discover other possibilities and use cases with PHP on .NET, or migrate an existing PHP library to the .NET platform.