System.NotSupportedException - on F5 debug but not on CTRL-F5

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Carl Perkins (CarlPerkins_at_discussions.microsoft.com)
Date: 02/17/05


Date: Wed, 16 Feb 2005 17:23:01 -0800

I built an application that works 100% ok when I run it in debug mode but
with CTRL-F5.
I changed to deploy and get the System.NotSupportedException message.
I ALSO get the error when I run in debug mode with F5 (not CTRL-F5).
Here is a partial piece of code:

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlServerCe;
using System.Text.RegularExpressions;

namespace NJ5J_CarLog_PocketPC
{
public class formCarLog : System.Windows.Forms.Form
{
        public string wrkMaximumMileageStart = "9999991.0";
        public string wrkMaximumMileageEnd = "9999999.9";
        public decimal maximumMileageStart = 0;
        public decimal maximumMileageEnd = 0;
        public formCarLog()
        {
        InitializeComponent();
        maximumMileageStart =
System.Convert.ToDecimal(wrkMaximumMileageStart.ToString());

The last instruction above is what gives the exception. I found another
solution on this newsgroup and tried Parse() but it also gives the exception.
Is there a namespace I am omitting? The MSDN help shows that this is
supported in the .Net Compact Framework.
Thanks in advance,
Carl Perkins



Relevant Pages

  • System.NotSupportedException - on F5 debug but not on CTRL-F5
    ... I built an application that works 100% ok when I run it in debug mode but ... I ALSO get the error when I run in debug mode with F5 (not CTRL-F5). ... The last instruction above is what gives the exception. ...
    (microsoft.public.pocketpc.developer)
  • Re: FILESYS exception with hive registry in 4.2
    ... thanks for responding. ... debug mode. ... > It appears that urlmon is passing -1 to RegCloseKey. ... > using exception handling. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Application.ThreadException Doesnt Work Right. Why?
    ... I understand that, but what this is, is if any exception that is unintended ... we trap it along with all of the stack information etc. and send it ... >> it only functions when in debug mode. ... of any SQL Exceptions ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Try Catch Else Finally
    ... line numbers come up only when compiled in debug mode. ... You CAN get the line that caused the exception if you number your lines ... REM This program doesn't do much ... 50: Catch ex As DivideByZeroException ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Object reference not set to an instance of an object.
    ... You will get more exception details if you are running the ... application in debug mode, than if you ran it in release mode. ... > Object reference not set to an instance of an object. ...
    (microsoft.public.dotnet.languages.vb)