I need to reference a few .exe files in my WPF application, which are stored in a folder (call it appFolder
) shown in the Solution Explore in Visual Studio. How can i refer to this folder relatively (like Server.MapPath(virtualPath);
in MVC)?
After reading this post, i tried Path.GetFullPath("appFolder")
, but this maps to something like
C:\Users\....\MyProject\bin\Debug\appFolder
while the folder resides at
C:\Users\....\MyProject\appFolder
without the \bin\Debug
.
If something like this is my only option, is it safe to manually construct the real path by ripping off \bin\Debug
? Thanks!
CLARIFICATION I was not asking how to "rip off" \bin\Debug
; rather, I asked if it's safe to do so, which was answered in svinja's comments.