Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Create Build Compile Assembly DLL DotNet .Net Microsoft.CSharp.CSharpCodeProvider System.CodeDom.Compiler.CompilerParameters .CS
ObjectClrOption("version", "v2.0.50727") strAssembly = DirScript():"ManagedWifi.dll" If !FileExist(strAssembly) ;; Compile assembly from source files. ObjectClrOption("use","System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") objCSharp = ObjectClrNew('Microsoft.CSharp.CSharpCodeProvider') objParams = ObjectClrNew('System.CodeDom.Compiler.CompilerParameters') objParams.ReferencedAssemblies.Add( "System.dll" ) objParams.OutputAssembly = strAssembly objParams.CompilerOptions = "/optimize" aSource = ArrDimension(3) aSource[0] = "C:\Projects\DotNet\managedwifi-1.1\Interop.cs" aSource[1] = "C:\Projects\DotNet\managedwifi-1.1\WlanApi.cs" aSource[2] = "C:\Projects\DotNet\managedwifi-1.1\Properties\AssemblyInfo.cs" objResult = objCSharp.CompileAssemblyFromFile(objParams, BSTR:aSource) ;; Check for compiler errors. If objResult.Errors.Count > 0 ForEach ce In objResult.Errors Pause("Error", ce.ToString()) Next Exit EndIf EndIf Exit
Article ID: W17853
Filename: Create an Assembly DLL On The Fly.txt
File Created: 2013:09:13:08:20:08
Last Updated: 2013:09:13:08:20:08