func Tesses.CrossLang.Shell.WebAppTest(dd)
{
    var port = 4206;

    each(var item : dd.Options)
    {
        if(item.Key == "port")
        {
            var thePort = ParseLong(item.Value);
            if(TypeOf(thePort) == "Long") port = thePort;
        }
    }


    var pm = new Tesses.CrossLang.PackageManager();
    pm.Offline = false;
    var bt = new Tesses.CrossLang.BuildTool(pm);
    
           
    var proj=bt.BuildProject(".");

    var output = proj.Output;
    const _dict = {};
    var env = VM.CreateEnvironment(_dict);
    env.RegisterEverything();
    env.LockRegister();

	_dict.Net ?? = {};
	_dict.Net.WebServerPort = port;

    env.LoadFileWithDependencies(FS.Local,output);
    var myArgs = [output.ToString()];
    for(var i = 1; i < dd.Arguments.Count; i++)
    {
        myArgs.Add(dd.Arguments[i]);
    }
    var res = env.GetDictionary().WebAppMain(myArgs);


    Net.Http.ListenSimpleWithLoop(res, port);

    res.Close();
    return 0;
}