Monday, February 11, 2013

We had a situation where there is a WPF exe which contains more than 47 characters in file name .When we double click on the exe it simply shows 'not working'.

eg: The below file works
ABCEDFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU.exe
But if we add one more character to the file name it stops working
ABCEDFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUV.exe

This happens even in case we place this file in c:\ which means this is not windows file limitation.

Console application
Obviously when we hit with this issue the first will be to try out the scenario in a console application. I tried that and there is no issue. We can have big file names.

Whats the error showing
There are no exception thrown in .net code. Simple shows stopped working. When we get the "Stopped working" dialog, if we select debug with new Visual Studio instance it shows some call stack in kernel