VB.NET Not working on Ubuntu 10.04 With Mono
Asked Answered
C

3

5

When i run program Error Shows...

Could not load file or assembly 'Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

Description: HTTP 500. Error processing request.

Stack Trace:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. File name: 'Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at mysite.login.loginAuthentication (System.String loginId, System.String pass) [0x00000] in :0 at mysite.login.Page_Transfer (System.Object sender, System.EventArgs e) [0x00000] in :0 at System.Web.UI.WebControls.Button.OnClick (System.EventArgs e) [0x00000] in :0 at System.Web.UI.WebControls.Button.RaisePostBackEvent (System.String eventArgument) [0x00000] in :0 at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent (System.String eventArgument) [0x00000] in :0 at System.Web.UI.Page.RaisePostBackEvent (IPostBackEventHandler sourceControl, System.String eventArgument) [0x00000] in :0 at System.Web.UI.Page.RaisePostBackEvents () [0x00000] in :0 at System.Web.UI.Page.ProcessRaiseEvents () [0x00000] in :0 at System.Web.UI.Page.InternalProcessRequest () [0x00000] in :0 at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] in :0

Version information: Mono Runtime Version: 2.10.2 (tarball Mon Apr 9 10:20:24 PKT 2012); ASP.NET Version: 2.0.50727.1433

Congreve answered 9/4, 2012 at 10:22 Comment(0)
I
11

In fact you should install mono-vbnc. By default, Ubuntu does not install that package.

Inelegancy answered 9/4, 2012 at 11:42 Comment(0)
S
1

The Microsoft.VisualBasic DLL contains some VB.NET-specific functionality, such as Asc and IIf that is not included with Mono by default.

On Ubuntu, you should be able to add the required dependencies by installing the libmono-microsoft-visualbasic8.0-cil package.

Additionally, if you're using Visual Studio.NET 2010 SP1 or above and your project is (mostly) a library, it may be worth looking into Portable Class Libraries as well.

I also recall reading something about a VS.NET option to embed code from Microsoft.VisualBasic into the IL directly to avoid the dependency, but I can't find anything concrete about that right now...

Sihon answered 9/4, 2012 at 10:57 Comment(1)
I Installed from Ubuntu Software Center "libmono-microsoft-visualbasic8.0-cil (libmono-microsoft-visualbasic8.0-cil)" but error still the same: Could not load file or assembly 'Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Description: HTTP 500. Error processing request.Congreve
C
1

You need to install the VB runtime on your Ubuntu machine.

I've never used Ubuntu, but I believe the package is named libmono-microsoft-visualbasic8.0-cil.

Creswell answered 9/4, 2012 at 11:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.