Select to view content in your preferred language

Project not support paths relative to the root application directory

810
3
08-24-2011 05:29 AM
ShaningYu
Honored Contributor
One piece of code
Source="/Images/dismiss.png"
is used in 2 projects.  It works well in one, but not in another.  In the one not working, the warning message is:
Project not support paths relative to the root application directory.  Remove '/'  qualifier from ...
How can this bug be fixed?  Do you have any hint?  Thanks.
0 Kudos
3 Replies
weiliang
Deactivated User
Then why don't you just remove the / symbol? In my code, I don't have / in my source path (e.g., Source="Assets/images/busy.png"). Make sure your png file build Action properties is Resource.

Hope this helps.

Wei
0 Kudos
ShaningYu
Honored Contributor
Wei:
Thanks for your response.  I also tried the approach you recommended (remove '/' before Images).  However, the result is the same.  But the warning message is different, such as,
The file 'Images/dismiss.png' is not the part of the project or its 'Build Action' Property is not set to 'Resource'.
I guess it is due to the 'Build Action'.  Do you know how to set it?  Thanks.
0 Kudos
weiliang
Deactivated User
Sure, Shaning. To set the 'Build Action' Property to 'Resource', select the png file in your Solution Explorer, and in its Properties panel, you should see the first item is Build Action.

Cheers,

Wei
0 Kudos