gsvirdi
gsvirdi

Reputation: 426

.NET Exception error, what does this error means?

I've tried to develop a simple winform utility which is using xml file as its database. I've used VS 2008 express edition, C#.

When this utility tries to write into the xml file then this error is displayed on other computer. I've tried to provide System.Xml.dll & System.Xml.Linq.dll in the same folder on the other computer but no use.

What does it means? Any solution?

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.MissingMethodException: Method not found: 'Void System.Xml.XmlReaderSettings.set_MaxCharactersFromEntities(Int64)'.
   at System.Xml.Linq.XNode.GetXmlReaderSettings(LoadOptions o)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(String uri)
   at Issues.Form1.button1_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Issues
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/sumsnl.LTSLFBD/Desktop/Process%20Improvement/Issues%20Register/Issues.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
4u_pgrmq
    Assembly Version: 1.0.0.0
    Win32 Version: 2.0.50727.832 (QFE.050727-8300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Upvotes: 0

Views: 1703

Answers (4)

Hans Passant
Hans Passant

Reputation: 942307

Something very fishy going on in the exception dump. The call stack is clearly showing that it is executing Linq code, GetXmlReaderSettings() is only available in System.Xml.Linq, a .NET 3.5 assembly. The list of assemblies however doesn't show this assembly.

In fact that list looks corrupted, note the entry named "4u_pgrmq". Loaded from System.dll, already listed before.

The .NET revision number is very low, 832 ought to be somewhere around the .NET 3.0 timeframe. Possible evidence that you've added 3.5 assemblies to an earlier installed version.

Odds ought to be good that you'll solve this by simply installing .NET 3.5 SP1 on the machine.

Upvotes: 1

Darbio
Darbio

Reputation: 11418

Form here: Facebook Toolkit 2.0 - Error when running it on a server with asp.net 2.0 installed

Maybe you have the wrong .NET version on your target machine?

Upvotes: 1

Brian
Brian

Reputation: 118915

It sounds like you are developing against .NET 3.5 but then deploying to a machine that only has .NET 2.0. That won't work.

Upvotes: 4

Darin Dimitrov
Darin Dimitrov

Reputation: 1039438

Do not provide System.Xml.dll & System.Xml.Linq.dll. They are part of the framework and should already be present in the GAC. Make sure that .NET 3.5 SP1 is installed on the user computer.

Upvotes: 1

Related Questions