我正在查看我的 ClassLibrary1.dll 里面
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ClassLibrary1\v4.0_1.0.0.0__2efc1c0b243a0c09
由于这个原因,它被自动放置在那里:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools>gacutil.
exe /i "C:\Users\wherever\ClassLibrary1.dll"
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools>
但是之后在里面找不到相应的组件
C:\Windows\assembly
我究竟做错了什么?我希望能够通过以下代码使用该类库:
<?php
$obj = new DOTNET("ClassLibrary1", "Version=1.0.0.0", "Culture=neutral", "PublicKeyToken=2efc1c0b243a0c09", "ClassLibrary1.Class1");
$output=$obj->HelloWorld();
echo $output;
?>
该类如下所示:
Public Class Class1
Public Sub HelloWorld()
MsgBox("hello, world")
End Sub
End Class
感谢您的任何帮助。