Solarion
Honorary Master
- Joined
- Nov 14, 2012
- Messages
- 20,106
I have this desktop application I've doctored up for a friend. One of its functions is to generate a PDF document from an HTML Template.
I have a folder in the project directory which holds the template. This is how I navigate to that folder in the application: string templateFolder = Directory.GetParent(Directory.GetParent(Environment.CurrentDirectory).ToString()).ToString() + @"\templates\";
I compile the app and take all of the files from the bin/debug and place them in a separate folder along with the templates folder.
When it is on his machine and I run the app, it throws an error saying cannot the template file in 'file:///C:/Users/Dev03/templates/HTMLTemplateForJson.html'. It is completely bypassing the app altogether.
I've not had to deal with paths and directories in this way before. How do I get around this please guys?
I have a folder in the project directory which holds the template. This is how I navigate to that folder in the application: string templateFolder = Directory.GetParent(Directory.GetParent(Environment.CurrentDirectory).ToString()).ToString() + @"\templates\";
I compile the app and take all of the files from the bin/debug and place them in a separate folder along with the templates folder.
When it is on his machine and I run the app, it throws an error saying cannot the template file in 'file:///C:/Users/Dev03/templates/HTMLTemplateForJson.html'. It is completely bypassing the app altogether.
I've not had to deal with paths and directories in this way before. How do I get around this please guys?