visual studio - Published project can't find my files -
i published project , can't find manual file. i'm using getting file:
private void btnhelp_click(object sender, eventargs e) { system.diagnostics.process.start(environment.currentdirectory + @"\handleiding lijmlijnen tekenen.pdf"); }
pretty straight forward, , works when i'm debugging. when published it, shows error can't find specific file. points location: c:\users\bart\documents\visual studio 2015\projects\testdxflibrary\testdxflibrary\bin\debug\handleiding lijmlijnen tekenen.pdf
the "current directory" in release can change (and change). display simple dialog path check if correct. check if file in there copying , pasting path file explorer.
if trying deliver pdf file along project, change properties of pdf file in project file:
- set copy output directory copy always/copy if newer
- set build action content
btw. better use path.combine method, like that.
Comments
Post a Comment