Object reference not set to an instance of an object error with C++ projects
Brian Donahue
Posts: 6,590 Bronze 1
Hi everybody,
We recently found out that if you try to profile unmanaged code, say, a
C++ project that calls a managed assembly, you may get an 'Object reference
not set to an instance of an object' error.
ANTS Profiler should let you profile an unmanaged application, but you
won't get profiling results back from the unmanaged code. We allow this so
that you can profile a managed-code assembly called by a Win32 application,
such as a Visual Studio add-in.
The reason that you will get this error is because ANTS Profiler checks
the version information of the project to determine if the code is managed
or not. If you haven't included version information (which I don't think is
done for you automatically in C++), you'll get this error and won't be
allowed to continue.
The next version of ANTS Profiler will have a more specific error
message to make it easier for our customers to identify and fix the problem.
Thanks,
Brian Donahue
Red Gate Technical Support
We recently found out that if you try to profile unmanaged code, say, a
C++ project that calls a managed assembly, you may get an 'Object reference
not set to an instance of an object' error.
ANTS Profiler should let you profile an unmanaged application, but you
won't get profiling results back from the unmanaged code. We allow this so
that you can profile a managed-code assembly called by a Win32 application,
such as a Visual Studio add-in.
The reason that you will get this error is because ANTS Profiler checks
the version information of the project to determine if the code is managed
or not. If you haven't included version information (which I don't think is
done for you automatically in C++), you'll get this error and won't be
allowed to continue.
The next version of ANTS Profiler will have a more specific error
message to make it easier for our customers to identify and fix the problem.
Thanks,
Brian Donahue
Red Gate Technical Support