System.InvalidOperationException in mscorlib.dll (PropertyValue.cs)

Post Reply
Jeremy
Posts: 13
Joined: Mon May 12, 2014 1:15 pm

System.InvalidOperationException in mscorlib.dll (PropertyValue.cs)

Post by Jeremy » Wed Jun 04, 2014 3:34 pm

Hello. Sorry for my english if it hurts your eyes.I am developping a photobooth based on DigicamControl software. However, I have trouble with the application."Exception of type 'System.InvalidOperationException' occured in mscorlib.dll but was not handled in user code.Collection was modified; enumeration opetation may not execute." This exception was randomly thrown : Sometimes when I start the application, sometimes when I take a photo...Problem seems to be in PropertyValue.cs in the foreach loop. Visual studio highlight (overline?) ' in 'public string Value        {            get { return _value; }            set            {                //if (_value != value)                //{                _value = value;                if (ValueChanged != null && _notifyValuChange)                {                    foreach (KeyValuePair<string, T> keyValuePair in _valuesDictionary)            <== Here.                    {                        if (keyValuePair.Key == _value)                        {                            OnValueChanged(this, _value, keyValuePair.Value);                        }                    }                }                //}                NotifyPropertyChanged("Value");            }        } 

System.InvalidOperationException in mscorlib.dll (PropertyValue.cs)

Advertisment
 

Duka Istvan
Posts: 867
Joined: Tue Mar 26, 2013 9:52 pm

Can you check the code again

Post by Duka Istvan » Wed Jun 04, 2014 6:23 pm

Can you check the code again i made some improvements.In mean time the code moved to https://github.com/dukus/digiCamControl

Jeremy
Posts: 13
Joined: Mon May 12, 2014 1:15 pm

Error exit code 1 postbuild

Post by Jeremy » Fri Jun 06, 2014 3:09 pm

Hello again. I have a new trouble with the new version of DigicamControl that I have'nt before.Postbuild command exit with code 1 : Do you know how to solve this...?

Duka Istvan
Posts: 867
Joined: Tue Mar 26, 2013 9:52 pm

Go to build and click on

Post by Duka Istvan » Fri Jun 06, 2014 5:31 pm

Go to build and click on Clean up and Build All

Jeremy
Posts: 13
Joined: Mon May 12, 2014 1:15 pm

Where ?

Post by Jeremy » Fri Jun 06, 2014 5:59 pm

Where is it please ? I have a French version of Visual Studio, I don't find what you are talking about.

Duka Istvan
Posts: 867
Joined: Tue Mar 26, 2013 9:52 pm

(No subject)

Post by Duka Istvan » Fri Jun 06, 2014 6:08 pm


Jeremy
Posts: 13
Joined: Mon May 12, 2014 1:15 pm

It works well, thanks you !

Post by Jeremy » Wed Jun 11, 2014 10:05 am

It works well, thanks you !

Post Reply