Okay, this problem is a bit odd.
I have an application built in VS2010 that runs fine in it's own solution. However, if I load the project into a bigger solution (with 110+ projects), I start getting NullReferenceExceptions, and sometimes if I continue past them it works fine, and other times it doesn't.
The question remains, though: Why are these objects not getting initialized when I load the project as part of a bigger solution, but not when it's in it's own solution?
EDIT: Here's a sample stack trace for one of the exceptions:
A first chance exception of type 'System.NullReferenceException' occurred in DemoApp.exe
Additional information: Object reference not set to an instance of an object.
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an invocation.
System.Windows.Data Error: 17 : Cannot get 'ParentOrganDisplayName' value (type 'String') from '' (type 'OrganLocationViewModel'). BindingExpression:Path=ParentOrganDisplayName; DataItem='OrganLocationViewModel' (HashCode=19153159); target element is 'TextBox' (Name='organParentNameTxt'); target property is 'Text' (type 'String') TargetInvocationException:'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at DemoApp.ViewModel.OrganLocationViewModel.get_ParentOrganDisplayName() in C:\Visual Studio 2010\Projects\DemoApp\ViewModel\OrganLocationViewModel.cs:line 100
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
at MS.Internal.Data.PropertyPathWorker.GetValue(Object item, Int32 level)
at MS.Internal.Data.PropertyPathWorker.RawValue(Int32 k)'