Problems Running Monodroid application with Db4o - xamarin.android

My monodroid application builds fine and deploys to the device; however the application dies on start up and the DDMS shows the following error:
01-07 17:04:57.607: E/mono(875): Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Db4objects.Db4o, Version=8.0.224.15975, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb' or one of its dependencies.
I have confirmed I am referencing DB4O and it shows up in the bin/debug directory.
Given this error I would think that db4o does not work with Monodroid but I have another Monodroid project which uses db4o and it works.
I have a feeling something is broken with the project file but not sure what to do. I have tried removing and adding the db4o reference a couple of times.
I am using Visual Studio 2010 and the latest version of Mondodroid as of 1/7/2012. I am deploying to a an Android 3.2 emulator.
Thanks in advance for any insight.

It sounds like you're running into a bug in the current version of Mono for Android that has to do with Fast Deployment. In the project's properties, under the Mono Android Options section, uncheck the box for Use Fast Deployment. You'll probably need to do a clean build as well to make sure it takes effect.

Related

aspnetcore.dll failed to load

I usually dev on a windows 7 desktop, using visual studio 2015 update 3. I have the same vs2015.3 on my windows 10 laptop. I copied an asp mvc 5 app I am working on to the laptop but it wont run when I try to launch it from VS. I get the "aspnetcore.dll failed to load" error. I looked around and most solutions are to repair the asp net core install, but my laptop does not have asp net core installed on it, because I don't use core yet. My project is targeting .Net 4.6.
My desktop does have Core on it. So do I have to install .net core just because? Or is there some other solution? I am using the default IIS 10.
Found the solution - the applicationhost.config file had references to ASP.NET Core and was trying to load the non-existent module. I deleted the applicationhost.config file and reopened the solution, which forced VS to rebuild it without the ASP.NET Core references. Works fine now.
In my case with Visual Studio 2015, this file was located in .vs\config\applicationhost.config
For earlier versions of Visual Studio using IIS Express, see this question for more information about where applicationhost.config is located: Where is the IIS Express configuration / metabase file found?
Using VS 2015 (Windows 10). Working on a downloaded sample MVC app (from Intuit) targeting .net 4.6.1.
I was getting the exact same behaivior/error:
"The Module DLL C:\Program Files (x86)\IIS Express\aspnetcore.dll failed to load"
Locating the Applicationhost.config file (part of download package) and deleting it, did not solve the problem because IISExpress re-generated the Applicationhost.config file with the same references.
To solve the problem I had to comment out all the (aspnetcore.dll) references:
(configSections)
< section name="aspNetCore" overrideModeDefault="Allow" />
(globalModules)
< add name="AspNetCoreModule" image="%IIS_BIN%\aspnetcore.dll" />
(modules)
< add name="AspNetCoreModule" lockItem="true" />
You can do a search and comment out accordingly.
Installing the recently released Anniversary Update (version 1607) of Windows 10 seems to destabilize IIS by shutting down Application Pools, thus resulting in a 503 error when trying to run an application, which is caused by some DLLs failing to load when the worker process starts.
Check out the Windows Event Viewer (Win+X, V) to see what you need to fix: Open "Windows Logs", then "Application" and look for "Error" level entries with the source "IIS-W3SVC-WP" (may be different if the name of your IIS instance is not the default one). In the details, you will see a short message, like this:
The Module DLL <path-to-DLL> failed to load. The data is the error.
Depending on your configuration, there may be different DLLs causing this kind of problem and they will occur one by one, so you will need to keep checking the Event Logs and fix the issues until your application properly starts up. To be sure, before every attempt, stop IIS and close IIS Manager.
Here are two specific issues we've experienced so far and how to fix them, but you may bump into completely different ones:
1."C:\WINDOWS\system32\inetsrv\rewrite.dll" (reference) ◦Go to "Programs and Features" (Win+X, F) and repair "IIS URL Rewrite Module 2".
2."C:\WINDOWS\system32\inetsrv\aspnetcore.dll" (reference) ◦Go to "Programs and Features" (Win+X, F) and repair "Microsoft .NET Core 1.0.0 - VS 2015 Tooling ...".
Original source
For anyone coming to this later, what worked for me was this:
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.1&tabs=aspnetcore1x
I had to install the hosting runtime for aspnetcore (my team's using core) and that fixed my local IIS issues.
Deleting the applicationhost.config did not work for me.
My service was forced to run in 32bit mode, and my aspnetcore was 64 bit.
Since I'm currently not using .NET core I could comment out all references to aspnetcore in the applicationhost.config file and then restart iis.

Could not load file or assembly 'System.EnterpriseServices.Wrapper.dll' is not a valid Win32 application in MVC application

I am using MVC app having .net 4.5 and it was working fine in, 4 days back windows 10 update has happened and my IIS setting has gone.
After that i couldn't able to run my MVC app in Visual studio and it starts giving
Could not load file or assembly
'System.EnterpriseServices.Wrapper.dll' or one of its dependencies.
is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
Every time, and don't understand what could be the reason, i searched so many posts, links, solutions are like moving dlls, etc.
Can somebody give my what is the reason and how can solve it
this might help system enterprice services error
Also, it might be worth re-installing the latest updates to Visual Studio as these often get corrupted on operating system updates.

BCL.Async issue with F# project

Using the latest VS2013, if I create a clean console application and add a nuget reference to BCL.Async, all colouration in VS dies. You then get: -
"Internal language services have encountered severe errors. Syntax coloring or other features may stop working. If you experience such issues, they could be fixed as follows: (1) Clean current solution (2) Restart Visual Studio (.."
Needless to say neither works.
The bug is repro-ed when the project targets .NET 4.0 but not when it targets .NET 4.5.
To be clear, the error message originates from Visual F# Power Tools (see https://github.com/fsprojects/VisualFSharpPowerTools/blob/bc76dc272cb941fdbc04e2a0d203a685c5d3bc84/src/FSharpVSPowerTools.Logic/Resource.fs#L55). What happened is that FSharp.Compiler.Service chokes on newly-added assemblies and throws exceptions to upper layers.
When I installed Microsoft.BCL.Async from NuGet package console, there are some installation errors. So I had to manually add references to System.Data, System.ServiceModel and System.ServiceModel.Discovery so that the project can be compiled. When the project is compilable, colorization goes back in normal.
That said, the error message could be improved to avoid being so horrifying though.

TFS Build Failing on System.Windows

I've been trying to run my build on TFS and I keep getting an error that kills my build. What's strange is that nothing except code change has been done since the issue started (Or at least that I'm aware about). I keep seeing this:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.WinFx.targets (268): Unknown build error, 'Cannot resolve dependency to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.'
I've googled this and the only thing I see is that it's because there's a Silverlight dll being used in a WPF application. My application is a WPF project, but I haven't been able to find any changes being done in any of my projects in my solution in regards to references.
For more information, this project is a branch from the main code. The main development branch runs fine, but for some reason, this build just fails.
Any ideas?
It seems like you're referencing the Silverlight version of System.Windows instead of the .NET Framework version. Have you tried installing Silverlight on the build server or changing the reference of your project to point to the normal .NET Framework version of that assembly (which .NET Framework exists on your build server)?

Get InvalidCastException with Glimpse, even though it's not installed. How do I fix this?

I had a Visual Studio 2012 project that I imported into Visual Studio 2013. I upgraded Entity Framework to version 6. I got the following error when I started the first time: Unable to cast object of type 'Glimpse.Ado.AlternateType.GlimpseDbConnection' to type 'System.Data.SqlClient.SqlConnection'. Since this was a prototype app, I wasn't concerned about Glimpse, so I uninstalled it via NuGet, which removed the error and I carried on.
Now, I'm deploying to Azure websites and I keep getting that error!
Glimpse is uninstalled.
It works fine in release and debug locally.
I tried putting System.Data.Metadata.Edm.MetadataWorkspace.ClearCache(); in the Application_Start like this says. (Even though I don't run queries in Application_Start
I suspect I have a caching problem on Azure, but I'm not sure. How do I get the Azure deployment to remove Glimpse like the local install has?
Update: "Fixed"it by deleting the azure website and recreating it. Would still love to hear how to do with this without going with the nuclear option.
This is a bug and is fixed in the release that will hopefully be going out tomorrow - see here for more details https://github.com/Glimpse/Glimpse/issues/540.
I also faced this error and later on found the resolution.
Issue was that I had MVC5 and EF6 based solution and i had imported Glimpse.mvc4 and Glimpse.ef5 packages and they were incompatible i think .
Once i upgraded to Glimpse.EF6 and Glimpse.MVC5 it started working fine.
also had the same one, when I opted to remove Glimpse.
you can prevent this by deleting the bin/ and obj/ folders from your project folder(s) as Glimpse is copied to your bin during debugging.

Resources