|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-06-25 15:04 UTC] cmb@php.net
-Summary: DOTNET Excpection error
+Summary: DOTNET cannot instantiate generic classes
-Status: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
[2020-06-25 15:04 UTC] cmb@php.net
[2021-12-02 18:17 UTC] git@php.net
[2021-12-02 18:17 UTC] git@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 19:00:01 2025 UTC |
Description: ------------ When i've tried to use DOTNET lib's i got an Excpetion errors in 90% of my classes Tried: System.Console, System.Windows.Forms.MessageBox, System.Collection.Generic.List, System.Windows.Drawing.Graphics (and moch more...) Reproduce code: --------------- <?php /* $console = new DOTNET("mscorlib", "System.Console"); $var = $console->ReadLine(); $console->WriteLine( "Hello world from PHP - " . $var ); unset( $var ); unset( $console ); exit(); */ $list = new DOTNET("mscorlib", "System.Collections.Generic.List"); print $list->ToString(); ?> Expected result: ---------------- Veiwing the Console Commander like in Console APP In c# or use the list generic, grafics etc... Actual result: -------------- Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [CreateInstance] [0x80131522] ' in C:\wamp\www\folder\index.php:2 Stack trace: #0 C:\wamp\www\folder\index.php(2): dotnet->dotnet('mscorlib', 'System.Collecti...') #1 {main} thrown in C:\wamp\www\folder\index.php on line 2