0

内部の 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

助けてくれてありがとう。

4

1 に答える 1

3

I assume it's a .net 4 assembly? If so, notice how none of the .net 4 assemblies are listed in \Windows\assembly.

That's because .net 4 assemblies are in a different location. This is nothing to worry about, so long as you can use the assembly in the GAC.

于 2012-06-12T15:38:53.097 に答える