VB.Net代码。我想隐藏用编译代码打开的黑匣子......怎么样?
每当我编译它时它会打开一个cmd shell ...
Public Shared Function CompileVBCode(sourceFile As String, exeFile As String) As Boolean
Dim vbprovider As VBCodeProvider = New VBCodeProvider()
Dim cp As New CompilerParameters()
cp.ReferencedAssemblies.Add("System.dll")
cp.GenerateInMemory = False
cp.GenerateExecutable = True
cp.OutputAssembly = exeFile
Dim cr As CompilerResults = vbprovider.CompileAssemblyFromSource(cp, sourceFile)
答案 0 :(得分:0)
cp.CompilerOptions += "/t:winexe"