Groups | Blog | Home
all groups > dotnet vsa > november 2003 >

dotnet vsa : HELP ME!!! PLEASE COMPILE AND RUN JSCRIPT


Danilo
11/27/2003 11:11:30 PM
Hello,
I run code JScript From VB but i have memory problem increase:

I have use JScriptCodeProvider:

Dim provider As Microsoft.JScript.JScriptCodeProvider

Dim compiler As System.CodeDom.Compiler.ICodeCompiler
Dim params As System.CodeDom.Compiler.CompilerParameters
Dim results As System.CodeDom.Compiler.CompilerResults
params = New System.CodeDom.Compiler.CompilerParameters()
params.GenerateInMemory = True 'Assembly is created in memory
params.TreatWarningsAsErrors = False
params.WarningLevel = 4
params.GenerateExecutable = False
params.IncludeDebugInformation = False
Dim refs() As String = {"System.dll", "Microsoft.VisualBasic.dll"}
params.ReferencedAssemblies.AddRange(refs)
provider = Microsoft.JScript.JScriptCodeProvider()
compiler = provider.CreateCompiler
results = compiler.CompileAssemblyFromSource(params,
txtCode.Text)
mAssembly = results.CompiledAssembly

How I release memory.


I have use olso Microsoft.JScript.Vsa.VsaEngine with analog problem


Thank Danilo


P.S. I don't want use new appDomain because in the code there are reference
with my istance of object (not serializable)

bruce barker
12/1/2003 9:13:01 AM
The CLR does not support unloading assemblies. an AppDomain is your only
option, or you can host the old com based javascript engine.

-- bruce (sqlwork.com)



[quoted text, click to view]

AddThis Social Bookmark Button