I have create 2 projects, first is main project and another is content file (excel file). I have set property of these file to copy to output directory = copy always and build action = content. However when I deploy to user site using ClickOnce, it can't find these excel file. I use code as show below to get file path.
string.Format(@"{0}{1}", System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase), @"file.xlsx");
I want to know, how can I solve this problem?