Method not found: 'System.Web.Hosting.HostingEnvironment.get_InClientBuildManager' - c#

I'm running ASP.NET MVC 4 application on Linux machine thanks to Mono, my problem is that each time I run it for few seconds instead of displaying page I get following error:
System.MissingMethodException
Method not found: 'System.Web.Hosting.HostingEnvironment.get_InClientBuildManager'.
Description:
HTTP 500.Error processing request.
Details:
Non-web exception. Exception origin (name of application or object): mscorlib.
Exception stack trace:
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Version Information(server is xsp):
3.2.8 (Debian 3.2.8+dfsg-4ubuntu1); ASP.NET Version: 4.0.30319.17020
Detailed info:
[System.Web.HttpException]: The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation. at System.Web.Compilation.BuildManager.CallPreStartMethods () [0x00000] in :0 at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] in :0 [System.Reflection.TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0 at System.Web.Compilation.BuildManager.CallPreStartMethods () [0x00000] in :0 [System.MissingMethodException]: Method not found: 'System.Web.Hosting.HostingEnvironment.get_InClientBuildManager'. at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
As I said, this error is gone shortly after starting application but I'm looking for solution to it. I don't have similiar error on other machine.
Version information(Debian+Nginx+FastCGI):
3.6.1 (master/1910095 Mon Jul 7 12:30:38 CEST 2014); ASP.NET Version: 4.0.30319.17020

Related

OleDB in Pythonnet and Mono on Mac OS X

I am trying to run several method of a dll library that I own. I use pythonnet 3.0.0dev, python3.9 and Mono 6.10.0. One of the methods triggers creating an .mdb file. On a windows machine I've install Microsoft Access Database Engine (suggested by the dll provider) and I could run my script without any problem. However, doing the same on a Mac OS X triggers the following error:
NotImplementedException: OleDb is not implemented.
at System.Data.OleDb.OleDbConnection..ctor () [0x0000b] in <bd12f551d3b343c5a146c906291931e8>:0
at (wrapper remoting-invoke-with-check) System.Data.OleDb.OleDbConnection..ctor()
at Csu.Modsim.NetworkUtils.DBUtil.OpenDBConnection () [0x0000b] in <1c83b754d09149ce95a722be79ca7efb>:0
at Csu.Modsim.NetworkUtils.DBUtil.Create (System.Boolean Overwrite, System.Boolean LeaveOpen) [0x00026] in <1c83b754d09149ce95a722be79ca7efb>:0
at Csu.Modsim.NetworkUtils.ModelOutputMSDB.InitializeOutput () [0x000a6] in <1c83b754d09149ce95a722be79ca7efb>:0
at Csu.Modsim.NetworkUtils.ModelOutputSupport.FlushOutputToCSV (Csu.Modsim.ModsimModel.Model mi, System.Boolean finalizeOutput) [0x0030d] in <1c83b754d09149ce95a722be79ca7efb>:0
at Csu.Modsim.ModsimModel.GlobalMembersOperate.operate (Csu.Modsim.ModsimModel.Model mi, Csu.Modsim.ModsimModel.Model mi2) [0x012ab] in <6f164bf9bd4744b9a0c1e4daaabc0e8a>:0
at Csu.Modsim.ModsimModel.Modsim.RunSolver (Csu.Modsim.ModsimModel.Model mi) [0x002f7] in <6f164bf9bd4744b9a0c1e4daaabc0e8a>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <55adae4546cd485ba70e2948332ebe8c>:0
What could be a possible solution to this problem. All my installed components are 64-bit.
Thanks

MissingMethodException in Xamarin.Forms project

I am developing an app using Xamarin.Forms. I have a method which returns all properties of a given object as a string.
public static string GetAllProperties(this object obj)
{
return string.Join(" ", obj
.GetType()
.GetRuntimeProperties()
.Select(prop => prop.GetValue(obj)));
}
It works fine on iOS and UWP, but throws a MissingMethodException on Android when accessing IsTransient property of the given object.
[0:] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Attempted to access a missing method.
at (wrapper managed-to-native) System.Exception:nIsTransient (int)
at System.Exception.get_IsTransient () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004b] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00038] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at System.Reflection.PropertyInfo.GetValue (System.Object obj) [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
at Fantom.Helpers.Global.GetAllProperties (System.Object obj) [0x00034] in ...
at Fantom.ViewModel.SignUpViewModel+<<FirebaseSignUp>b__20_0>d.MoveNext () [0x00340] in ...
I tried the following with no luck.
Cleaning the solution and restarting Visual Studio.
Changing the .NET framework for the PCL project from 4.5.1 to 4.6 (Project Properties > Library > Targeting > Change...), but even though 4.6 is listed it doesn't let me pick it.
Making sure the latest version of Xamarin NuGet packages are installed on each platform project.
I don't think it would help diagnose the problem, but I have the following NuGet packages installed in the PCL project.
Firebase.Xamarin
Humanizer
Microsoft.Bcl
Microsoft.Bcl.Build
Microsoft.Net.Http
Newtonsoft.Json
PCLAppConfig
PCLStorage
Rx-Core, Rx-Interfaces, Rx-Linq, Rx-Main, Rx-PlatformServices
Xamarin Forms
Platform projects only have the Xamarin packages installed.

Unable to build some projects in solution?

I am getting the following message, which I'm not able to track down to a configuration. There are some relevant articles, but none seem to answer.
Build failed. Unknown LangVersion string ' '
If I look at the build properties for the project, it throws an exception, which appears to be the cause of the build error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Unknown LangVersion string ''
at MonoDevelop.CSharp.Project.CSharpCompilerParameters.get_LangVersion () [0x00000] in <filename unknown>:0
at MonoDevelop.CSharp.Project.CompilerOptionsPanelWidget..ctor (MonoDevelop.Projects.DotNetProject project) [0x00000] in <filename unknown>:0
at MonoDevelop.CSharp.Project.CompilerOptionsPanel.CreatePanelWidget () [0x00000] in <filename unknown>:0
at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.CreatePageWidget (MonoDevelop.Ide.Gui.Dialogs.SectionPage page) [0x00000] in <filename unknown>:0
at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.ShowPage (MonoDevelop.Ide.Extensions.OptionsDialogSection section) [0x00000] in <filename unknown>:0
at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.OnSelectionChanged (System.Object s, System.EventArgs a) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0
Do I have to indicate a language somewhere in monodevelop settings? Is this spoken language or a programming language?
I was able to fix this by upgrading to Mono 5.10
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/mono-official.list
sudo apt-get update
sudo apt-get install mono-devel

UITest failed with : "SetUp : System.InvalidOperationException"

I can't use UITest anymore with my xamarin project since the last update of xamarin on the stable channel with Xcode 8.2.
Everytime, when I launch the test, I have an error : "SetUp : System.InvalidOperationException : Sequence contains no matching element". My test series doesn't change from a long time and works well before...
So I don't know how to correct this problem now...
The stack trace :
at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x00065] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:965
at Xamarin.UITest.iOS.Instruments.GetAutomationTemplatePath () [0x00031] in :0
at Xamarin.UITest.iOS.Instruments.StartInstrumentsInternal (System.String targetApplication, Xamarin.UITest.iOS.iOSRunType runType, System.String deviceId, System.String runLoopPath, Xamarin.UITest.Configuration.AppDataMode appDataMode, System.Predicate`1[T] dropLine) [0x00006] in :0
at Xamarin.UITest.iOS.Instruments.StartInstruments (System.String targetApplication, Xamarin.UITest.iOS.iOSRunType runType, System.String deviceId, Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00012] in :0
at Xamarin.UITest.iOS.iOSAppLauncher.RunAppInEmulatorInternal (System.String application, Xamarin.UITest.iOS.Instruments instruments, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Uri deviceUri, Xamarin.UITest.Shared.Artifacts.ArtifactFolder artifactFolder, Xamarin.UITest.Configuration.AppDataMode appDataMode, System.String deviceIdentifier) [0x00095] in :0
at Xamarin.UITest.iOS.iOSAppLauncher.RunAppInEmulator (Xamarin.UITest.Shared.iOS.AppBundle appBundle, Xamarin.UITest.iOS.Instruments instruments, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Uri deviceUri, Xamarin.UITest.Shared.Artifacts.ArtifactFolder artifactFolder, Xamarin.UITest.Configuration.AppDataMode appDataMode, System.String deviceIdentifier) [0x00099] in :0
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient) [0x000e4] in :0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x002db] in :0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in :0
at Ac.Test.TestV35.BeforeEachTest () [0x00012] in /Users/ShaprAdmin/Documents/ac/Ac.Test/TestV35.cs:17
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
Thank you!
try to grab the newest Xcode and
then beside proper NUnit version (2.6.x and proper NUnitTestAdapter 2.1.0)
try do upgrade/downgrade the Xamarin.UITest package to version 2.5.
For me it was not working (with same error) for 2.7 for 2.5 it's ok.
Regards,

C# MonoDevelop: Invalid -langversion CS1617

I just installed MonoDevelop 5.0.1 in Ubuntu 12.04 and tried to compile a simple Hello World.
This results in the following build error:
Error CS1617: Invalid -langversion option `Version5'. It must be `ISO-1', `ISO-2', `3', `4', `5', `Default' or `Future' (CS1617)
I looked through the options and everything I found seems to be set up correctly. Edit>Preferences>Projects>.NET Runtimes has Mono 3.2.1 included.
The only section I cannot access is Project>Project Options>Build>General, which causes an Exception to be thrown:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Unknown LangVersion string ''
at MonoDevelop.CSharp.Project.CSharpCompilerParameters.get_LangVersion () [0x00000] in <filename unknown>:0
at MonoDevelop.CSharp.Project.CompilerOptionsPanelWidget..ctor (MonoDevelop.Projects.DotNetProject project) [0x00000] in <filename unknown>:0
at MonoDevelop.CSharp.Project.CompilerOptionsPanel.CreatePanelWidget () [0x00000] in <filename unknown>:0
at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.CreatePageWidget (MonoDevelop.Ide.Gui.Dialogs.SectionPage page) [0x00000] in <filename unknown>:0
at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.ShowPage (MonoDevelop.Ide.Extensions.OptionsDialogSection section) [0x00000] in <filename unknown>:0
at MonoDevelop.Ide.Gui.Dialogs.OptionsDialog.OnSelectionChanged (System.Object s, System.EventArgs a) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0
The same error already occurred in MonoDevelop 2.something from the Ubuntu package manager.
I can't help you with the solution may be, but I can give you why this is happening -
Please visit this links -
The reason http://msdn.microsoft.com/en-us/library/ydy7a2we(v=vs.90).aspx
Mono Develop System Requirements.
http://monodevelop.com/developers/building_monodevelop
Make sure that MonoDeveloper supports the Mono version you are using.
I (think I) found the issue and now it appears to be working correctly. Apparently, one of the project files was corrupted for some reason. Deleting the old project and creating a new one helped.

Categories

Resources