After this question I found a good (up to date) example to follow here. I successfully got PHP.Core libraries working in VS but still having problems finding my php classes.
The tutorial is simple enough however
dynamic phpObj = [email protected]();
never finds my php class. I have tried with the example file default.php (classname: PhpClass) and with my own php classes which are similar but have a different name.
What am I missing here? I have tried the option
Project Properties>Package/Publish Web>Items to deploy>all files in project
but that didnt help. Currently I have my php classes just under the project as seen below
The error I get just says it cant find the class:
Using ILSpy here is the main snippet of code for CurrentContext
result = (((ScriptContext)CallContext.GetData("PhpNet:ScriptContext")) ?? ScriptContext.CreateDefaultScriptContext());
This is the line of code that is used to find the php classes (AFAIK).
You have to include your php files into the PHP context first ... In Web App, to 'simulate' php lifecycle properly, do following: