i get System.MissingMethodException in winCE - C# - c#

what this exception:
System.MissingMethodException was unhandled
Message: File or assembly name 'System.Windows.Forms, Version=3.5.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC', or one of its dependencies, was not found.
how i can fix it ?
thank's in advance

This usually happens when you reference an assembly that has not been deployed to the device. Is the .Net compact framework version 3.5 installed on your device?

Related

XAMARIN ANDROID app got System.ServiceModel.FaultException

I have an app running well, but after I upgrade visual studio 2019 OSX, I got the exception when running the app.
Target _ResolveSatellitePaths:
No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
Target _CopyConfigFiles:
[mono] Unhandled Exception:
[mono] System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Unable to load file or assembly 'DeepCloner, Version=0.10.0.0, Culture=neutral, PublicKeyToken=dc0b95cf99bf4e99' Or one of its dependencies。 The definition of the found component information list does not match the component reference。 (An exception occurred on HRESULT: 0x80131040)
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Unable to load file or assembly'DeepCloner, Version=0.10.0.0, Culture=neutral, PublicKeyToken=dc0b95cf99bf4e99' Or one of its dependencies。 The definition of the found component information list does not match the component reference。 (An exception occurred on HRESULT: 0x80131040)
I knew it's a dll conflict issue. but I can't find a way to fix it. thanks for any information.
Have a try with updating DeepCloner to the latest verson 0.10.2to check whether solve this .
In this release we're removed System.Reflection namespace from
cloning, because some classes in System.Reflection.Emit cause
unexpected crashes in runtime. Also, there are no significant reasons
to clone these classes.
Also, checking for empty constructors is improved to reduce number of
exceptions (internally catched, but can slow down copying).

Could not load type 'System.Security.Cryptography.SHA256Managed' from assembly 'mscorlib, Version=4.0.0.0

when i tried creating checksum for paytm in my UWP app
paytm.CheckSum.generateCheckSumByJson("OYxxxxxxxxxxxx", first_json);
i am getting the following issue :
paytm.exception.CryptoException: 'Exception occurred while generating
CheckSum. Could not load type
'System.Security.Cryptography.SHA256Managed' from assembly 'mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.'
SHA256Managed is part of 'System.Security.Cryptography'. Try installing the nuget package and check if you have the dll's.

Unhandled exception in mono while running NancyFx

I'm running Ubuntu 12.04 and I have the mono-runtime package installed. On my windows machine my NancyFx self hosted application compiles fine with 1 warning but when I try to run it on my VPS I get the following error:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or
assembly 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one
of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load
file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
Any ideas on how I can fix this?
I ran across the same problem when trying to run a Mono app (compiled in Xamarin Studio on my Windows machine) on an Ubuntu 14.04 Docker virtual. I did the same thing as you and installed mono-runtime, and after an hour or two of searching, was able to get it to work after installing mono-complete. However, that also brings down a few hundred MB of additional stuff. Finally I found the package that did the trick: libmono-system-core4.0-cil (see here).
Hope that helps!
The Mono version available in the Ubuntu 12.04 repositories is very old. Try with a newer Mono (e.g. the one in Ubuntu 14.04) and see if that works.

Could not load file or assembly System, Version=2.0.5.0 in .NET 4 MVC 4 application

Been searching for ages, can't find anything helpful. Here is the exception I'm getting:
Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
Stack Trace:
[FileLoadException: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
StructureMap.Graph.PluginGraph..ctor() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\Graph\PluginGraph.cs:41
StructureMap.PluginGraphBuilder..ctor() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\PluginGraphBuilder.cs:22
StructureMap.InitializationExpression..ctor() in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\InitializationExpression.cs:22
StructureMap.ObjectFactory.Initialize(Action`1 action) in c:\BuildAgent\work\996e173a8ceccdca\src\StructureMap\ObjectFactory.cs:47
...
This applications works fine on the test server but is throwing this exception on the production server. As you can see, the StructureMap code is what is causing the exception.
I had to convert this app to .NET 4 from 4.5 because 4.5 wasn't installed on the production server. After the conversion, the app still works fine on my local machine and the test server.
I have already set the Copy Local to True for the System assembly, but since the referenced version is 4.0.0.0 and not 2.0.5.0, I this made no difference.
Let me know if any more info is needed. Any help you may be able to provide is appreciated.
Make sure your .NET framework is patched. Microsoft released patches to .NET to allow Portable Class Libraries to properly find the appropriate runtime (KB2468871). If you are seeing the above exception (or something like it), it means you're missing the latest .NET framework patches.
Edit the web.config file to remove the reference, which is not required for normal operation:
1 - Open the web.config file in the root of your site
2 - Find the following line and comment it out():xxxxx-is your assembly name.
<add assembly="xxxxx", Version=2.0.5.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
3 - Save and close the web.config file and try again
I found that it was the "await" and "async" that where giving me trouble.
I had Windows XP SP3 with only .NET 4.0, but had to update it to .NET 4.0.3 using KB2600211 - this wasn't updated automatically through Windows Update when .NET 4.0.3 came out because the computer is off-grid.
This is the link to the update:
https://www.microsoft.com/en-us/download/details.aspx?id=29053
I just want to share another solution from here that solved the problem on my development machine: installing Silverlight 5 SDK (only 11.2MB at the time of writing this post) was enough to make everything working.
Install Microsoft® Silverlight® 5 SDK from the following link. It resolves and works fine for me.
SDK download
Starting from a machine configuration that only had VS2017 and Silverlight 5 SDK on it, I installed VS2015 on top of that. This is when I started getting the System.Core and System.Windows problems.
When I uninstalled VS2015 and re-installed Silverlight 5 SDK, these problems went away.

ASP.net Oracle DataReader in C#

I have an ASP.net appication in which it uses an ODP.net database connection. I have extracted the database handler into a dll file in order to extend its flexibility.
An error pops up occasionaly saying as follows:
Error 1 Assembly 'DatabaseConnection, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' uses 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral,
PublicKeyToken=89b483f429c47342' which has a higher version than referenced assembly
'Oracle.DataAccess, Version=2.112.2.0, Culture=neutral,
PublicKeyToken=89b483f429c47342' c:\Documents and Settings\Visual Studio
2010\Projects\DatabaseConnection\bin\Debug\DatabaseConnection.dll
Last time it happend, the error faded away automatically alone.
What is the reason for such error?
From the error look at the version number, your dll is expecting Oracle.DataAccess of Version=4.112.2.0 and i believe maybe in your GAC or bin you have a lower version 2.112.2.0.
Try to get the required version and this should be resolved.
Also - if you are using .Net 4.0 - you must use the 4.x assembly to be supported by Oracle.

Categories

Resources