Hi,
 
I can compile this from the command line on FreeBSD:
 
    # touch Test.vb
    # vbnc Test.vb /target:library
    Visual Basic.Net Compiler version 0.0.0.5943 (Mono 3.8 - master/763ac58)
    Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.
    
    Assembly 'Test, Version=0.0, Culture=neutral, PublicKeyToken=null' saved successfully to '/root/Test.dll'.
    Compilation successful
    Compilation took 00:00:01.8279010
   
 
But I cannot compile my project from the command line:
   # vbnc -out:'inn.dll' '/root/Desktop/inn/inn/inn/Email.vb' '/root/Desktop/inn/inn/inn/add_company.aspx.vb' '/root/Desktop/inn/inn/inn/database_functions.vb' '/root/Desktop/inn/inn/inn/global_module.vb' '/root/Desktop/inn/inn/inn/security_functions.vb' '/root/Desktop/inn/inn/inn/barcodes.vb' /target:library -imports:Devart.Data.PostgreSQL,System.Web,System.Net.Mail,System.Diagnostics,System.Security.Cryptography -r:/root/Desktop/inn/inn/inn/bin/Devart.Data.dll -r:/root/Desktop/inn/inn/inn/bin/Devart.Data.PostgreSql.dll -r:/usr/local/lib/mono/4.5/System.Security.dll
    Visual Basic.Net Compiler version 0.0.0.5943 (Mono 3.8 - master/763ac58)
    Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.
    
    /root/Desktop/inn/inn/inn/security_functions.vb (126,36) : error VBNC99999: <no message written yet>
    There were 1 errors and 0 warnings.
    Compilation took 00:00:00.6386910
  

Mono VB compiler cannot find reference to Security.Cryptography.SHA1CryptoServiceProvider (126 line). But I can compile my project in Visual Studio. We used already compiled project on Windows platform.
 
 
Best regards,
Pavel Kirichenko.
 
04.01.2016, 13:17, "Rolf Bjarne Kvinge" <[email protected]>:
Hi,
 
Can you compile VB from the command line?
 
Something like this:
 
    touch Test.vb
    vbnc Test.vb /target:library
 
Best regards,
Rolf

On Tue, Dec 29, 2015 at 4:13 PM, Pavel Kirichenko <[email protected]> wrote:
Hello.
 
We have installed mono, mono-basic, xsp, nginx from ports on FreeBSD 10.2. And we have created web application on VB.NET.
 
We have started the fastcgi-mono-server4 manually on the command prompt:
 
fastcgi-mono-server4 /applications=my.domain.ru:/:/usr/local/www/nginx/my.app/ /socket=tcp:127.0.0.1:9000
 
The server has started successfully. The webapp (http://my.domain.ru) has worked correctly.
 
We have ran the fastcgi-mono-server4 as service (the system start up scripts /usr/local/etc/rc.d):
 
#!/bin/sh

 # PROVIDE: monofcgid
 # REQUIRE: LOGIN nginx
 # KEYWORD: shutdown

. /etc/rc.subr

name="monofcgid"
rcvar="${name}_enable"
stop_cmd="${name}_stop"
start_cmd="${name}_start"
start_precmd="${name}_prestart"
command=/usr/local/bin/fastcgi-mono-server4
app="my.domain.ru:/:/usr/local/www/nginx/my.app/"
MONOSERVER_PID=$(ps auxf | grep fastcgi-mono-server4.exe | grep -v grep | awk '{print $2}')

monofcgid_prestart()
{
        if [ -n "${MONOSERVER_PID}" ]; then
                echo "Monofcgid is already running."
                exit 0
        fi
}

monofcgid_start()
{
        echo "Starting monofcgid."
        ${command} /applications=${app} /socket=tcp:127.0.0.1:9000 &
        echo "Started monofcgid."
}

monofcgid_stop()
{
    if [ -n "${MONOSERVER_PID}" ]; then
                echo "Stopping monofcgid."
                kill ${MONOSERVER_PID}
                echo "Stopped monofcgid."
        else
                echo "Monofcgid is not running."
                exit 0
        fi
}

load_rc_config $name
run_rc_command "$1"
We have added the following line in the /etc/rc.conf:
monofcgid_enable="YES"
 
The service has started successfully. Our problem is that trying to access http://my.domain.ru, throws an application exception:
 
Application Exception
System.SystemException
Error running vbnc: Cannot find the specified file

Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): System.
Exception stack trace:

  at Microsoft.VisualBasic.VBCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames)  in :0 
  at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames)  in :0 
  at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames)  in :0 
  at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options)  in :0 
  at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath)  in :0 
  at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug)  in :0 
  at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug)  in :0 
  at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp)  in :0 
  at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath)  in :0 
  at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.Web.VirtualPath virtualPath, System.Type requiredBaseType)  in :0 
  at System.Web.UI.PageParser.GetCompiledPageInstance (System.String virtualPath, System.String inputFile, System.Web.HttpContext context)  in :0 
  at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String url, System.String path)  in :0 
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler)  in :0 
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url)  in :0 
  at System.Web.HttpApplication+c__Iterator1.MoveNext ()  in :0 
 
We've been googling about this error for 2 weeks with no luck.
 
 
-- 
Kind regards, Pavel Kirichenko
    Skype: pavel.l.kirichenko
 

_______________________________________________
Mono-vb mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-vb


 
--
Join us at Xamarin Evolve, the world's largest cross-platform mobile development event, April 24-28, 2016!
 
 
-- 
Kind regards, Pavel Kirichenko
    +7 (905) 385-86-50
    Skype: pavel.l.kirichenko
 
 
 
_______________________________________________
Mono-vb mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-vb

Reply via email to