Hov undskyld - jeg var lige uopmærksom.
Nej det mener jeg ikke den hjælper med... Jeg tror du skal bruge compileren vha. kommandolinien hvis du vil lave dll-er på den måde med den.
(Det er bare et ganske udemærket til at lave asp.net sider i, så jeg ville bare gøre dig opmærksom på den hvis du ikke kendte den).
Jeg har lige kopieret noget fra dokumentationen til dig - håber det hjælper.
(jeg har fjernet det der havde med C# at gøre... håber ikke jeg har kludret alt for meget i det)
Med hensyn til dll-filen kan du sikkert hente den på
www.dll-files.comMvh
.NET Framework Developer's Guide
This section provides a complete example that illustrates the steps required to create a multifile assembly.
Step 1 — Compiling Files with Namespaces Referenced by Other Files
This example starts with some simple code for the Stringer file. Stringer has a namespace called myStringer with a class called Stringer. The Stringer class contains a method called StringerMethod that writes a single line to the console.
[Visual Basic]
' Assembly building example in the .NET Framework SDK.
Imports System
Namespace myStringer
Public Class Stringer
Public Sub StringerMethod()
Console.WriteLine("This is a line from StringerMethod.")
End Sub
End Class
End Namespace
Use the following command to compile this code:
[Visual Basic]
vbc /t:module Stringer.vb
Specifying the module parameter with the /t: compiler option indicates that the file should be compiled as a module rather than as an assembly. The compiler produces a module called Stringer.netmodule, which can be added to an assembly.
Step 2 — Compiling Modules with References to Other Modules
This step uses the /addmodule compiler option. In this example, a code module called Client has an entry point Main method that references a method in the Stringer.dll module created in Step 1.
The following example shows the code for Client.
[Visual Basic]
Imports System
Imports myStringer 'The namespace created in Stringer.netmodule.
Class MainClientApp
' Shared method Main is the entry point method.
Public Shared Sub Main()
Dim myStringInstance As New Stringer()
Console.WriteLine("Client code executes")
'myStringComp.Stringer()
myStringInstance.StringerMethod()
End Sub
End Class
Use the following command to compile this code:
[Visual Basic]
vbc /addmodule:Stringer.netmodule /t:module Client.vb
Specify the /t:module option because this module will be added to an assembly in a future step. Specify the /addmodule option because the code in Client references a namespace created by the code in Stringer.netmodule. The compiler produces a module called Client.netmodule that contains a reference to another module, Stringer.netmodule.
Note The C# and Visual Basic compilers support directly creating multifile assemblies using the following two different syntaxes.
Two compilations create a two-file assembly:
[Visual Basic]
vbc /t:module Stringer.vb
vbc Client.vb /addmodule:Stringer.netmodule
One compilation creates a two-file assembly:
[Visual Basic]
vbc /out:Stringer.netmodule Stringer.vb /out:Client.exe Client.vb
Step 3 — Creating a Multifile Assembly Using the Assembly Linker
You can use the Assembly Linker (Al.exe) to create an assembly from a collection of compiled code modules.
To create a multifile assembly using the Assembly Linker
At the command prompt, type the following command:
al <module name> <module name> ... /main:<method name> /out:<file name> /target:<assembly file type>
In this command, the module name arguments specify the name of each module to include in the assembly. The /main: option specifies the method name that is the assembly's entry point. The /out: option specifies the name of the output file, which contains assembly metadata. The /target: option specifies that the assembly is a console application executable (.exe) file, a Windows executable (.win) file, or a library (.lib) file.
In the following example, Al.exe creates an assembly that is a console application executable called myAssembly.exe. The application consists of two modules called Client.netmodule and Stringer.netmodule, and the executable file called myAssembly.exe, which contains only assembly metadata . The entry point of the assembly is the Main method in the class MainClientApp, which is located in Client.dll.
al Client.netmodule Stringer.netmodule /main:MainClientApp.Main /out:myAssembly.exe /target:exe
You can use the MSIL Disassembler (Ildasm.exe) to examine the contents of an assembly, or determine whether a file is an assembly or a module.