I am using windows 8.1, PHP Version 5.6.19 and Visual Studio 2015. I created a dll file and registered it successfully using the command
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe
Now i can see my dll through this path C:\Windows\Microsoft.NET\assembly\GAC_MSIL.
But when I am running my php file, getting this error:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [CreateInstance] [0x80070002] The system cannot find the file specified. ' in C:\xampp\htdocs\PhpProject2\index.php:23 Stack trace: #0 C:\xampp\htdocs\PhpProject2\index.php(23): dotnet->dotnet('ClassLibrary1,V...', 'ClassLibrary1.C...') #1 {main} thrown in C:\xampp\htdocs\PhpProject2\index.php on line 23
It seems that the php file cannot locate the dll in my system. Would you please tell me how to solve the issue?
What I have tried:
here is my PhP code:
$class1 = new DOTNET("ClassLibrary1,"
."Version=1.0.0.0,"
."Culture=neutral,"
."PublicKeyToken=8fede19312ec6e8b"
,"ClassLibrary1.Class1");
echo($class1->SayHello());