all groups > dotnet windows forms designtime > august 2005 >
You're in the

dotnet windows forms designtime

group:

Imagelist causes TargetInvocationException at runtime


Imagelist causes TargetInvocationException at runtime Ryan Taylor
8/1/2005 1:35:33 PM
dotnet windows forms designtime:
Hello.

I am desinging a Windows forms application with C#. I have added an
imagelist control to the form and added a bitmap. Now, whenever I run the
application I get the following error.

"An unhandled exception of type
'System.Reflection.TargetInvocationException' occurred in mscorlib.dll

Additional information: Exception has been thrown by the target of an
invocation."

I have been able to use these before without issue. I recently installed
Visual Assist but I cannot imagine that that is the issue. Any thoughts?

System Specs
P4 3.2 Ghz.
512 MB RAM
Windows XP Professional SP2
Visual Studio 2003
..NET Framwork 1.1 SP1

Thanks in advance.

Re: Imagelist causes TargetInvocationException at runtime Ryan Taylor
8/1/2005 2:06:56 PM
Well, turns out it was partially Visual Assists fault. Visual Assist added
the DEVENV.exe.manifest file to the VS 2003 install path. Evidently there is
a serializing problem using Windows themes and the image list. If anyone has
more info regarding this issue, please fill me in. Thanks.

Deleting the DEVENV.exe.manifest and readding the images to the imagelist
control solved the problem.

[quoted text, click to view]

AddThis Social Bookmark Button