Mono - Unhandled Exception Error Visualbasic on Linux - mono

I am getting an error when trying to run an exe
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'NodeLink.MainModule' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
at NodeLink.MainModule..cctor () [0x0003e] in <1c1efda0a57d461d88830c1847dd8a31>:0
--- End of inner exception stack trace ---
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'NodeLink.MainModule' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
at NodeLink.MainModule..cctor () [0x0003e] in <1c1efda0a57d461d88830c1847dd8a31>:0
--- End of inner exception stack trace ---
I am new to mono and not really sure what is wrong
Any help is appreciated.

Related

i am getting configuration error after svn checkout .using VS 2022

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: An error occurred creating the configuration section handler for system.web.webPages.razor/host: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 4:
Line 5:
Line 6:
Line 7:
Line 8:
Source File: E:\eSTEM\estem\Coding\src\WebApi\views\web.config Line: 6
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.
=== Pre-bind state information ===
LOG: DisplayName = System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///E:/eSTEM/estem/Coding/src/WebApi/
LOG: Initial PrivatePath = E:\eSTEM\estem\Coding\src\WebApi\bin
Calling assembly : (Unknown).
LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\eSTEM\estem\Coding\src\WebApi\web.config
LOG: Using host configuration file: C:\Users\Hstpl\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/Users/Hstpl/AppData/Local/Temp/Temporary ASP.NET Files/vs/dd21db9b/d3877c96/System.Web.WebPages.Razor.DLL.
LOG: Attempting download of new URL file:///C:/Users/Hstpl/AppData/Local/Temp/Temporary ASP.NET Files/vs/dd21db9b/d3877c96/System.Web.WebPages.Razor/System.Web.WebPages.Razor.DLL.
LOG: Attempting download of new URL file:///E:/eSTEM/estem/Coding/src/WebApi/bin/System.Web.WebPages.Razor.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9037.0
i have tried to run the project

Mono MSBuild error after installing reference assemblies Ubuntu 18.04

I would like to build a .net framework 4.7.2 project in Mono on Ubuntu 18.04
I installed mono-devel according to this guide:
https://www.mono-project.com/download/stable/
After installing and trying to run msbuild on one of my projects, I get this error:
/usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(1195,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
I found a reference assemblies package which I installed:
mono-reference-assemblies-4.0
After installing the package and running the build again, I am getting the following error:
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.Build.Shared.BuildEnvironmentHelper.get_Instance () [0x00017] in <0fd2831d9cb34830af9027441f77a417>:0
at Microsoft.Build.Utilities.Traits.get_Instance () [0x00000] in <0fd2831d9cb34830af9027441f77a417>:0
at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x000bb] in <0fd2831d9cb34830af9027441f77a417>:0
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.Build.Shared.BuildEnvironmentHelper.get_Instance () [0x00017] in <0fd2831d9cb34830af9027441f77a417>:0
at Microsoft.Build.Utilities.Traits.get_Instance () [0x00000] in <0fd2831d9cb34830af9027441f77a417>:0
at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x003f2] in <0fd2831d9cb34830af9027441f77a417>:0
at Microsoft.Build.CommandLine.MSBuildApp.Main () [0x00028] in <0fd2831d9cb34830af9027441f77a417>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.Build.Shared.BuildEnvironmentHelper.get_Instance () [0x00017] in <0fd2831d9cb34830af9027441f77a417>:0
at Microsoft.Build.Utilities.Traits.get_Instance () [0x00000] in <0fd2831d9cb34830af9027441f77a417>:0
at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x003f2] in <0fd2831d9cb34830af9027441f77a417>:0
at Microsoft.Build.CommandLine.MSBuildApp.Main () [0x00028] in <0fd2831d9cb34830af9027441f77a417>:0
This error occurs wherever I run msbuild from. It seems like it should be possible to build my project.
Any help would be greatly appreciated.
mono-reference-assemblies-4.0 package doesn't come from the stable channel of the new apt source that you added to install your new version of Mono, so you're mixing versions of Mono at runtime, which is causing those weird exceptions.
The solution is to uninstall this package and switch to unstable channel (because .NET 4.7.2 is too new for the stable one).

fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]

While my .NET Core application is running, I noticed the following line:
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation. System.TypeLoadException: Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
I'm just curious what's causing this error because my apps is still running fine despite the error message.
By the way, I'm using .NET Core 2.0.0 Preview 1 version.
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware is just the middleware catching exceptions when nothing else in your program did
So your "real" exception is
Method 'Clone' in type 'Microsoft.EntityFrameworkCore.Infrastructure.Internal.SqlServerOptionsExtension' from assembly 'Microsoft.EntityFrameworkCore.SqlServer, ...' does not have an implementation
By doing some googling with this exception, it seems to get down to support of your .Net Core version vs your EF Provider
If you want more information, you can:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-2.1#the-developer-exception-page Enable Developer Exception pages
Log more information from EF (https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1#add-providers => enable in trace mode will get you more information)

SolrNET Ninject Integration Error- Could not load file or assembly 'HttpWebAdapters'

I had successfully implemented Solrnet using Ninject Integration. However it suddenly started failing yesterday giving the following error.
Could not load file or assembly 'HttpWebAdapters, Version=0.4.0.2002, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Here is the stack trace:
[FileNotFoundException: Could not load file or assembly 'HttpWebAdapters, Version=0.4.0.2002, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.]
SolrNet.Impl.SolrConnection..ctor(String serverURL) +0
Ninject.Integration.SolrNet.SolrNetModule.Load() in c:\Users\kanja-1\Documents\Visual Studio 2012\Projects\Ninject.Integration.SolrNet\Ninject.Integration.SolrNet\SolrNetModule.cs:205
Ninject.Modules.NinjectModule.OnLoad(IKernel kernel) in c:\Projects\Ninject\ninject\src\Ninject\Modules\NinjectModule.cs:85
Ninject.KernelBase.Load(IEnumerable1 m) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:217
Ninject.KernelBase..ctor(IComponentContainer components, INinjectSettings settings, INinjectModule[] modules) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:100
Ninject.KernelBase..ctor(INinjectModule[] modules) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:57
Ninject.StandardKernel..ctor(INinjectModule[] modules) in c:\Projects\Ninject\ninject\src\Ninject\StandardKernel.cs:46
MealsToGo.App_Start.NinjectWebCommon.CreateKernel() in c:\Users\kanja-1\Documents\Visual Studio 2012\Projects\MealsToGo\MealsToGo\App_Start\NinjectWebCommon.cs:53
Ninject.Web.Common.Bootstrapper.Initialize(Func1 createKernelCallback) in c:\Projects\Ninject\Ninject.Web.Common\src\Ninject.Web.Common\Bootstrapper.cs:50
MealsToGo.App_Start.NinjectWebCommon.Start() in c:\Users\kanja-1\Documents\Visual Studio 2012\Projects\MealsToGo\MealsToGo\App_Start\NinjectWebCommon.cs:34
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
Does someone know what I need to do to fix this?
thanks

"Method 'Expire' in type 'ServiceStack.Redis.RedisNativeClient' from assembly

I get the following error when I try to load my webrole locally.
Method 'Expire' in type 'ServiceStack.Redis.RedisNativeClient' from assembly 'ServiceStack.Redis, Version=3.9.14.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
It was working yesterday... Any ideas?