Compilation et generation dll a partir d'un code

Compilation et generation dll a partir d'un code - C#/.NET managed - Programmation

Marsh Posté le 02-04-2008 à 16:51:13    

est ce que quelqu'un sait comment faire pour compiler et generer un dll a partir d'un code vb.net ?

Reply

Marsh Posté le 02-04-2008 à 16:51:13   

Reply

Marsh Posté le 07-04-2008 à 08:38:59    

c'est résolu !! j'ai trouvé la solution.
 
A qui ça intéresserait, voici le code :
 
' supposons que nous avons un fichier tmpDll.vb qui contient les codes correspondant à la dll qu'on va generer et que la Dll generé sera MaDLL.dll
 
'--------------- DEBUT CODE --------------------
Dim ProcessInfo As ProcessStartInfo = New ProcessStartInfo()
        ProcessInfo.FileName = "D:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322\\vbc.exe"
        ProcessInfo.Arguments = " /t:library /out:c:\\MaDLL.dll c:\\tmpDll.vb"
        Dim Proc As Process = New Process
        ProcessInfo.RedirectStandardOutput = True
        ProcessInfo.UseShellExecute = False
        ProcessInfo.CreateNoWindow = True
        Proc.StartInfo = ProcessInfo
        Proc.Start()
        Proc.WaitForExit()
'--------------- FIN CODE -----------------------

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed