Search code examples
c#winformspublish

adding a file at publish time


I completed my winform application.

I want to add a csv file. So my application will reach with this path.

How can I get published locastion's path?


Solution

  • I think you mean following with published locations:

    Environment.CurrentDirectory
    Environment.GetFolderPath(...) 
    

    with one of following parameter

    SpecialFolder.ApplicationData
    SpecialFolder.Desktop
    ...
    

    etc.

    See http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx