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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -