0

I have a solution with a wpf application and a library which the application depends on. Application invokes a method on the library(with assembly name Serialization) which in turn loads an image with code

const string adornerImageUri = "pack://application:,,,/Serialization;component/TimelinePanel/Images/BoundaryAdornerGlyph.gif";
adornerImage.UriSource = new Uri(adornerImageUri, UriKind.Absolute);

Build action of BoundaryAdornerGlyph.gif is set to 'Resource' and Copy to Output Directory is set to 'Do not Copy'. Above code gives 'cannot locate resource' exception when solution, as a result application and the library, is built in release mode whereas there is no exception when built in debug mode. I am using Visual Studio 2010. Why this happens?

Alp
  • 553
  • 11
  • 30

1 Answers1

0

Exception is resolved by cleaning and building the solution but I still don't know what caused it. I cannot reproduce it by cleaning first and building in debug and release mode successively. I won't accept this as answer as the question asks for the reason of the exception.

Alp
  • 553
  • 11
  • 30