CMNATTR constant

Jan 13 at 1:04 PM
I saw in the latest code that the CMNATTR constant is used to turn on the use of the CallerMemberName attribute. Unfortunately, it is only defined for the Debug configuration. Any chance it gets into the Release configuration as well?

Thanks,
Joost
Coordinator
Jan 13 at 1:35 PM
Oh what a weird and stupid bug. Of course I will fix that ASAP. Sorry for the trouble.

Cheers
Laurent
Feb 6 at 1:26 PM
I would like to use this Method with CallerMemberName, when will it be released?
Thx for this create project!
        protected virtual void RaisePropertyChanged<T>(
#if CMNATTR
            [CallerMemberName] string propertyName = null, 
#else
            string propertyName,
#endif
            T oldValue = default(T), 
            T newValue = default(T), 
            bool broadcast = false)
        {
            if (string.IsNullOrEmpty(propertyName))
            {
                throw new ArgumentException("This method cannot be called with an empty string", "propertyName");
            }

            RaisePropertyChanged(propertyName);

            if (broadcast)
            {
                Broadcast(oldValue, newValue, propertyName);
            }
        }
Mar 27 at 9:09 AM
I would just like to know that I am correct when I've found that this has not yet been fixed? If not, I'm going ahead with a small inherited version of the ViewModelBase class in my project. Should be easy enough, although it would be nicer to not have to do this.
Coordinator
Mar 27 at 12:07 PM
Hi,

Yes you are right. This is fixed in the next update that I will release at Build next week.

cheers
Laurent
Mar 27 at 12:43 PM
Thanks, Laurent. That is good news. Have a nice Build ;-)
Thomas
May 2 at 12:22 PM
Edited May 2 at 12:26 PM
The nuget package MVVM Light libraries only 4.3.31.1 fom 2014-04-04 still doesn't provide the method
bool Set<T>(ref T field, T newValue = null, bool broadcast = false, [CallerMemberName] string propertyName = null)
Can you tell me, when the new version will be published?

The csproj file "\mvvmlight\GalaSoft.MvvmLight\GalaSoft.MvvmLight (NET45)\GalaSoft.MvvmLight (NET45).csproj" does compile every thing fine. But I would prefer nuget.
Coordinator
May 11 at 5:27 PM
Fixed in V4.4.32