You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.
{"Library assembly 'file:///C:/CSharpConsole/bin/Debug/objects.dll' could not be loaded. Object reference not set to an instance of an object."}
at PHP.Core.AssemblyLoader.Load(String assemblyName, Uri assemblyUrl, LibraryConfigStore config)
at PHP.Core.PhpConfigurationContext.LoadLibrary(String assemblyName, Uri assemblyUrl, String sectionName, XmlNode node)
at PHP.Core.LibrariesConfigurationList.LoadLibrariesNoLock(Func5 callback, Action1 parseSectionCallback)
at PHP.Core.ConfigurationSectionHandler.GetConfig(ApplicationContext appContext, String sectionName)
at PHP.Core.Configuration.Load(ApplicationContext appContext)
at PHP.Core.ScriptContext..ctor(ApplicationContext appContext)
at PHP.Core.ScriptContext.CreateDefaultScriptContext()
at PHP.Core.ScriptContext.get_CurrentContext()
at CSharpConsole.Program.Main(String[] args) in C:\Users\rushi.PROMACT\Downloads\ducktyping\CSharpConsole\Program.cs:line 28
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
What could be the issue?
The text was updated successfully, but these errors were encountered:
@rushi216 Phalanger's development is mostly discontinued in favor of PeachPie, the more modern compiler and runtime that also targets .NET Core. Please feel free to give that a try.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to consume simple php library in c# application, for that I have simple php class like below,
I am converting this into dll using below command
phpc /target:dll /out:objects.dll objects.php
Now i am using it in c# console application by below code
I have also added below in App.config file and gave reference to objects.dll in project references
Still I am having exception like below
{"Library assembly 'file:///C:/CSharpConsole/bin/Debug/objects.dll' could not be loaded. Object reference not set to an instance of an object."}
at PHP.Core.AssemblyLoader.Load(String assemblyName, Uri assemblyUrl, LibraryConfigStore config)
at PHP.Core.PhpConfigurationContext.LoadLibrary(String assemblyName, Uri assemblyUrl, String sectionName, XmlNode node)
at PHP.Core.LibrariesConfigurationList.LoadLibrariesNoLock(Func
5 callback, Action
1 parseSectionCallback)at PHP.Core.ConfigurationSectionHandler.GetConfig(ApplicationContext appContext, String sectionName)
at PHP.Core.Configuration.Load(ApplicationContext appContext)
at PHP.Core.ScriptContext..ctor(ApplicationContext appContext)
at PHP.Core.ScriptContext.CreateDefaultScriptContext()
at PHP.Core.ScriptContext.get_CurrentContext()
at CSharpConsole.Program.Main(String[] args) in C:\Users\rushi.PROMACT\Downloads\ducktyping\CSharpConsole\Program.cs:line 28
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
What could be the issue?
The text was updated successfully, but these errors were encountered: