I am using Unity 2017.1.0b10 and Visual Studio Enterprise 2017.
When I use the debug version of my dll, there are a number of problems compared to Unity 5.6.1.f1.
- When I add the pdb and unity generates the mdb files to debug a dll project, the callstack does not match the execution line and/or breakpoint hit.
1.a. On a breakpoint, I am unable to see what the value is for any class member or parameter to a method - I am getting a NullReferenceException on a property when I stop the editor:
NullReferenceException: Object reference not set to an instance of an object
SBM.DependencyInjection.Context.ProjectContext.OnDestroy () (at F:/Repos/SuperBitMachine/sbmcore/SBMCore/SBMCore/DependencyInjection/Containers/BindCondition.cs:9)
I am doing my custom version of Dependency Injection. When I look at line 9 in BindCondition, its this:
public object[] Parameters { get { return _parameters; } }
The other weird thing is that ProjectContext.OnDestroy() has no knowledge of what IBindCondition is, nor what the Parameters property is:
private void OnDestroy()
{
_logger.Log("Project Context Cleanup");
if (_container != null)
_container.Dispose();
if (_instance != null)
Destroy(_instance.gameObject);
_readySignal = null;
_instance = null;
_container = null;
GC.Collect();
}
It seems as if my .dll is being load as Release version, but I am assured, that I am build the Debug version.